[GH-ISSUE #1499] Setting DISPLAY in --env setting does not work #1001

Closed
opened 2026-05-05 07:17:25 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @chiraag-nataraj on GitHub (Aug 28, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1499

I have an xpra client already running and would like to attach another sandbox to the existing client. As per https://firejail.wordpress.com/documentation-2/x11-guide/, I go ahead and specify env DISPLAY=:480 in my profile, but it doesn't work. The window opens on the regular display. I get the same behavior if I explicitly pass DISPLAY=:480 firejail .... The difference is that in the first case, with --debug, I get a line like DISPLAY=:0 parsed as 0, while in the second, I get DISPLAY=:480 parsed as 480. The behavior is the same however - I get the new window opening in the normal display.

Originally created by @chiraag-nataraj on GitHub (Aug 28, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1499 I have an xpra client already running and would like to attach another sandbox to the existing client. As per https://firejail.wordpress.com/documentation-2/x11-guide/, I go ahead and specify `env DISPLAY=:480` in my profile, but it doesn't work. The window opens on the regular display. I get the same behavior if I explicitly pass `DISPLAY=:480 firejail ...`. The difference is that in the first case, with `--debug`, I get a line like `DISPLAY=:0 parsed as 0`, while in the second, I get `DISPLAY=:480 parsed as 480`. The behavior is the same however - I get the new window opening in the normal display.
gitea-mirror 2026-05-05 07:17:25 -06:00
Author
Owner

@netblue30 commented on GitHub (Aug 30, 2017):

I have to parse --env (or env in the profile) for DISPLAY. Bug!

DISPLAY=:480 firejail .... should work fine. How do you test to see in what display it was opened?

<!-- gh-comment-id:326052949 --> @netblue30 commented on GitHub (Aug 30, 2017): I have to parse --env (or env in the profile) for DISPLAY. Bug! DISPLAY=:480 firejail .... should work fine. How do you test to see in what display it was opened?
Author
Owner

@chiraag-nataraj commented on GitHub (Aug 31, 2017):

Yeah, never mind - setting the environment variable outside seems to work fine.

<!-- gh-comment-id:326433546 --> @chiraag-nataraj commented on GitHub (Aug 31, 2017): Yeah, never mind - setting the environment variable outside seems to work fine.
Author
Owner

@netblue30 commented on GitHub (Sep 2, 2017):

I still have to put in a fix for --env, let's mark it as an enhancement for now.

<!-- gh-comment-id:326752137 --> @netblue30 commented on GitHub (Sep 2, 2017): I still have to put in a fix for --env, let's mark it as an enhancement for now.
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#1001
No description provided.