[GH-ISSUE #942] If name of the sandbox isn't defined... #641

Closed
opened 2026-05-05 06:20:04 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @0xBRM on GitHub (Nov 26, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/942

... it should be the name of the application by default.

Originally created by @0xBRM on GitHub (Nov 26, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/942 ... it should be the name of the application by default.
gitea-mirror 2026-05-05 06:20:04 -06:00
Author
Owner

@netblue30 commented on GitHub (Nov 27, 2016):

What happens if you have multiple instances of the same application sandboxed?

<!-- gh-comment-id:263123355 --> @netblue30 commented on GitHub (Nov 27, 2016): What happens if you have multiple instances of the same application sandboxed?
Author
Owner

@0xBRM commented on GitHub (Nov 27, 2016):

That's precisely why I proposed this. To make it more hassle free to use --join=application.
Basically, yesterday I was playing around with firejail and trying to join an existing firefox sandbox, but couldn't even though the name matched. Later I read the documentation only to find out I had to name the sandbox beforehand.
If there are extra instance of the same application sandboxed, then maybe the naming convention should be as follows:

First application: application1
Second application without explicitly issuing --join: application2
and so on

<!-- gh-comment-id:263138573 --> @0xBRM commented on GitHub (Nov 27, 2016): That's precisely why I proposed this. To make it more hassle free to use --join=application. Basically, yesterday I was playing around with firejail and trying to join an existing firefox sandbox, but couldn't even though the name matched. Later I read the documentation only to find out I had to name the sandbox beforehand. If there are extra instance of the same application sandboxed, then maybe the naming convention should be as follows: First application: application1 Second application without explicitly issuing --join: application2 and so on
Author
Owner

@0xBRM commented on GitHub (Nov 27, 2016):

Just found an odd behaviour. Firejail allows you to have two sandboxes with the exact same name.

I opened firefox with firejail --name=firefox firefox and launched mpv on youtube with the extension play with mpv. Firefox was then closed, but mpv, the child process, is still working, so, issuing firejail --list results in

λ desktop ~ → firejail --list
5998:desktop:firejail --name=firefox firefox 
6301:desktop:firejail --list 

Then I opened another instance of firefox, using the same firejail --name=firefox firefox command and issued the same command to list active sandboxes:

λ desktop ~ → firejail --list
λ desktop ~ → firejail --list
5998:desktop:firejail --name=firefox firefox 
6312:desktop:firejail --name=firefox firefox 
6477:desktop:firejail --list 

and then I tried to join an existing 'firefox' sandbox:

λ desktop ~ → firejail --join=firefox firefox
Switching to pid 6001, the first child process inside the sandbox
Child process initialized
λ desktop ~ → firejail --list                
5998:desktop:firejail --name=firefox firefox 
6312:desktop:firejail --name=firefox firefox 
6502:desktop:firejail --list 

... which one did it join?

<!-- gh-comment-id:263143553 --> @0xBRM commented on GitHub (Nov 27, 2016): Just found an odd behaviour. Firejail allows you to have two sandboxes with the exact same name. I opened firefox with ```firejail --name=firefox firefox``` and launched mpv on youtube with the extension play with mpv. Firefox was then closed, but mpv, the child process, is still working, so, issuing ```firejail --list``` results in ```bash λ desktop ~ → firejail --list 5998:desktop:firejail --name=firefox firefox 6301:desktop:firejail --list ``` Then I opened another instance of firefox, using the same ```firejail --name=firefox firefox``` command and issued the same command to list active sandboxes: ```bash λ desktop ~ → firejail --list λ desktop ~ → firejail --list 5998:desktop:firejail --name=firefox firefox 6312:desktop:firejail --name=firefox firefox 6477:desktop:firejail --list ``` and then I tried to join an existing 'firefox' sandbox: ```bash λ desktop ~ → firejail --join=firefox firefox Switching to pid 6001, the first child process inside the sandbox Child process initialized λ desktop ~ → firejail --list 5998:desktop:firejail --name=firefox firefox 6312:desktop:firejail --name=firefox firefox 6502:desktop:firejail --list ``` ... which one did it join?
Author
Owner

@netblue30 commented on GitHub (Nov 28, 2016):

OK, I'll mark it as an enhancement and try to bring it in.

<!-- gh-comment-id:263326592 --> @netblue30 commented on GitHub (Nov 28, 2016): OK, I'll mark it as an enhancement and try to bring it in.
Author
Owner

@0xBRM commented on GitHub (Nov 29, 2016):

Thanks!

<!-- gh-comment-id:263443722 --> @0xBRM commented on GitHub (Nov 29, 2016): Thanks!
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 25, 2018):

As far as I know, this still isn't in. @netblue30 Is there an easy way to keep track of how many instances of an application are open? Or is it easier to just generate a random number and append it to the program's name?

<!-- gh-comment-id:407876842 --> @chiraag-nataraj commented on GitHub (Jul 25, 2018): As far as I know, this still isn't in. @netblue30 Is there an easy way to keep track of how many instances of an application are open? Or is it easier to just generate a random number and append it to the program's name?
Author
Owner

@chiraag-nataraj commented on GitHub (May 20, 2019):

This should be in...closing.

<!-- gh-comment-id:494031017 --> @chiraag-nataraj commented on GitHub (May 20, 2019): This should be in...closing.
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#641
No description provided.