[GH-ISSUE #1065] --x11=xorg "unable to open display" but runs anyway #721

Closed
opened 2026-05-05 06:31:27 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @xahare on GitHub (Jan 23, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1065

xlogo does run. this also happens with firefox.
host is ubuntu 16.04 amd_64 running in virtualbox with guest extensions

$ firejail --x11=xorg xlogo
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-passwdmgr.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 4897, child pid 4898
/usr/bin/xauth: (argv):1:  unable to open display ":0".
Child process initialized

Parent is shutting down, bye...
Originally created by @xahare on GitHub (Jan 23, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1065 xlogo does run. this also happens with firefox. host is ubuntu 16.04 amd_64 running in virtualbox with guest extensions ``` $ firejail --x11=xorg xlogo Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-passwdmgr.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 4897, child pid 4898 /usr/bin/xauth: (argv):1: unable to open display ":0". Child process initialized Parent is shutting down, bye... ```
gitea-mirror 2026-05-05 06:31:27 -06:00
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 23, 2017):

Huh. I get a "No protocol specified" and "Error: Can't open display: :0" and xlogo doesn't launch. I'm running on Debian sid/experimental x86_64.

<!-- gh-comment-id:274651366 --> @chiraag-nataraj commented on GitHub (Jan 23, 2017): Huh. I get a "No protocol specified" and "Error: Can't open display: :0" and `xlogo` doesn't launch. I'm running on Debian sid/experimental x86_64.
Author
Owner

@netblue30 commented on GitHub (Jan 24, 2017):

Working fine for me on Debian stable:

$ firejail --x11=xorg xlogo
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-passwdmgr.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 3363, child pid 3364
Child process initialized
<!-- gh-comment-id:274798675 --> @netblue30 commented on GitHub (Jan 24, 2017): Working fine for me on Debian stable: ````` $ firejail --x11=xorg xlogo Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-passwdmgr.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 3363, child pid 3364 Child process initialized `````
Author
Owner

@netblue30 commented on GitHub (Jan 24, 2017):

When I run --x11=xorg firefox I get a warning: Xlib: extension "RANDR" missing on display ":0.0". Other than that, firefox (version 45.6.0) seems to be working fine. It is possible newer firefox versions behave differently, or don't work at all.

<!-- gh-comment-id:274799578 --> @netblue30 commented on GitHub (Jan 24, 2017): When I run --x11=xorg firefox I get a warning: Xlib: extension "RANDR" missing on display ":0.0". Other than that, firefox (version 45.6.0) seems to be working fine. It is possible newer firefox versions behave differently, or don't work at all.
Author
Owner

@valoq commented on GitHub (Jan 24, 2017):

Is there another window server running?
If X11 access is blocked but e.g. access to a wayland server is available, which is the case on modern gnome desktops, the application will still run, but display this warning.

<!-- gh-comment-id:274831151 --> @valoq commented on GitHub (Jan 24, 2017): Is there another window server running? If X11 access is blocked but e.g. access to a wayland server is available, which is the case on modern gnome desktops, the application will still run, but display this warning.
Author
Owner

@xahare commented on GitHub (Jan 25, 2017):

seems a difference between newer and older xorg then. there must be a way to automate testing across a few distros. this approach looks promising, https://github.com/Oefenweb/ansible-fail2ban/blob/master/Vagrantfile

@valoq when using xwayland, couldn't query security extension on display ":0"

<!-- gh-comment-id:274991602 --> @xahare commented on GitHub (Jan 25, 2017): seems a difference between newer and older xorg then. there must be a way to automate testing across a few distros. this approach looks promising, https://github.com/Oefenweb/ansible-fail2ban/blob/master/Vagrantfile @valoq when using xwayland, couldn't query security extension on display ":0"
Author
Owner

@xahare commented on GitHub (Jan 26, 2017):

[edit] not firejail related. gimp and printsrc just show blank backgrounds with or without firejail. maybe its virtualbox.

just confirmed this in ubuntu desktop. only the terminal windows showed in xwd. not the background, any of the desktop/window manager widgets, or file manager that was open. tried again in xterm, and again, only the gnome-terminal windows showed against a black background.

any idea where to go from here? where could the bug be?

user@work-terminal:~$ cat rootdump.sh 
xwd -root > root.xwd
user@work-terminal:~$ firejail --x11=xorg ./rootdump.sh 
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-passwdmgr.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 19026, child pid 19027
/usr/bin/xauth: (argv):1:  unable to open display ":0".
Child process initialized

Parent is shutting down, bye...
user@work-terminal:~$ gimp root.xwd 

<!-- gh-comment-id:275410593 --> @xahare commented on GitHub (Jan 26, 2017): [edit] not firejail related. gimp and printsrc just show blank backgrounds with or without firejail. maybe its virtualbox. just confirmed this in ubuntu desktop. only the terminal windows showed in xwd. not the background, any of the desktop/window manager widgets, or file manager that was open. tried again in xterm, and again, only the gnome-terminal windows showed against a black background. any idea where to go from here? where could the bug be? ``` user@work-terminal:~$ cat rootdump.sh xwd -root > root.xwd user@work-terminal:~$ firejail --x11=xorg ./rootdump.sh Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-passwdmgr.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 19026, child pid 19027 /usr/bin/xauth: (argv):1: unable to open display ":0". Child process initialized Parent is shutting down, bye... user@work-terminal:~$ gimp root.xwd ```
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#721
No description provided.