<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>153785</bug_id>
          
          <creation_ts>2007-12-10 17:04:38 +0000</creation_ts>
          <short_desc>terminal doesnt start in current directory</short_desc>
          <delta_ts>2007-12-16 20:14:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>dolphin</product>
          <component>general</component>
          <version>16.12.2</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Morten O. Hansen">morten</reporter>
          <assigned_to name="Peter Penz">peter.penz19</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>561840</commentid>
    <comment_count>0</comment_count>
    <who name="Morten O. Hansen">morten</who>
    <bug_when>2007-12-10 17:04:39 +0000</bug_when>
    <thetext>Version:           0.9.5 (from svn) (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 4.2.3 20071123 (prerelease) (Debian 4.2.2-4) 
OS:                Linux

the embedded terminal doesnt always start in the correct directory (which ofcourse should be the current one).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561907</commentid>
    <comment_count>1</comment_count>
    <who name="Morten O. Hansen">morten</who>
    <bug_when>2007-12-10 20:51:51 +0000</bug_when>
    <thetext>
after some checking, i have found a way to reproduce this every time:
1) start dolphin
2) enter a directory e.g. ~/kde/src
3) press f4 (terminal now opens and shows ~/kde/src)
4) f4 again (it is now gone)
5) enter ~/kde/bin
6) press f4 (current directory will now be ~/kde/src)

it seems that url().path() is correct, so maybe theres something wrong with showShellInDir() ?

sendInput(&quot;cd &quot; + url().path() + &quot;; clear\n&quot;) on line 77 of terminalsidebarpage.cpp seems to work. but its not really a good fix!
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561928</commentid>
    <comment_count>2</comment_count>
      <attachid>22464</attachid>
    <who name="Morten O. Hansen">morten</who>
    <bug_when>2007-12-10 21:41:16 +0000</bug_when>
    <thetext>Created attachment 22464
patches bug

Enclosed is a patch that should fix the problem. showShellInDir only changes
directory when the shell-process is created (so when it is first, created it
wont do anything on successive calls).

I moved the showShellInDir-call to right after the terminal is created, and
added a sendInput instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>563772</commentid>
    <comment_count>3</comment_count>
    <who name="Peter Penz">peter.penz19</who>
    <bug_when>2007-12-16 12:28:07 +0000</bug_when>
    <thetext>Thanks a lot for the detailed analyzes + the patch. Even if sendInput(&quot;cd&quot; + ...) might not be the nicest approach, the time until KDE 4.0 is quite short and I applied your patch :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>563773</commentid>
    <comment_count>4</comment_count>
    <who name="Peter Penz">peter.penz19</who>
    <bug_when>2007-12-16 12:29:03 +0000</bug_when>
    <thetext>SVN commit 749039 by ppenz:

fixes for the terminal panel:
* assure that the correct directory is entered when reopening the terminal
* let the terminal be focused also when reopening it

BUG: 153785
BUG: 153756

 M  +7 -3      terminalsidebarpage.cpp  
 M  +2 -0      terminalsidebarpage.h  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=749039
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>563872</commentid>
    <comment_count>5</comment_count>
    <who name="Morten O. Hansen">morten</who>
    <bug_when>2007-12-16 20:04:22 +0000</bug_when>
    <thetext>
Yeah, sendInput isnt very clean.. (you can see the cd commands being sent to the console). But not sure if there is another way. 

Btw, there is also a patch in bug #153697 :-) </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>563879</commentid>
    <comment_count>6</comment_count>
    <who name="Peter Penz">peter.penz19</who>
    <bug_when>2007-12-16 20:14:00 +0000</bug_when>
    <thetext>&gt; Btw, there is also a patch in bug #153697 :-) 

Wow, great! I just had a look and I&apos;ll apply it. I&apos;m also not sure for 153697 whether there might be nicer approaches (I think in Qt4.4 there are easier ways for disabling global shortcuts), but like said: 4.0 is approaching... Thanks a lot!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>22464</attachid>
            <date>2007-12-10 21:41:16 +0000</date>
            <delta_ts>2007-12-10 21:41:16 +0000</delta_ts>
            <desc>patches bug</desc>
            <filename>dolphin-term-curdir-bug153785.patch</filename>
            <type>text/plain</type>
            <size>625</size>
            <attacher name="Morten O. Hansen">morten</attacher>
            
              <data encoding="base64">SW5kZXg6IHRlcm1pbmFsc2lkZWJhcnBhZ2UuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHRlcm1pbmFsc2lk
ZWJhcnBhZ2UuY3BwCShyZXZpc2lvbiA3NDY5NjMpCisrKyB0ZXJtaW5hbHNpZGViYXJwYWdlLmNw
cAkod29ya2luZyBjb3B5KQpAQCAtNzAsMTAgKzcwLDExIEBACiAgICAgICAgIGlmIChwYXJ0ICE9
IDApIHsKICAgICAgICAgICAgIG1fbGF5b3V0LT5hZGRXaWRnZXQocGFydC0+d2lkZ2V0KCkpOwog
ICAgICAgICAgICAgbV90ZXJtaW5hbCA9IHFvYmplY3RfY2FzdDxUZXJtaW5hbEludGVyZmFjZSAq
PihwYXJ0KTsKKwkJCW1fdGVybWluYWwtPnNob3dTaGVsbEluRGlyKHVybCgpLnBhdGgoKSk7CiAg
ICAgICAgIH0KICAgICB9CiAgICAgaWYgKG1fdGVybWluYWwgIT0gMCkgewotICAgICAgICBtX3Rl
cm1pbmFsLT5zaG93U2hlbGxJbkRpcih1cmwoKS5wYXRoKCkpOworICAgICAgICBtX3Rlcm1pbmFs
LT5zZW5kSW5wdXQoImNkICIgKyBLU2hlbGw6OnF1b3RlQXJnKHVybCgpLnBhdGgoKSkgKyAnXG4n
KTsKICAgICAgICAgbV90ZXJtaW5hbC0+c2VuZElucHV0KCJjbGVhclxuIik7CiAgICAgfQogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>