mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3509] firejail with wine #2208
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#2208
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 @Joe23232 on GitHub (Jul 15, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3509
Is it possible to configure
wineto always launch throughfirejailso that if I typewine, it will simply by default go throughfirejail?When I install a game through
wineand it creates a shortcut, it creates it as*.desktoprather than*.lnkthat is typically done on Windows. I guess the*.desktopis set to point towinebut if I can somehow figure out how to by default getwineto go throughfirejailinstead, I guess the game will by defauly also launch throughfirejailbefore going throughwine, am I correct?@bbhtt commented on GitHub (Jul 16, 2020):
Wine has a profile https://github.com/netblue30/firejail/blob/master/etc/profile-m-z/wine.profile
If you've set up Firejail using
sudo firecfg,it'll launch through FirejailNot sure about your second question. You can launch a desktop file on a terminal using
gtk-launch abcd.desktopprovided it's in default locations.@Joe23232 commented on GitHub (Jul 16, 2020):
Hey mate, so like does
firecfgforce all applications to go throughfirejailas it seems that is what that command does? I want to force only specific applications such aswineto go throughfirejail. Would you happen to know how I would do this?@rusty-snake commented on GitHub (Jul 16, 2020):
@Joe23232 commented on GitHub (Jul 20, 2020):
Hey man thanks for the help. One other thing how would I create different profiles. So I can restrict wine having certain access to certain parts of my system (such as only being able to write to my
~/Desktopfolder but not read from~/Desktopbut maybe for something like Chromium, it can have read and write rights to~/Desktop?@rusty-snake commented on GitHub (Jul 20, 2020):
A write only access is not possible. There a two ways to workaround:
blacklist ${HOME}/Desktop/*This allows to create/read/write files in ~/Desktop which are created after the sandbox was started.mkdir -p ~/.config/firejailvim ~/.config/firejail/restricted-wine.profilefirejail --profile=restricted-wine wine 'C:\…'@Joe23232 commented on GitHub (Jul 20, 2020):
So you can only do read-only but not write-only? Cause you typed
read-only ${HOME}/farso I guess I can't typewrite-only?If I am understanding this correctly, this allows wine to have read and write permissions? Cause
blacklistwould normally mean having no access rights at all if I am understanding this correctly?env WINEPREFIX=~/bazSorry mate what doesevneven mean?include ${CFG}/wine.profileI am a bit confused as to why this line needs to be added in. I thought that if I am tellingfirejailto use therestricted-winprofile (as shown infirejail --profile=restricted-wine wine 'C:\…') then wouldn'twineknow that it has to use from this drectory~/.config/firejail/restricted-wine.profile? Maybe I am failing to understand what$(CFG)means?@rusty-snake commented on GitHub (Jul 20, 2020):
What do you mean exactly with write-only?
The second part is just an example on how to use a custom profile. Using a different WINEPREFIX is common if you use different profiles.
Not wine, firejail. This usually expands to
include /etc/firejail/wine.profile. Without it the restricted-wine is more permissive then the wine.profile.@Joe23232 commented on GitHub (Jul 20, 2020):
I mean like the application can write to the directory but it can't read from the directory. So the first option.
I understand how
WINEPREFIXworks but I am a bit confused with theevnpart. Is this part ofwineorfirejail?Forgive me for my lack of understanding but if you already have a file
~/.config/firejail/restricted-wine.profilewhich essentially tellsfirejailto what restrictions you need etc, how doesinclude ${CFG}/wine.profilethis line make it more restrictive?@rusty-snake commented on GitHub (Jul 20, 2020):
What is your goal? I don't see why this is useful.
man firejail-profile:Its easier to set the extra restrictions for ~/Desktop in this profile and use the rest form wine.profile then coping the restrictions from wine.profile to restricted-wine.profile. If you just set these few read-only/blacklist commands and not include disable-common.inc, set nonewprivs, seccomp, ... your "restricted-wine" is not restricted.
@Joe23232 commented on GitHub (Jul 20, 2020):
Ok so like on the
~/Desktop, when installing a game, it puts a*.desktopfile inside the~/Desktopdirectory. Therefore I want it to have write permissions (so it can write such files) but no reading permissions.Ah I see thanks mate :)
Ah I see it just essentially imports the restrictions from a default config file. I get it now.
@rusty-snake commented on GitHub (Jul 20, 2020):
Using
mkfile+whitelistwould be the best, if not useblacklist ${HOME}/Desktop/*.@rusty-snake commented on GitHub (Oct 1, 2020):
I'm closing here due to inactivity, please fell free to request to reopen if you have more questions.
@Joe23232 commented on GitHub (Oct 2, 2020):
Cool, thank you.
On Fri, Oct 2, 2020 at 4:11 AM rusty-snake notifications@github.com wrote: