[GH-ISSUE #375] Arch Linux: firejail --x11 kills X server on exit #270

Closed
opened 2026-05-05 05:28:26 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @fd0 on GitHub (Mar 22, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/375

Hi, thanks for writing firejail!

When using --x11 to start a separate X server for a program, exiting the program also kills the normal X server so my session is terminated. This seems to be a bug.

I can reproduce this on Archlinux with firejail compiled from git (r712.431d39d-1) and xpra-winswitch version 0.16.2-1.

Is there anything I can do to help solving this bug?

Originally created by @fd0 on GitHub (Mar 22, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/375 Hi, thanks for writing firejail! When using `--x11` to start a separate X server for a program, exiting the program also kills the normal X server so my session is terminated. This seems to be a bug. I can reproduce this on Archlinux with firejail compiled from git (`r712.431d39d-1`) and `xpra-winswitch` version 0.16.2-1. Is there anything I can do to help solving this bug?
gitea-mirror 2026-05-05 05:28:26 -06:00
Author
Owner

@netblue30 commented on GitHub (Mar 22, 2016):

So far I couldn't get it to run at all with xpa-winswitch on my Arch box. I'll try to look into it.

Something to keep in mind: never run xpra as root, it will mess things up big time. After running xpra as root and before you log out from your session, make sure ~/.Xauthority file is still owned by your user. Somehow xpra makes it owned by root, and next time when you start your computer you won't be able to login.

<!-- gh-comment-id:199832521 --> @netblue30 commented on GitHub (Mar 22, 2016): So far I couldn't get it to run at all with xpa-winswitch on my Arch box. I'll try to look into it. Something to keep in mind: never run xpra as root, it will mess things up big time. After running xpra as root and before you log out from your session, make sure ~/.Xauthority file is still owned by your user. Somehow xpra makes it owned by root, and next time when you start your computer you won't be able to login.
Author
Owner

@fd0 commented on GitHub (Mar 22, 2016):

Is there a reason you chose Xpra over Xephyr? Thinking about it, Xephyr seems to be the more obvious choice...

<!-- gh-comment-id:199848274 --> @fd0 commented on GitHub (Mar 22, 2016): Is there a reason you chose Xpra over Xephyr? Thinking about it, Xephyr seems to be the more obvious choice...
Author
Owner

@netblue30 commented on GitHub (Mar 22, 2016):

You can use Xephyr right now:

$ Xephyr -ac -br -noreset -screen 800x600 :22 &
$ DISPLAY=:22 firejail --net=eth0 --blacklist=/tmp/.X11-unix/x0 firefox

I am running it on display :22, and I disable display :0 sockets. A nice touch would be to also start a light window manager such as OpenBox on display :22 in order to be able to move and resize the window.

I'll look into bringing Xephyr support in, thanks for the idea.

<!-- gh-comment-id:199859180 --> @netblue30 commented on GitHub (Mar 22, 2016): You can use Xephyr right now: ``` $ Xephyr -ac -br -noreset -screen 800x600 :22 & $ DISPLAY=:22 firejail --net=eth0 --blacklist=/tmp/.X11-unix/x0 firefox ``` I am running it on display :22, and I disable display :0 sockets. A nice touch would be to also start a light window manager such as OpenBox on display :22 in order to be able to move and resize the window. I'll look into bringing Xephyr support in, thanks for the idea.
Author
Owner

@netblue30 commented on GitHub (Mar 26, 2016):

I added support for Xephyr (--x11=xephyr)

<!-- gh-comment-id:201832540 --> @netblue30 commented on GitHub (Mar 26, 2016): I added support for Xephyr (--x11=xephyr)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#270
No description provided.