You are not logged in.
Hello.
I am trying to start two different X-sessions (using xfce) on two different users (let's call them user1 and user2).
My intention is to run certain applications within containers, and I would prefer to have them within their own X environment for added security.
At first I used gdm as it does so automatically, but I didn't like the limited degree to which it can be customized if I do not install gnome.
So I decided to simply skip using display managers and start xfce by itself.
Problem:
After disabling gdm and restarting, I simply started xfce as my main user and switched to another tty, logged into the secondary user, and typed
the following (original source):
startxfce4 -- vt2 (if using tty2) It worked the one time I tried it a few days ago without a problem, but when I tried doing this again yesterday, I got the following result:
(EE)
Fatal server error:
(EE) Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE)
xinit: unexpected signal 2
X connection to :0 broken (explicit kill or server shutdown).And if I then type:
startxfce -- :1 vt2 In order to use display :1 instead of display :0, both instances of xfce are started on tty1 overlayed on top of each other (will include image if requested).
- I can even start applications from both users and drag and drop between them.
Questions:
Primary: How do I get it to work as it did on the first day (two different xfce sessions, on two different tty's, exclusively controlled by their user)?
Secondary: Is this not some kind of security issue?
Is not tty1 assigned to user1 after signing in, and especially after starting a xorg session on it?
How is it possible that user2 (on tty2) would have any power over the xorg session on tty1, or the ability to start/display anything on it?
- I can for instance, start thunar form both respective users and drag and drop files between if within a shared directory.
Last edited by clime (2022-10-31 01:06:32)
Offline
Possibly related, but I'm not at all sure: https://gitlab.xfce.org/xfce/xfce4-session/-/issues/147.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Use startx/xinit to launch the server, see the last link below about what should be in your xinitrc (before startxfce) and also how to re-use the login VT.
X11 is user agnostic.
You can limit who gets to access the server and will often run into issues w/ other IPC (dbus), but every client on the server can talk to every other client on the server, regardless which UID ran that client.
What apparently happened in your second call is that startxfce re-used the running X11 server (possibly because of the bug linked by cfr) and so both xfce "sessions" (or parts thereof) run on the same X11 server.
Offline