![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1205109
http://bugzilla.opensuse.org/show_bug.cgi?id=1205109#c2
Zim Tsui
Give the attached shell script as a replacement of /usr/bin/emacs a try and report if this does work for you.
I tried that but it doesn't work. Your substitute script simply replaces `UID` with `EUID`. This is redundant because `sudo` already handles that well. Try the below as regular user: ```shell $ sudo sh -c "echo \$UID" 0 $ sudo sh -c "echo \$EUID" 0 ``` The key point is that the directory `/run/user/0` doesn't exist if you have never logged in as root since boot. `su -` or `sudo -i` simply emulates a login shell, but actually doesn't create a new session. See https://github.com/systemd/systemd/issues/7451#issuecomment-346787237 A possible solution is doing nothing about the environment. Since emacs has its own logic about handling the absence of environment variables, why interfere it? -- You are receiving this mail because: You are on the CC list for the bug.