mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5196] Remove shell command (Weechat and Irssi cannot work with firejail if you use fish shell) #2913
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2913
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @v1k7-992 on GitHub (Jun 12, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5196
Description
Weechat and irssi cannot work with firejail if you are using fish shell. I think the problem occurs if you are using fish shell. It might be related to fish shell itself, but it seems cleaning out all the profiles using
firecfg --cleanmakes them both working again, even under fish shell. I haven't tested if this makes an impact or not, but I do have a bunch of aliases configured under my fish shell~/.config/fish/config.fish, so adding a dummy alias might help.Steps to Reproduce
Steps to reproduce the behavior
weechatorirssiExpected behavior
If you ran either weechat or irssi, they should be working
Actual behavior
Both of the IRC clients refuse to work at all, ie. terminal output displays nothing except if you have configured your fish shell in
~/.config/fish/config.fishyou might get some error messages telling you, that that file cannot be sourced.Switching in the terminal emulator, to bash, does not make this problem go away. Probably because my users $SHELL variable is set to `/bin/fish'.
Behavior without a profile
What changed calling
LC_ALL=C firejail --noprofile /usr/bin/weechatin a terminal?Nothing.
Running
firecfg --cleanfixes the problem. Or running the weechat directly using `/usr/bin/weechat'Same applies to irssi.
Additional context
Any other detail that may help to understand/debug the problem
Environment
firejail --version).git rev-parse HEAD).Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail weechat@rusty-snake commented on GitHub (Jun 13, 2022):
We should really make
shell nonethe default.#5195, #3434, #3448, #2934, #2857, NixOS/nixpkgs#160389, ...
@netblue30 commented on GitHub (Jun 19, 2022):
I'm in the process of making shell none default. Things will break! I depend in this moment on the CI test after pushing the commit.
The idea is to use the user shell stored in /etc/passwd if --shell=whatever is not on the command line. SHELL env variable will be disregarded. After that we'll move to fix all fish problems.
@rusty-snake commented on GitHub (Jun 19, 2022):
But why do we run a shell in the sandbox? 99% of the profile have
shell none(there are 57 non-redirect*.profiles w/tshell none;firefox-common-addons.profileand similiar included) and work just fine but if you dropshell nonefrom them things can get compilcated. I just don't get why it is necessary to run a shell instead of a plain execve. If a program needs a shell for any reasons we can still useshell /bin/sh.@netblue30 commented on GitHub (Jun 19, 2022):
Some corner cases:
But at the end of the day most programs will run directly under execve(program-name).
You are right. Yesterday I instrumented profstats to count it and got 1124 shell none programs out of 1191. Most of them should work fine under shell none, we just forgot to put it in.
@netblue30 commented on GitHub (Jun 20, 2022):
I've just removed --shell. Some of the tests are still failing, but mostly is working fine.
@Rosika2 commented on GitHub (May 26, 2023):
Hi all, 👋
my system: Linux Lite 6.2, 64 bit
I experienced the same issue with
weechatas I´m usingfishas my default shell.After reading through this thread, especially noticing what VikB92 came up with I seem to get
weechatrunning in firejail by prefixing the command with the bash environment variable.From a terminal running
fishas the default shell:env SHELL=/usr/bin/bash firejail weechatFor me it seems to be a practical solution.
Any thoughts about that?
Many greetings from Rosika 🙂
@kmk3 commented on GitHub (Jul 11, 2023):
Closing this as it shipped in 0.9.72.
For any new issues, please test with the latest git version as there were more
related changes.