-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option --quiet suppresses important warnings #3354
Comments
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. |
I have created a separate issue #3356 for the terminal control codes. |
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.
issues warning:
Adding option --quiet silences the warning. As I said, I think that should not happen.
issues warning:
Adding option --quiet silences the warning. This is more serious than case (1), because a protection is being skipped. |
Solutions:
|
I would print warnings to stderr by default. Not many people have a habit of looking at syslog when running commands. |
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.
The text was updated successfully, but these errors were encountered: