Re: [DNG] Missing /run/user/$uid
Hello Alessandro, Consolekit doesn't handle the /run/user stuff quite well. XDG_RUNTIME_DIR isn't being populated and the user folder not initialized. A workaround I came up with, to make sure XDG_RUNTIME_DIR is always populated, is to insert the following lines in your .xsessionrc: if [ ! -d "$XDG_RUNTIME_DIR" ] && [ -d "/run/user/$(id -u)/" ]; then export XDG_RUNTIME_DIR="/run/user/$(id -u)/" fi If XDG_RUNTIME_DIR is populated but the folder doesn't exists, then follow Gregory's indications. Cheers, Ludovic On Tue, 10 Nov 2020 13:41:25 +0100 Alessandro Vesely via Dng wrote: > Hi all, > > I create a terminal window for a different user using a script like > so: #! /bin/bash > # > # Extract auth of current user and run x-terminal-emulator in new user > > printf -v altgksu 'export DISPLAY=:0; touch ~/.Xauthority; echo "%s"| > xauth nmerge -; dbus-launch --exit-with-x11 x-terminal-emulator;' > "$(xauth nextract - $DISPLAY)" su -l -c "$altgksu" $1 > > > When $1 is not root, I get errors from, e.g., geany, when it tries to > create a "uim" subdirectory: > > stat("/run/user/111/uim", 0x7ffee78a9180) = -1 ENOENT (No such file > or directory) mkdir("/run/user/111/uim", 0700)= -1 ENOENT (No > such file or directory) write(2, "uim_helper_get_pathname() > failed"..., 33) = 33 > > There is no folder 111 in /run/user. Should I create it in the above > script? But then, who created /run/user/0? > > > Best > Ale pgphQ2taDChk4.pgp Description: Signature digitale OpenPGP ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Missing /run/user/$uid
On Tue, Nov 10, 2020 at 01:41:25PM +0100, Alessandro Vesely via Dng wrote: > I create a terminal window for a different user using a script like so: > #! /bin/bash > # > # Extract auth of current user and run x-terminal-emulator in new user > > printf -v altgksu 'export DISPLAY=:0; touch ~/.Xauthority; echo "%s"| xauth > nmerge -; dbus-launch --exit-with-x11 x-terminal-emulator;' "$(xauth nextract > - $DISPLAY)" > su -l -c "$altgksu" $1 > > > When $1 is not root, I get errors from, e.g., geany, when it tries to create > a "uim" subdirectory: > > stat("/run/user/111/uim", 0x7ffee78a9180) = -1 ENOENT (No such file or > directory) > mkdir("/run/user/111/uim", 0700)= -1 ENOENT (No such file or > directory) > write(2, "uim_helper_get_pathname() failed"..., 33) = 33 > > There is no folder 111 in /run/user. Should I create it in the above script? > But then, who created /run/user/0? If this is your own personal machine, it probably wouldn't hurt. As root: mkdir /run/user/111 chmod 700 /run/user/111 chown user.group /run/user/111 As for your other question, /run/user/0 was probably created by a program running as root for root. If there's a better way to do what you want, or if what I propose isn't a good idea, someone else will probably chime in. Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
[DNG] Missing /run/user/$uid
Hi all, I create a terminal window for a different user using a script like so: #! /bin/bash # # Extract auth of current user and run x-terminal-emulator in new user printf -v altgksu 'export DISPLAY=:0; touch ~/.Xauthority; echo "%s"| xauth nmerge -; dbus-launch --exit-with-x11 x-terminal-emulator;' "$(xauth nextract - $DISPLAY)" su -l -c "$altgksu" $1 When $1 is not root, I get errors from, e.g., geany, when it tries to create a "uim" subdirectory: stat("/run/user/111/uim", 0x7ffee78a9180) = -1 ENOENT (No such file or directory) mkdir("/run/user/111/uim", 0700)= -1 ENOENT (No such file or directory) write(2, "uim_helper_get_pathname() failed"..., 33) = 33 There is no folder 111 in /run/user. Should I create it in the above script? But then, who created /run/user/0? Best Ale -- ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng