[GH-ISSUE #3354] Option --quiet suppresses important warnings #2105

Open
opened 2026-05-05 08:47:03 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @rdiez on GitHub (Apr 14, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3354

Option --quiet is simply documented as follows: Turn off Firejail's output.

Without this option, Firejail is too verbose:
------8<------8<------8<------
$ firejail --noprofile sh -c "echo a"

^[]0;firejail sh -c echo a ^Ga
Parent pid 21368, child pid 21369

Parent is shutting down, bye...
------8<------8<------8<------

Note the "^[]0;" at the beginning: Those are escape characters for some terminal. And the same with "^Ga" at the end.

Firejail should at least check whether STDOUT is a terminal before outputting such colour or terminal codes. Otherwise, the output looks weird in a log file.

Other tools like Git offer more control, see for example:
git -c color.ui=always status

I am using Ubuntu 18.04.4 LTS, which comes with Firejail version 0.9.52, a rather old version indeed. So maybe this has already been improved.

In any case, because the output looks ugly, I started using --quiet . The trouble is, Firejail stops outputting warnings like these:

Warning: you are not allowed to change /tmp to read-write
Warning: cannot create a new user namespace, going forward without it...

If some option is not working correctly, and you specified --quiet , you may never realise. Firejail needs an option to suppress unnecessary banners, echoing the command to run, and otherwise unimportant information, but such warnings should still be output.

Originally created by @rdiez on GitHub (Apr 14, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3354 Option --quiet is simply documented as follows: Turn off Firejail's output. Without this option, Firejail is too verbose: ------8<------8<------8<------ $ firejail --noprofile sh -c "echo a" ^[]0;firejail sh -c echo a ^Ga Parent pid 21368, child pid 21369 Parent is shutting down, bye... ------8<------8<------8<------ Note the "^[]0;" at the beginning: Those are escape characters for some terminal. And the same with "^Ga" at the end. Firejail should at least check whether STDOUT is a terminal before outputting such colour or terminal codes. Otherwise, the output looks weird in a log file. Other tools like Git offer more control, see for example: git -c color.ui=always status I am using Ubuntu 18.04.4 LTS, which comes with Firejail version 0.9.52, a rather old version indeed. So maybe this has already been improved. In any case, because the output looks ugly, I started using --quiet . The trouble is, Firejail stops outputting warnings like these: Warning: you are not allowed to change /tmp to read-write Warning: cannot create a new user namespace, going forward without it... If some option is not working correctly, and you specified --quiet , you may never realise. Firejail needs an option to suppress unnecessary banners, echoing the command to run, and otherwise unimportant information, but such warnings should still be output.
gitea-mirror added the
enhancement
label 2026-05-05 08:47:03 -06:00
Author
Owner

@ghost commented on GitHub (Apr 14, 2020):

You can get the latest stable release from the firejail PPA. I'm not implying that there isn't any room for improvement with regards to firejail's verbosity/error handling, but it would be handy if you can confirm these issues are still present on the latest stable release.

<!-- gh-comment-id:613635444 --> @ghost commented on GitHub (Apr 14, 2020): You can get the latest stable release from the [firejail PPA](https://launchpad.net/~deki/+archive/ubuntu/firejail). I'm not implying that there isn't any room for improvement with regards to firejail's verbosity/error handling, but it would be handy if you can confirm these issues are still present on the latest stable release.
Author
Owner

@rdiez commented on GitHub (Apr 15, 2020):

I have created a separate issue #3356 for the terminal control codes.

<!-- gh-comment-id:613873658 --> @rdiez commented on GitHub (Apr 15, 2020): I have created a separate issue #3356 for the terminal control codes.
Author
Owner

@rdiez commented on GitHub (Apr 15, 2020):

As requested, I have tested the following with the latest Firejail release version 0.9.62. I am using Ubuntu 18.04.4 LTS, so that new version came from the mentioned PPA.

  1. This command:

firejail --noprofile --read-write=/tmp sh -c "echo a"

issues warning:

Warning: you are not allowed to change /tmp to read-write

Adding option --quiet silences the warning. As I said, I think that should not happen.

  1. This command:

firejail --noprofile --blacklist=/ --noroot sh -c "echo a"

issues warning:

Warning: cannot create a new user namespace, going forward without it...

Adding option --quiet silences the warning. This is more serious than case (1), because a protection is being skipped.

<!-- gh-comment-id:613883475 --> @rdiez commented on GitHub (Apr 15, 2020): As requested, I have tested the following with the latest Firejail release version 0.9.62. I am using Ubuntu 18.04.4 LTS, so that new version came from the mentioned PPA. 1. This command: `firejail --noprofile --read-write=/tmp sh -c "echo a"` issues warning: `Warning: you are not allowed to change /tmp to read-write` Adding option --quiet silences the warning. As I said, I think that should not happen. 2. This command: `firejail --noprofile --blacklist=/ --noroot sh -c "echo a"` issues warning: `Warning: cannot create a new user namespace, going forward without it...` Adding option --quiet silences the warning. This is more serious than case (1), because a protection is being skipped.
Author
Owner

@rusty-snake commented on GitHub (Apr 15, 2020):

quiet is for programs which can pipe data over stdout to an other program where firejails you will break.

Solutions:

  1. print warnings to stderr
  2. print warnings to syslog
<!-- gh-comment-id:613896886 --> @rusty-snake commented on GitHub (Apr 15, 2020): `quiet` is for programs which can pipe data over stdout to an other program where firejails you will break. Solutions: 1. print warnings to stderr 2. print warnings to syslog
Author
Owner

@rdiez commented on GitHub (Apr 15, 2020):

I would print warnings to stderr by default. Not many people have a habit of looking at syslog when running commands.

<!-- gh-comment-id:613931866 --> @rdiez commented on GitHub (Apr 15, 2020): I would print warnings to stderr by default. Not many people have a habit of looking at syslog when running commands.
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#2105
No description provided.