mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1741] --x11=xorg can't connect to X on Arch #1181
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eevee on GitHub (Jan 20, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1741
I can run the exact same xauth command from within
firejail --noprofile bash, so the problem is something that only happens when firejail itself runs xauth.xhost +si:localuser:$USERseems to fix it (at the cost of a less secure X), which suggests an access control problem… though the error doesn't mention access control. I notice my$XAUTHORITYpoints to a file in/tmp, which seemed suspicious since firejail shadows/tmpwith a tmpfs while running xauth, but settingXAUTHORITY=$HOME/.Xauthoritydoesn't change anything. I don't know enough about X guts to speculate further. :)I'm on Arch using firejail 0.9.52. I can't think of anything strange I've done to X that might be responsible. A brief poll of my followers found that it works for someone on Ubuntu but doesn't work for another Arch user, so I'm tempted to blame Arch?
@eevee commented on GitHub (Jan 20, 2018):
Ah, it looks like
xhostcircumvents the custom authority file entirely; with it, xterm runs fine (the manpage says it crashes) and I can read keystrokes from other clients withxinput test. Well, damn.@netblue30 commented on GitHub (Feb 3, 2018):
The most secure way to go is a simple xterm in xpehyr (xorg-server-xephyr package in Arch). Replace eth0 with your ethernet interface:
I have no idea what is happening when you go directly with bash, instead of a real x11 program. Your terminal is still running in the old X11 session, so there could be some interactions there.
@chiraag-nataraj commented on GitHub (May 29, 2019):
@eevee, is this still an issue for you?
@BetaRays commented on GitHub (Jul 29, 2019):
The problem also appears on Gentoo using
sys-apps/firejail-0.9.60. It seems the .Xauthority file isn't accessible when runningxauth, as runningXAUTHORITY= xauth -v -f "$(mktemp)" generate :0 MIT-MAGIC-COOKIE-1 untrustedgives the same error (but running it with the previous XAUTHORITY variable set seems to work).@l29ah commented on GitHub (Sep 11, 2019):
I observe the same problem in my Gentoo on 0.9.61.
@smitsohu commented on GitHub (Oct 8, 2019):
Is it possible you added a
-nolisten localto the Xorg command line? There is an identical issue whenx11 xorgis combined with any of thenetoptions.In this case there is no abstract X11 socket, which in turn means that when Firejail temporarily mounts a tmpfs on /tmp, the X11 socket in /tmp/.X11-unix is covered and xauth cannot connect. One possible solution is to simply mount the X11 socket on the tmpfs, so we are sure xauth can see it.
@smitsohu commented on GitHub (Oct 8, 2019):
Anyway, that's a bug! I will push a fix. Probably it's easiest to generate the new Xauthority file in /run/firejail/mnt, where we have a multi-purpose tmpfs mounted already.
@l29ah commented on GitHub (Feb 15, 2020):
Still doesn't work on today's master.
Nope:
@moll commented on GitHub (May 27, 2020):
I can confirm that
--x11=xorgwith Firejail v0.9.62 fails with the same "unable to open display" error talked about above due to thexauthinvocation ind1967d21f4/src/firejail/x11.c (L1201)probably not having access to the original authority file.