XDG_DOCUMENTS_DIR should be set to $HOME
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kdelibs |
Invalid
|
Medium
|
|||
kde4libs (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
XDG_DOCUMENTS_DIR is set to $HOME/Documents wich is the cause of MANY problems. at first scripts with relative paths. click on this scripts will setz them to $HOME/Documents. so the most will not even work. try it
#! /bin/sh
mkdir ./this\ is\ a\ test
save it, make it exec and click on it. it will create a new dir in ~/Documents, not in $HOME. this bad behavor is the caus that many installers can not be startet in KDE with a click and have to started over terminal. for example all the loki installers, ati graphicsdriver-
next the annoying filedialog wich starts always in ~/Documents insteat of $HOME will be fixed
Test it in terminal: type
kdialog --getopenfilename ./
the same result when you open the filedialog in choqok, kopete and all the other applications
next that some reports, like that from java will always end in ~/Documents
reports like hs_err_pid31129.log should not be in the document folder.
This causes lots of mistakes in some other applications too. like in "vbam" a nintento gameboy emulator. if you choose the recent opened roms the problem will display them but if you click them it will not found because they save relative pathes. the first start the rom was in ~/Downloads/
so PLEASE change this bad behavior to make kubuntu friendlier for mouseusers without terminalknowledge and all the stressed people with problems in scripts and the crazy poeple who want to select a file in $HOME but have to click to it on the filedialog on kubuntu
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: kubuntu-desktop 1.239
ProcVersionSign
Uname: Linux 3.0.0-11-generic i686
ApportVersion: 1.23-0ubuntu1
Architecture: i386
Date: Sun Sep 25 03:24:39 2011
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
SourcePackage: kubuntu-meta
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in kdelibs: | |
importance: | Unknown → High |
status: | Unknown → New |
Changed in kdelibs: | |
importance: | High → Medium |
status: | New → Invalid |
As the name XDG_DOCUMENTS_DIR suggests, it is supposed to point to the Documents dir, not the home dir.
So to explain the issues here..
a) the referenced installers all use loki which apparently is utterly bogus software as a script *must not* be assuming a relative envrionment (e.g. temporary data of a self-extraction installer ought to be in /tmp and installation paths ought to be absolute anyway). That said, if the loki installer does not work properly with an arbitrary working directory it is a bug in the installer and should be fixed there
b) Whether random execution of scripts really should switch the working directory to documents or not is something that probably should be discussed in depth (over at bugs.kde.org or the kde-devel mailing lists, as this is the responsible part). I personally find it a bit weird that if you run a script in /tmp it would have its working directory set as ~/Documents.
c) Even considering b) a script should still not operate on relative paths but absolute paths of sorts (such as mkdir foo would really be mkdir ~/foo if the home dir is where the new dir should be created)
d) The fact that `kdialog --getopenfilename ./` does not work is a bug in kdialog and should be filed at bugs.kde.org - for what it is worth, it actually works in a random directory, just not in ~, which is a bit weird... again though if the home is the dir where the dialog should be focused then instead of ./, `~` or even better $HOME should be used
e) The fact that random applications open in documents folder is proper behavior. If an application has desire for a particular directory they can easily define this directory. Defaulting to XDG_DOCUMENTS_DIR (if set and present) seems to me like a very sane choice as most files are documents of sorts (that is... a video player might want to default to VIDEOS and a music player might default to MUSIC...)
To sum this up. The issue is within kde software and should as such be discussed and (if necessary) be addressed there rather than Kubuntu. And all but one of the highlighted issues are actually due to badly written software which should be fixed.
Please report this at bugs.kde.org, thank you very much.