:: Re: [DNG] Missing /run/user/$uid
Góra strony
Delete this message
Reply to this message
Autor: Gregory Nowak
Data:  
Dla: Alessandro Vesely via Dng
Temat: 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-manager@???