Seems the first time I try to access the K_Menu System Menu, and the My Documents location
is not yet specified, that the dialog appears immediately. Good idea, but should the
dialog box appear when accessing the System Menu or when accessing System Menu/Documents
Folder? Seems the latter makes more sense. :)
The dialog box still does not allow or like any location other than $HOME/Documents.
Further if the user changes this location then where is that information being stored?
A little searching revealed an xdg spec
(
http://freedesktop.org/wiki/Software/xdg-user-dirs).
Seems there should be a file located at /etc/xdg/user-dirs.conf for system defaults and at
$HOME/.config/user-dirs.dirs for overriding those locations.
Seems $HOME/.config/user-dirs.dirs is supposed to look something like this:
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_DOCUMENTS_DIR="$HOME/documents"
XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/images"
XDG_VIDEOS_DIR="$HOME/videos"
XDG_DESKTOP_DIR="$HOME"
XDG_TEMPLATES_DIR="$HOME"
XDG_PUBLICSHARE_DIR="$HOME"
Seems there should be a script installed named xdg-user-dirs-update. Although there is a
xdg-tools package installed, there is no such file on my Slackware 12.2 system. I
don't seem to find the file on subsequent Slackware releases. Starting 13.1, there is
an xdg-settings tool, but I don't know if the intent is the same as
xdg-user-dirs-update.
When I tried using the new dialog box and changing the directory, I received the following
error message in the log:
sh: xdg-user-dirs-update: command not found
Makes sense because I don't have that file installed. Probably then should have an
error trap to verify the script exists before trying to execute. :)
If I understand all of this correctly, then the new dialog boxes should be updating that
user file. If the file does not exist and xdg-user-dirs-update does not exist, I lean
toward just creating the $HOME/.config/user-dirs.dirs file and inserting the
XDG_DOCUMENTS_DIR value to what the user typed.