[GH-ISSUE #84] Option to only set the "name" of the jail #49

Closed
opened 2026-05-05 04:53:54 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @pyamsoft on GitHub (Oct 17, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/84

Attempting to launch chromium in firejail with no arguments other than attempting to specify a name will cause chromium to crash, saying it cannot find the display. If the --name argument is omitted, chromium will launch just fine as expected. Attempting to run chromium with --noprofile fails as well when trying to specify a name.

firejail --name=GENERIC chromium
Reading profile /etc/firejail/chromium.profile
Reading profile /etc/firejail/disable-mgmt.inc
Reading profile /etc/firejail/disable-secret.inc
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-history.inc
Parent pid 12617, child pid 12618
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Child process initialized
No protocol specified
[1:1:1016/174803:ERROR:browser_main_loop.cc(243)] Gtk: cannot open display: :0

parent is shutting down, bye...

This error appears most likely because the --name option sets a new hostname, which causes the user to be unable to use the display for any graphical programs. Terminal programs appear to work just fine. You can launch graphical programs by using the xhost program to allow all client connections, but this is unsafe for the Xserver (however using xhost + before attempting the above command does result in success).

Would it be possible to add a seperate option, such as --hostname, or some other equivalent that will change the hostname, and use --name as a flag for just firejail to handle named jail instances of programs?

Using the latest stable version of Firejail from the AUR (0.9.30) on ArchLinux 64 bit.

Originally created by @pyamsoft on GitHub (Oct 17, 2015). Original GitHub issue: https://github.com/netblue30/firejail/issues/84 Attempting to launch chromium in firejail with no arguments other than attempting to specify a name will cause chromium to crash, saying it cannot find the display. If the --name argument is omitted, chromium will launch just fine as expected. Attempting to run chromium with --noprofile fails as well when trying to specify a name. ``` firejail --name=GENERIC chromium Reading profile /etc/firejail/chromium.profile Reading profile /etc/firejail/disable-mgmt.inc Reading profile /etc/firejail/disable-secret.inc Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-history.inc Parent pid 12617, child pid 12618 Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Child process initialized No protocol specified [1:1:1016/174803:ERROR:browser_main_loop.cc(243)] Gtk: cannot open display: :0 parent is shutting down, bye... ``` This error appears most likely because the --name option sets a new hostname, which causes the user to be unable to use the display for any graphical programs. Terminal programs appear to work just fine. You can launch graphical programs by using the xhost program to allow all client connections, but this is unsafe for the Xserver (however using xhost + before attempting the above command does result in success). Would it be possible to add a seperate option, such as --hostname, or some other equivalent that will change the hostname, and use --name as a flag for just firejail to handle named jail instances of programs? Using the latest stable version of Firejail from the AUR (0.9.30) on ArchLinux 64 bit.
gitea-mirror 2026-05-05 04:53:54 -06:00
Author
Owner

@netblue30 commented on GitHub (Oct 17, 2015):

Yes, it makes sense. I'll decouple them.

<!-- gh-comment-id:148915274 --> @netblue30 commented on GitHub (Oct 17, 2015): Yes, it makes sense. I'll decouple them.
Author
Owner

@netblue30 commented on GitHub (Oct 18, 2015):

Implemented on master branch.

<!-- gh-comment-id:149005232 --> @netblue30 commented on GitHub (Oct 18, 2015): Implemented on master branch.
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#49
No description provided.