Summary: | dolphin . opening Documents folder | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Jithin Emmanuel <jithin1987> |
Component: | general | Assignee: | Peter Penz <peter.penz19> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | baseman2009, frank78ac, fredcwells, friiduh, georg.wittenburg, get.sonic, jfebrer, marcus, sitter, sven.burmeister |
Priority: | NOR | ||
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | desktop file of dolphin |
Description
Jithin Emmanuel
2008-08-13 06:48:17 UTC
I could not reproduce the issue: dolphin . and dolphin .. work without problems (-> dolphin . opens the current working directory, dolphin .. the parent of the working directory). Did you call 'dolphin .' from the terminal or inside a .desktop file? I called it from terminal. Even when I open File manager from applications->system it opens /home/user/Documents . It opens dolphin.desktop and it calls dolphin with arguments dolphin %i -caption "%c" "%u" To reproduce the bug : If there is any open dolphin windows dolphin . will open Documents folder irrespective of where the command is issued. I can reproduce the bug with kde 4.1.1 using fedora 9 Thanks for the update, I could reproduce the issue. I also have the problem using kde 4.1.2 on fedora 9. The problem is still there for kde 4.2 beta 1 . (In reply to comment #0) on KDE 4.1.3 I have the same problems: opening Dolphin on the Desktop always opens the folder "Documents", regardless of what is set in the Dolphin Settings "Start Folder". bye Marcus I'm seeing the same issue on 4.1.86 (using unofficial Debian packages from kde42.debian.net at version 4:4.1.86+svn902162-0r1). Any updates on this, since 4.2 is close to release.. Sorry, no fix has been done yet. I'm sure the fix itself should be trivial, but the startup code has not been written by me and I'm not very familiar with the startup concept :-( I had the same trouble as reported by this bug, since KDE 4.2 beta2 and discovered that it has more to do with the xdg-user-dirs-update command that it is available on more recent distributions. This command which is executed on the session start ensures that the path some directories such as user desktop, documents, pictures, music, etc. corresponds to the user locale so for example if the user change it's locale from english to another, the desktop user path it's not /home/user/Desktop and the directory Desktop it is renamed to it's locale equivalent. The problem with Dolphin and also in the KDE open file dialog is that it starts on the direcory specified by the variable XDG_DOCUMENTS_DIR, in my case it was set to /home/josep/Documents and even if in Dolphin I had another startup folder this one prevailed, also if I changed the Documents folder on SystemSettings when I restarted my KDE session it when back /home/josep/Documents because of xdg-user-dirs-update. So the real fix for this was to edit the file $HOME/.config/user-dirs.update and change the value of XDG_DOCUMENTS_DIR="$HOME/Documents" to XDG_DOCUMENTS_DIR="$HOME" But I think the more convenient fix is to see why XDG_DOCUMENTS_DIR prevailed over $HOME, or in the user paths systemsettings let to put startup folder for filemanagement. This is bretty serious usability bug. openSUSE 11.1 and Mandriva Cooker (4.1.96) are both affected by this. This should got fixed because it has be since 4.1.3 on MDV. I did not go to edit the XDF value but Dolphin start parameter on K-menu. It shows this: dolphin %i -caption "%c" "%u" And when i removed it and placed it only as "Dolphin", it started work right. Even the "open" and "save" dialoges worked correctly when calling from Amarok2, K3b, Inkscape and digiKam. All GTK+ applications were turned to ~/Documents when the icon was set in K-menu as it was and it even affected to all GTK+ applications. So I say the bug is there, not on the XDF, but those who knows can say more by sure... I dont ;-) How can editing dolphin's kmenu entry affect the open-file dialogue used by amarok? If so, is this rather a kdelibs than dolphin specific bug? KDE 4.2 RC1: not fixed yet :( "%u" is a) unnecessary [1] b) confuses the startup part of dolphin because it is passing an empty location(value) (editing the desktop file to strace and write to a file unveals that), removing the quotation marks doesn't invoke dolphin with that empty location(value) and thus makes startup work again. No clue as to why this confuses dolphin or where the startup code is hidden, removing the quotes fixes the issue though. Also please note that respecting the XDG setting for documents path is expected behaviour for open/file dialogs (at least I would assume so). About being able to editing said XDG settings please see bug #177474 (for example). ...committing fixes in a bit. [1] Implementations must take care not to expand field codes into multiple arguments unless explicitly instructed by this specification. This means that name fields, filenames and other replacements that can contain spaces must be passed as a single argument to the executable program after expansion. http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#exec-variables SVN commit 912654 by sitter: Fix Dolphin's desktop file. The additional quotation of %u made dolphin be started with an empty (but existing) location value which made it fall back to XDG's document path as of KDE 4.2. Without quotation it doesn't get that empty value and starts using it's configured default location. BUG: 169016 M +1 -1 dolphin.desktop WebSVN link: http://websvn.kde.org/?view=rev&revision=912654 SVN commit 912655 by sitter: Fix Dolphin's desktop file. The additional quotation of %u made dolphin be started with an empty (but existing) location value which made it fall back to XDG's document path as of KDE 4.2. Without quotation it doesn't get that empty value and starts using it's configured default location. BUG: 169016 M +1 -1 dolphin.desktop WebSVN link: http://websvn.kde.org/?view=rev&revision=912655 Its not working for me. I removed the quotation around %u in my /usr/share/applications/kde4/dolphin.desktop file. But now its always opening the first folder I opened. Created attachment 30371 [details]
desktop file of dolphin
Please elaborate. When I start dolphin with /etc as dir (which would then be first folder I suppose) and then launch it from the menu it will still go to $HOME, which is my defautl folder. I notice the problem when i do open folders from konsole using dolphin . ( to open current directory in dolphin) From konsole if i go to cd /home/Download and do dolphin . it opens Download folder in dolphin. If then I do cd /user and issue dolphin . It still opens Download folder. Sounds like a different problem really. Peter might have some insight... I can reproduce comment 21 in 4.2.0 (Kubuntu) and trunk rev. 925858. The root cause seems to be that DolphinApplication::newInstance() contains the statement KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); This enforces that the 'working directory' of the command line arguments (in this case, ".") is set to the current directory of the Dolphin process, which is the directory where the first Dolphin window was opened, and this results in the mentioned irritating behaviour. Removing that line fixes the issue for me (see the patch below which also removes the corresponding #include). The commit that introduced this line was http://websvn.kde.org:80/?view=rev&revision=718808 with the comment "Init cwd with the current path (dolphin is a KUniqueApplication)". I don't quite understand this - IMHO, the fact that Dolphin is a KUniqueApplication is just the reason why the working directory of the command line arguments should *not* be set to the current path. But maybe I'm overlooking something here? Index: src/dolphinapplication.cpp =================================================================== --- src/dolphinapplication.cpp (revision 925858) +++ src/dolphinapplication.cpp (working copy) @@ -26,7 +26,6 @@ #include <kcmdlineargs.h> #include <kurl.h> #include <QtDBus/QDBusConnection> -#include <QtCore/QDir> DolphinApplication::DolphinApplication() : m_lastId(0) @@ -72,7 +71,6 @@ int DolphinApplication::newInstance() { - KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); static bool first = true; SVN commit 927544 by ppenz: Fixed issue that invoking Dolphin with a specified path is ignored when another Dolphin window is open already. Thanks to Frank Reininghaus for the patch. BUG: 169016 M +0 -2 dolphinapplication.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=927544 SVN commit 927549 by ppenz: Backport of SVN commit 927544: Fixed issue that invoking Dolphin with a specified path is ignored when another Dolphin window is open already. Thanks to Frank Reininghaus for the patch. CCBUG: 169016 M +0 -2 dolphinapplication.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=927549 |