[dolphin] [Bug 416989] New: Konqueror's terminal window does not start in current directory
Jonathan Marten
bugzilla_noreply at kde.org
Fri Jan 31 15:52:32 GMT 2020
https://bugs.kde.org/show_bug.cgi?id=416989
Bug ID: 416989
Summary: Konqueror's terminal window does not start in current
directory
Product: dolphin
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: dolphin-bugs-null at kde.org
Reporter: jjm at keelhaul.me.uk
CC: kfm-devel at kde.org
Target Milestone: ---
SUMMARY
Yes, this bug is being initially reported for Dolphin, because even though the
problem only shows up in Konqueror the bug seems to be either in the
DolphinPart or KParts.
When using Konqueror's Tools - Open Terminal action (F4), the terminal shell
should start in the directory shown in the file manager. Since
https://phabricator.kde.org/D26140 this is not the case, the terminal always
starts in $HOME.
In DolphinPart::slotOpenTerminal() that change replaced the stat and local file
conversion with KParts::ReadOnlyPart::localFilePath(). localFilePath() returns
d->m_file, which is never set by any function that DolphinPart calls; it
remains as null and so the KToolInvocation::invokeTerminal() always starts in
the home directory.
DolphinPart::openUrl() calls KParts::ReadOnlyPart::setUrl() with the comment
"remember it at the KParts level", but KParts::ReadOnlyPart::setUrl() does not
set d->m_file, only KParts::ReadOnlyPart::openUrl() does.
Possible solutions that I can think of would be either:
(a) Call KParts::ReadOnlyPart::openUrl() instead of setUrl() in
DolphinPart::openUrl().
(b) Resolve the local directory in DolphinPart::openUrl(), as was removed by
the diff, and pass that to KParts::ReadOnlyPart::setLocalFilePath().
(c) Additionally resolve the local path and set d->m_file in
KParts::ReadOnlyPart::setUrl().
The Dolphin application does not use the DolphinPart, hence this problem does
not show with its version of Open Terminal (Shift+F4).
STEPS TO REPRODUCE
1. From the command linbe, run "konqueror /tmp".
2. Observe that the specificied directory is shown.
3. Press F4 and note that the terminal does not open in /tmp but $HOME.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the kfm-devel
mailing list