You are not logged in.
... without using XWayland
At first I have not installed XWayland. When I tried to run a gui app as another non-root user, it failed "cannot open display" The command I tried was:
sudo --preserve-env=XDG_SESSION_TYPE --preserve-env=WAYLAND_DISPLAY --preserve-env=DISPLAY --preserve-env=XDG_RUNTIME_DIR -u internet firefoxI have noticed that the DISPLAY variable was not set.
Then I have installed XWayland and ran xhost si:localuser:internet which is what I'm using on my old xorg setup and ran the command without any environment variables - and it worked - but I have a high DPI screen and it seems like scale does not work properly in XWayland yet (it's blurry).
Is there a way to open an application as another non-root user without using XWayland?
Last edited by kox (2022-01-02 18:59:08)
Offline
You need to give the second user full access to the wayland socket that is stored in XDG_RUNTIME_DIR.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Thanks for your reply. Do you know where the socket file is relative to the dir?
Offline
I got it. It works. Thanks.
Maybe it's a topic for a different question but I wonder how secure it would be. I'm using secondary users to sandbox my home directory from applications they run. Is it possible to leak filesystem access via a shared socket or is it "only" what is displayed on screen and perhaps keyboard input? I was using xorg earlier and I know it's not a perfect security isolation, but I hoped that Wayland would offer some improvement here.
Offline