mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1658] firejail with wine and optirun #1117
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#1117
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 @silvervellum on GitHub (Nov 25, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1658
Hello!
I would like to use firejail with wine and optirun (to use a dedicated Nvidia graphics card) but I didn't find a case such this documented.
I tried a bit to work with this setup and I would like to share my notes and have a confirmation that my approach is correct. I am using firejail 9.50 on Debian Testing.
Firejail can be used with wine as everything else:
firejail wine <path/to/application>In this way the wine.profile is loaded and the application should be jailed as expected.
To run the application with a dedicated Nvidia graphics card one has to use optirun:
optirun <options> wine <path/to/application>How to use firejail whit this? Given that I have to jail wine, I tried at first with this syntax (somewhere else on the Internet I found another user doing the same):
optirun <options> firejail wine <path/to/application>In this way I expected to see all the commands following optirun to run on the dedicated graphics card. Instead, despite that optirun ran and firejail loaded the wine.profile, the application launched with wine used the integrated graphics card. I didn't look at the documentation but at first it seems counterintuitive.
Then I changed the order of the commands and it worked, sort of:
firejail optirun <options> wine <path/to/application>In fact firejail tried to load a profile for the first command it saw, in this case optirun, but given that there were no optirun profile it loaded the generic default one. Therefore I manually chose the correct profile:
firejail --profile=/etc/firejail/wine.profile optirun <options> wine <path/to/application>To verify that everything works I made a simple test:
firejail --profile=/etc/firejail/wine.profile --private optirun wine notepadand notepad was exposed to the fake home directory.
Therefore in this way everything seems to work as expected, but is it the correct way to do it? Thank you!
@SkewedZeppelin commented on GitHub (Nov 25, 2017):
firejail optirun [program]is probably the right way. I haven't used Bumblebee in a while, but afaik opti/primusrun was like LD_PRELOAD and you can't LD_PRELOAD on suid binaries.Maybe someone can add an '--optirun' option to allow running with optirun instead of having to
firejail --profile=realprogram optirun programEdit: closed by accident.
@rusty-snake commented on GitHub (Aug 4, 2021):
Can we close here?