What | Removed | Added |
---|---|---|
Flags | needinfo?(zimtsui@gmail.com) |
(In reply to Dr. Werner Fink from comment #1) > 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?