Bug 311770

Summary: Some KDE applications inappropriately use XDG_DOCUMENTS_DIR
Product: [Unmaintained] kdelibs Reporter: Graeme Hewson <bugs>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Graeme Hewson 2012-12-16 12:01:50 UTC
Some KDE applications, when reading or writing files, inappropriately use XDG_DOCUMENTS_DIR. This is the Documents path set through System Settings / Account Details / Paths (~/Documents by default).

After clicking on a file link in Akregator, the default directory in the Save As dialog is XDG_DOCUMENTS_DIR. (If the user changes the directory in the dialog, this is remembered as the default for subsequent saves until the next time Akregator, or Akregator embedded in Kontact, is started.)

The default directory in the Open Image dialog for Gwenview after clicking File / Open... is also XDG_DOCUMENTS_DIR.

In both these cases, the Documents directory is not appropriate. Appropriate uses, I would say, are for applications like LibreOffice.

I suspect this is a general problem, and not merely a problem with Akregator and Gwenview, because issuing

cd $HOME && kdialog --getopenfilename ./

causes the dialog to open in ~/Documents; I would expect it to open in ~/.

There were some bug reports, such as bug 282735 and bug 201072, which were closed as direct or indirect duplicates of bug 183534 (now resolved fixed). However, the latter was only about KRunner, and I believe the other bug reports were closed prematurely. Some progress has been made since they were first opened, though, because Dolphin defaults to ~/ and Konqueror defaults to ~/Downloads.
Comment 1 Justin Zobel 2022-11-10 22:32:27 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 2 Graeme Hewson 2022-11-11 11:15:36 UTC
In Plasma 5.25.5, some applications correctly use the Downloads path specified in System Settings / Applications / Locations.

The kdialog example above opens in ~/ correctly.

However, Gwenview also opens in $HOME, ignoring the Pictures path in Locations.

Since the problem is not now as I reported it, I'm closing the ticket.