intgr / ego

Alter Ego: run Linux desktop applications under a different local user
MIT License
128 stars 1 forks source link

Document the differences between sudo and machinectl modes #62

Open intgr opened 3 years ago

intgr commented 3 years ago

This is not properly explained anywhere, although mentioned in README and the sudo fallback warning

warning: machinectl (systemd-container) is not installed
warning: Falling back to 'sudo', some desktop integration features may not work

IIRC:

intgr commented 3 years ago

Looks like with sudo, the user XDG_RUNTIME_DIR directory for target user isn't created

% ego --sudo 
[ego@X ~]$ echo $XDG_RUNTIME_DIR

[ego@X ~]$ ls -la /run/user/$UID
ls: cannot access '/run/user/979': No such file or directory

% ego --machinectl
Connected to the local host. Press ^] three times within 1s to exit session.
[ego@X ~]$ echo $XDG_RUNTIME_DIR
/run/user/979
[ego@X ~]$ ls -lad /run/user/$UID
drwx------ 7 ego ego 180 Jul  2 12:34 /run/user/979