[GH-ISSUE #710] Question about PS1 / PROMPT_COMMAND #486

Closed
opened 2026-05-05 05:57:07 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @reinerh on GitHub (Aug 13, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/710

A user asked on the Debian BTS [1] why PS1 is forced when spawning a shell, and if it can be disabled (or made configurable), as it might be customized by the user to indicate something, which would be hidden by firejail.

Can you please explain why it is currently changed?

1: https://bugs.debian.org/834256

Originally created by @reinerh on GitHub (Aug 13, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/710 A user asked on the Debian BTS [1] why PS1 is forced when spawning a shell, and if it can be disabled (or made configurable), as it might be customized by the user to indicate something, which would be hidden by firejail. Can you please explain why it is currently changed? 1: https://bugs.debian.org/834256
gitea-mirror 2026-05-05 05:57:07 -06:00
Author
Owner

@nuxwin commented on GitHub (Aug 13, 2016):

@reinerh

See also https://github.com/netblue30/firejail/issues/704

@netblue30 Directly related ;)

<!-- gh-comment-id:239640669 --> @nuxwin commented on GitHub (Aug 13, 2016): @reinerh See also https://github.com/netblue30/firejail/issues/704 @netblue30 Directly related ;)
Author
Owner

@nuxwin commented on GitHub (Aug 14, 2016):

@netblue30

I think that you should not set the PROMPT_COMMAND environment variable in mainline. Instead, you should simply call interpreters with the -l option as unique argument, excepted if the user called firejail with argument that are not firejail options.

<!-- gh-comment-id:239655873 --> @nuxwin commented on GitHub (Aug 14, 2016): @netblue30 I think that you should not set the PROMPT_COMMAND environment variable in mainline. Instead, you should simply call interpreters with the `-l` option as unique argument, excepted if the user called firejail with argument that are not firejail options.
Author
Owner

@netblue30 commented on GitHub (Aug 14, 2016):

I just needed some sort of indication I am in a sandbox, so I made the prompt green. I'll add a config option in /etc/firejail/firejail.config. I already have something similar to disable the title of x11 window when running xephyr.

<!-- gh-comment-id:239670303 --> @netblue30 commented on GitHub (Aug 14, 2016): I just needed some sort of indication I am in a sandbox, so I made the prompt green. I'll add a config option in /etc/firejail/firejail.config. I already have something similar to disable the title of x11 window when running xephyr.
Author
Owner

@nuxwin commented on GitHub (Aug 14, 2016):

@netblue30

Well, hardcoding the prompt with color in mainline is really a bad thing for many reasons:

  • Normally, colored prompt should be set through interpreter initialization files. (Once #704 willl be fixed, you'll be able to set the prompt colors through the initialization files).
  • Hard coding color in mainline involve that tput and terminfo are always available. That is not always the case. Think of --chroot option usage with a fs that doesn't provide them.

My opinion is that FireJail should stick to standards and stay out of any fancy. You should concentrate on the main purpose which is the isolation.

Note that my sentence here is only intented to improve the project. There is nothing offensive.

Thank you for your interest.

<!-- gh-comment-id:239674759 --> @nuxwin commented on GitHub (Aug 14, 2016): @netblue30 Well, hardcoding the prompt with color in mainline is really a bad thing for many reasons: - Normally, colored prompt should be set through interpreter initialization files. (Once #704 willl be fixed, you'll be able to set the prompt colors through the initialization files). - Hard coding color in mainline involve that `tput` and `terminfo` are always available. That is not always the case. Think of `--chroot` option usage with a fs that doesn't provide them. My opinion is that FireJail should stick to standards and stay out of any fancy. You should concentrate on the main purpose which is the isolation. Note that my sentence here is only intented to improve the project. There is nothing offensive. Thank you for your interest.
Author
Owner

@netblue30 commented on GitHub (Aug 15, 2016):

The prompt was removed!

<!-- gh-comment-id:239856591 --> @netblue30 commented on GitHub (Aug 15, 2016): The prompt was removed!
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#486
No description provided.