Sat 08 Mar 2014 11:39:34 AM UTC, comment #2:
### The XDG spec has grown and includes environmental parameters related to desktop sessions and so on.
For example, $XDG_RUNTIME_DIR
I frequently want to run gksu with the -u switch : gksu -u lesser [commands]
(Instead of running gksu without a -u switch, thus defaulting to running as root).
Here is a (non-representative, but specific to my machine) sample:
XDG_CONFIG_HOME is /root/.config
XDG_DATA_DIRS is /usr/local/share/:/usr/share/:/usr/share/mdm/
XDG_DATA_HOME is ~/.local/share
XDG_RUNTIME_DIR is /run/user/0
XDG_SEAT is seat0
XDG_SESSION_COOKIE is d012284f9cacbc963a4b500900000a23-1393081962.511687-1819563469
XDG_SESSION_ID is c1
XDG_VTNR is 7
In particular, gksu should *not* be passing "XDG_RUNTIME_DIR" into the gksu user's environment!
See a script that modifies the XDG_* variables in the environment using env as the command parameter to gksu , then runs the finally wanted command using this new env, at http://pastie.org/8898241. After running vim from gksu with this script as a setup.
The errors that are reported when the XDG* environment are not cleaned up depend on the application that's being run. *XDG_RUNTIME_DIR* is the most likely troublemaker.
|