Am 23.10.2013 13:01, schrieb Simon McVittie: > On 23/10/13 08:07, Gabriel Mainberger wrote: >> user@machine:~/Work$ gcc `pkg-config --cflags --libs glib-2.0` -o run run.c >> >> user@machine:~/Work$ ./run >> /run/user/0 > > What's your $XDG_RUNTIME_DIR environment variable? > > If it's /run/user/0, then GLib is behaving as expected, and the bug is > in some other component (which should either not set this variable, > unset this variable when it switches uid, or set this variable to a more > appropriate value for uid 1000).
What seems related is the but in gdm3 which fails to start when libpam-systemd is not installed [1]. libpam-systemd is responsible for creating and setting XDG_RUNTIME_DIR. So I assume Gabriel didn't have this package installed. Is that correct? Creating a directory in /run/user requires root-privileges (that's why it's done in a PAM module), and the fallback thus is in the users home directory. Just fyi: $ echo $XDG_RUNTIME_DIR /run/user/1000 $ ./run /run/user/1000 $ unset XDG_RUNTIME_DIR $ ./run /home/michael/.cache So from a cursory look, it seems like glib is behaving correctly and as Simon suspects, some other component simply sets XDG_RUNTIME_DIR to an incorrect value. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724731 -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature