Version: (using KDE KDE 3.4.1) Installed from: Compiled From Sources Compiler: GCC-3.4.4 OS: Linux The "Documents=" paramater in the 'kdeglobals' file is set in the Control Center: System Administration -> Paths: Documents path KDE applications use this as their default working directory if started by KLauncher. However, non-KDE applications do not. If started by KLauncher (i.e. from the K-Menu or an icon somewhere) the default working directory for all apps -- both KDE and non-KDE -- should be set to the directory specified in the "Documents=" paramater in the 'kdeglobals' file. Note that this default working directory must be overridden if the 'desktop' file contains: "path=<work_path>".
KLauncher starts both KDE and non-KDE applications with $HOME as their default working directory, unless specified otherwise with Path=.
Not if you have: System Administration -> Paths: Documents path set to something other than $HOME.
Further research: Summary changed The "Documents" directory always works with KDE apps even if started in a DE or WM other than KDE. However, when opening a non-KDE application in KDE, the default directory to open/save files is not the "Documents" directory. This *is* a bug and needs to be fixed. The "Documents" directory should be the default "Work path" for all applications when opened in KDE (with KLauncher).
Created attachment 24684 [details] Untested patch for kde4, please test
Created attachment 24918 [details] Slightly modified patch I have tested this patch with KDE4 TRUNK and several non-kde applications. I find that not all applications correctly respond to the current directory when started from a Konsole. So, it made no change with those. It did work correctly with gEdit and The GIMP. The only application that I had an issue with was Xfig which does save to the current directory when opened from a Konsole but did not save to the Documents directory when opened from the menu. So, I have concluded that it works and the attached diff should be committed and this bug closed.
SVN commit 818803 by dfaure: chdir to the user's "Documents" path before launching an application; this makes non-kde apps honour the kde document directory, (e.g. gEdit, gimp, openoffice...) BUG: 108510 M +6 -0 kinit.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=818803
If the intent of this patch was to make all applications started with klauncher or krunner have a default initial working directory of ~/Documents, not $HOME, and it appears it is, then it's in conflict with the expectations of those wanting to migrate effortlessly from KDE3, and of the reporters of the following subsequently-reported KDE bugs: 183534, 201072, 203495, 230310. Default working or Save directories of applications are surely best-decided by the application, using xdg-user-dir-lookup() code, and not badly-decided by the desktop manager.
The design underlying this "fix" seems utterly broken, please revert it. What happening now (and I don't know whether that was planned) is that *every* application (eg xterm ...) launched by KDE starts with ~/Documents as its working directory; this is - as Lawrence says - counter to everything we've learned to expect from Unix systems in the last 30 years. The workaround to create launchers that have $HOME as their starting directory doesn't work (for me anyway) for those that KDE restarts automatically at start-up time.
Please revert it. This is a very serious bug. Bug 302903 Bug 183534 is cause by this "FIX"
Yes this was the intent. But indeed, while it makes sense for most GUI apps, it doesn't make sense for terminals. If we can't do this right for all cases, let's not do it at all. I'll revert.
Git commit f659ebf30dde67798926e9ab0a7671a96602174b by David Faure. Committed on 05/10/2012 at 12:00. Pushed by dfaure into branch 'KDE/4.9'. By popular demand, revert the call to chdir(documentPath). This was an attempt to make the KDE document path work in non-KDE gui apps (such as openoffice) (#108510). But it makes terminals start in ~/Documents, which users don't expect. Related: bug 183534, bug 302903 M +1 -9 kinit/kinit.cpp M +1 -6 kio/kio/krun.cpp http://commits.kde.org/kdelibs/f659ebf30dde67798926e9ab0a7671a96602174b