
On Friday 22 October 2010 19:53:52 Patrick Horgan wrote:
On 10/19/2010 09:06 PM, Ravi wrote:
On Tuesday 19 October 2010 09:56:45 Christian Holmquist wrote:
Is there a POSIX equivalent for My Documents? Without a way to retrieve My Documents, I for one still needs my own wrapper for that..
On newer Linux systems, try $XDG_DOCUMENTS_DIR for an equivalent. Not sure whether it will make it into POSIX.
Data point, I'm on Ubuntu Meercat which is pretty new and doesn't define this. I only get:
XDG_SESSION_COOKIE=caae1d00b0a381de2973b0004748ac01-1287635546.203915-55787 7136 XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
One needs to use xdg-user-dirs to obtain the correct values: http://freedesktop.org/wiki/Software/xdg-user-dirs Both the premier Linux desktop environments KDE & Gnome support the spec; see, for example: http://norman.hooper.name/blog/post/32/changing-user-directory-names-in- gnome-and-kde/ As far as I can tell, other desktop environments offer partial support as well. For you case of Ubuntu: http://www.andrewbolster.info/blog/2010/06/customised-user-directories-in- ubuntu/ If you have Gnome installed, you will also have two packages, xdg-user-dirs and xdg-utils, installed on your system. The documentation accompanying them should provide complete details. Regards, Ravi