[GH-ISSUE #2547] Discord issues returned #1640

Closed
opened 2026-05-05 08:17:31 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @7twin on GitHub (Mar 9, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2547

Version: firejail version 0.9.59

There was a multitude of issues about this already and all had their fixes, but sadly none of them worked for me, whenever I try to open discord with firejail it exits with execvp: No such file or directory and no window appears.

Starting discord from the start menu makes discord appear, though it won't be listed in firejail --list, so I checked the path, it seems it gets installed into "/opt/discord/Discord", which is possibly the issue?

Some things I remember trying:

  • install the -git/-apparmor/.. versions from aur and git cloned directly from master, all still have the issue
  • run discord via direct path(s) and firejail discord profile specified
  • comment out various instructions inside the profiles as mentioned in other issues (always returning to the original state after)
  • firecfg --clean before installing any other versions, to avoid "symlink exists already"
  • try to install discord-canary instead (same issue)
~/ firejail discord
Reading profile /usr/local/etc/firejail/discord.profile
Reading profile /usr/local/etc/firejail/discord-common.profile
Reading profile /usr/local/etc/firejail/disable-common.inc
Reading profile /usr/local/etc/firejail/disable-devel.inc
Reading profile /usr/local/etc/firejail/disable-passwdmgr.inc
Reading profile /usr/local/etc/firejail/disable-programs.inc
Reading profile /usr/local/etc/firejail/whitelist-common.inc
Reading profile /usr/local/etc/firejail/whitelist-var-common.inc
Parent pid 12129, child pid 12130
Warning: skipping alternatives for private /etc
Warning: skipping pki for private /etc
Warning: skipping crypto-policies for private /etc
Private /etc installed in 22.75 ms
Private /opt installed in 203.11 ms
13 programs installed in 53.16 ms
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Child process initialized in 365.82 ms
execvp: No such file or directory

Parent is shutting down, bye...
Originally created by @7twin on GitHub (Mar 9, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2547 Version: `firejail version 0.9.59` There was a multitude of issues about this already and all had their fixes, but sadly none of them worked for me, whenever I try to open discord with firejail it exits with `execvp: No such file or directory` and no window appears. Starting discord from the start menu makes discord appear, though it won't be listed in `firejail --list`, so I checked the path, it seems it gets installed into "/opt/discord/Discord", which is possibly the issue? Some things I remember trying: - install the -git/-apparmor/.. versions from aur and git cloned directly from master, all still have the issue - run discord via direct path(s) and firejail discord profile specified - comment out various instructions inside the profiles as mentioned in other issues (always returning to the original state after) - `firecfg --clean` before installing any other versions, to avoid "symlink exists already" - try to install discord-canary instead (same issue) ``` ~/ firejail discord Reading profile /usr/local/etc/firejail/discord.profile Reading profile /usr/local/etc/firejail/discord-common.profile Reading profile /usr/local/etc/firejail/disable-common.inc Reading profile /usr/local/etc/firejail/disable-devel.inc Reading profile /usr/local/etc/firejail/disable-passwdmgr.inc Reading profile /usr/local/etc/firejail/disable-programs.inc Reading profile /usr/local/etc/firejail/whitelist-common.inc Reading profile /usr/local/etc/firejail/whitelist-var-common.inc Parent pid 12129, child pid 12130 Warning: skipping alternatives for private /etc Warning: skipping pki for private /etc Warning: skipping crypto-policies for private /etc Private /etc installed in 22.75 ms Private /opt installed in 203.11 ms 13 programs installed in 53.16 ms Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Child process initialized in 365.82 ms execvp: No such file or directory Parent is shutting down, bye... ```
gitea-mirror 2026-05-05 08:17:31 -06:00
Author
Owner

@ghost commented on GitHub (Mar 9, 2019):

Have you tried disabling private-bin yet? Looks like that might be missing something.

$ firejail --ignore=private-bin discord

If that doesn't help, you can experiment by commenting (disabling) some options in the discord profiles. Due to their layout you'll need to edit /etc/firejail/{discord,Discord,discord-canary,DiscordCanary,discord-common}.profile files.

<!-- gh-comment-id:471143893 --> @ghost commented on GitHub (Mar 9, 2019): Have you tried disabling `private-bin` yet? Looks like that might be missing something. $ firejail --ignore=private-bin discord If that doesn't help, you can experiment by commenting (disabling) some options in the discord profiles. Due to their layout you'll need to edit /etc/firejail/{discord,Discord,discord-canary,DiscordCanary,discord-common}.profile files.
Author
Owner

@7twin commented on GitHub (Mar 9, 2019):

@glitsj16 I haven't tried private-bin ignore yet, but here's what it does if I do:

Reading profile /etc/firejail/discord.profile
Reading profile /etc/firejail/discord-common.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Parent pid 3303, child pid 3304
Warning: skipping pki for private /etc
Warning: skipping crypto-policies for private /etc
Private /etc installed in 21.15 ms
Private /opt installed in 255.34 ms
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Child process initialized in 389.64 ms
Error getpwuid: main.c:250 init_cfg: No such file or directory

Parent is shutting down, bye...

Regarding trying to comment out random options: that'll take me a while as there seems to be quite a lot of options to go through, but I'll give it a try.

<!-- gh-comment-id:471146507 --> @7twin commented on GitHub (Mar 9, 2019): @glitsj16 I haven't tried private-bin ignore yet, but here's what it does if I do: ``` Reading profile /etc/firejail/discord.profile Reading profile /etc/firejail/discord-common.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc Parent pid 3303, child pid 3304 Warning: skipping pki for private /etc Warning: skipping crypto-policies for private /etc Private /etc installed in 21.15 ms Private /opt installed in 255.34 ms Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Child process initialized in 389.64 ms Error getpwuid: main.c:250 init_cfg: No such file or directory Parent is shutting down, bye... ``` Regarding trying to comment out random options: that'll take me a while as there seems to be quite a lot of options to go through, but I'll give it a try.
Author
Owner

@ghost commented on GitHub (Mar 9, 2019):

@7twin I realize debugging this could take some time indeed. But with a bit luck there might be a chance this could get fixed sooner rather than later, at least if my assumptions are correct.

Error getpwuid: main.c:250 init_cfg: No such file or directory

That message suggests private-etc needs acces to a few other files, /etc/group and /etc/passwd in particular. Or it might need login.defs. Commands to try:
$ firejail --ignore=private-bin --private-etc=group,passwd discord
$ firejail --ignore=private-bin --private-etc=login.defs discord

<!-- gh-comment-id:471150480 --> @ghost commented on GitHub (Mar 9, 2019): @7twin I realize debugging this could take some time indeed. But with a bit luck there might be a chance this could get fixed sooner rather than later, at least if my assumptions are correct. > Error getpwuid: main.c:250 init_cfg: No such file or directory That message suggests `private-etc` needs acces to a few other files, /etc/group and /etc/passwd in particular. Or it might need login.defs. Commands to try: $ firejail --ignore=private-bin --private-etc=group,passwd discord $ firejail --ignore=private-bin --private-etc=login.defs discord
Author
Owner

@7twin commented on GitHub (Mar 9, 2019):

@glitsj16 first command worked it seems, though the discord log might be interesting:

[Modules] Installing discord_voice@0 from /opt/discord/resources/bootstrap/discord_voice.zip
[Modules] Failed installing discord_voice@0: Error: ENOENT: no such file or directory, open '/opt/discord/resources/bootstrap/discord_voice.zip'
[Modules] Finished module installations. [success: 0] [failure: 5]

Though when I then tried the second command it logged: [Modules] No updates to install re-trying the first one too, so possibly it just worked with both, will give it a more detailed test later today, but that looked promising already, of course the less needs to be allowed for the jail to work the better too.

<!-- gh-comment-id:471153335 --> @7twin commented on GitHub (Mar 9, 2019): @glitsj16 first command worked it seems, though the discord log might be interesting: ``` [Modules] Installing discord_voice@0 from /opt/discord/resources/bootstrap/discord_voice.zip [Modules] Failed installing discord_voice@0: Error: ENOENT: no such file or directory, open '/opt/discord/resources/bootstrap/discord_voice.zip' [Modules] Finished module installations. [success: 0] [failure: 5] ``` Though when I then tried the second command it logged: `[Modules] No updates to install` re-trying the first one too, so possibly it just worked with both, will give it a more detailed test later today, but that looked promising already, of course the less needs to be allowed for the jail to work the better too.
Author
Owner

@ghost commented on GitHub (Mar 9, 2019):

@7twin Progress indeed. It might be a good idea to disable private-etc alltogether and comparing the results with a --noprofile run. I'm not very familiar with discord and/or its modules layout, but you seem to be on a promising track here. Would be nice to see these recent discord troubles fixed, happy hunting 😄 .

<!-- gh-comment-id:471154260 --> @ghost commented on GitHub (Mar 9, 2019): @7twin Progress indeed. It might be a good idea to disable private-etc alltogether and comparing the results with a --noprofile run. I'm not very familiar with discord and/or its modules layout, but you seem to be on a promising track here. Would be nice to see these recent discord troubles fixed, happy hunting :smile: .
Author
Owner

@7twin commented on GitHub (Mar 9, 2019):

@glitsj16 update:

  • it works perfectly fine so far with firejail --ignore=private-bin --private-etc=group,passwd discord
  • firejail --ignore=private-bin --private-etc=login.defs discord most often throws Error getpwuid: main.c:250 init_cfg: No such file or directory
  • if betterdiscord is installed it then fails to load, not sure how I would allow it to load it in either though, as it is relative paths:

image

<!-- gh-comment-id:471200807 --> @7twin commented on GitHub (Mar 9, 2019): @glitsj16 update: - it works perfectly fine so far with `firejail --ignore=private-bin --private-etc=group,passwd discord` - `firejail --ignore=private-bin --private-etc=login.defs discord` most often throws `Error getpwuid: main.c:250 init_cfg: No such file or directory` - if betterdiscord is installed it then fails to load, not sure how I would allow it to load it in either though, as it is relative paths: ![image](https://user-images.githubusercontent.com/32747235/54074630-ef44c300-4262-11e9-9ee5-4da9865aa24b.png)
Author
Owner

@ghost commented on GitHub (Mar 18, 2019):

@7twin I'm looking into updating the discord profiles with dropped private-bin/additions to private-etc. That should at least fix things for the basic setup. As to your question about the plugin, the only remark I can add here is that betterdiscord seems to be abandoned and the AUR page recommends people to use alternative packages. Have you tried any of those suggestions?

<!-- gh-comment-id:474002639 --> @ghost commented on GitHub (Mar 18, 2019): @7twin I'm looking into updating the discord profiles with dropped private-bin/additions to private-etc. That should at least fix things for the basic setup. As to your question about the plugin, the only remark I can add here is that `betterdiscord` seems to be abandoned and the [AUR page](https://aur.archlinux.org/packages/betterdiscord/) recommends people to use alternative packages. Have you tried any of those suggestions?
Author
Owner

@7twin commented on GitHub (Mar 18, 2019):

@glitsj16 yes, the regular betterdiscord got abandoned until v2 comes out, in the meantime there is rauenzis fork that he maintains until v2 comes out and I used the Linux installer, mentioned here: https://rauenzi.github.io/BetterDiscordApp/

I think I saw rauenzis fork on AUR too, but I use the script to install it in always.

<!-- gh-comment-id:474007029 --> @7twin commented on GitHub (Mar 18, 2019): @glitsj16 yes, the regular betterdiscord got abandoned until v2 comes out, in the meantime there is rauenzis fork that he maintains until v2 comes out and I used the Linux installer, mentioned here: https://rauenzi.github.io/BetterDiscordApp/ I think I saw rauenzis fork on AUR too, but I use the script to install it in always.
Author
Owner

@ghost commented on GitHub (Apr 13, 2019):

@7twin Adding group, login.defs and password to private-etc in a1fe101aca automatically closed this. Feel free to reopen when needed.

<!-- gh-comment-id:482799301 --> @ghost commented on GitHub (Apr 13, 2019): @7twin Adding group, login.defs and password to private-etc in https://github.com/netblue30/firejail/commit/a1fe101acad1b1c51c23138adcc2a4dfeb429424 automatically closed this. Feel free to reopen when needed.
Author
Owner

@7twin commented on GitHub (Apr 13, 2019):

@glitsj16 Thanks, sounds exciting, does this also address the plug in or only vanilla discord?

<!-- gh-comment-id:482801821 --> @7twin commented on GitHub (Apr 13, 2019): @glitsj16 Thanks, sounds exciting, does this also address the plug in or only vanilla discord?
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#1640
No description provided.