-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to use umu inside bwrap #130
Comments
Yes, it's possible to use |
Also, I had thoughts to implement creating custom bwrap containers in the next release to allow modifying the filesystem (e.g., not exposing the entire home directory). However, this use case would be very niche and it would be in the configuration file usage. For example:
|
By the way, since it seems you use bwrap, umu sources it's own copy of bwrap so you actually don't need to install the bwrap package. You can find it in |
can you give me a script with this actually working export VKBASALT_CONFIG_FILE=/home/behe/Games/Genshin-Impact/vkBasalt.conf
export ENABLE_VKBASALT=0
export DXVK_CONFIG_FILE=/home/behe/Games/Genshin-Impact/dxvk.conf
export WINEPREFIX=/home/behe/Games/HOLLOW-KNIGHT
export GAMEID=0
export MANGOAPP_CONFIGFILE=~/.config/MangoHud/MangoHud.conf
export MANGOHUD=0
bwrap \
--die-with-parent \
--dev /dev \
--proc /proc \
--ro-bind /sys /sys \
--ro-bind /nix /nix \
--ro-bind $XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--ro-bind /home/behe/.config/MangoHud/MangoHud.conf /home/behe/.config/MangoHud/MangoHud.conf \
--ro-bind /home/behe/Games/Shaders /home/behe/Games/Shaders \
--ro-bind /etc/fonts /etc/fonts \
--ro-bind /lib64 /lib64 \
--ro-bind /lib /lib \
--ro-bind /etc/localtime /etc/localtime \
--ro-bind /etc/host.conf /etc/host.conf \
--ro-bind /etc/zoneinfo /etc/zoneinfo \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind /etc/hosts /etc/hosts \
--ro-bind /etc/profiles/per-user/behe /etc/profiles/per-user/behe \
--ro-bind /etc/static/profiles/per-user/behe /etc/static/profiles/per-user/behe \
--ro-bind $XDG_DATA_HOME/icons $XDG_DATA_HOME/icons \
--ro-bind $XDG_DATA_HOME/themes $XDG_DATA_HOME/themes \
--ro-bind $HOME/.config/gtk-4.0 $HOME/.config/gtk-4.0 \
--ro-bind $HOME/.config/gtk-3.0 $HOME/.config/gtk-3.0 \
--ro-bind /run/current-system/sw/bin /run/current-system/sw/bin \
--ro-bind /run/current-system/sw/share/vulkan/implicit_layer.d /run/current-system/sw/share/vulkan/implicit_layer.d \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--ro-bind /sys/dev/char /sys/dev/char \
--ro-bind /run/opengl-driver /run/opengl-driver \
--ro-bind /run/opengl-driver-32 /run/opengl-driver-32 \
--ro-bind $HOME/.Xresources $HOME/.Xresources \
--perms 0700 \
--dir /tmp/.wine-1000 \
--bind $WINEPREFIX $WINEPREFIX \
--bind $HOME/.cache/mesa_shader_cache $HOME/.cache/mesa_shader_cache \
--bind $HOME/.cache/python $HOME/.cache/python \
--bind $HOME/.local/share/umu/ $HOME/.local/share/umu/ \
--bind $HOME/.local/share/Steam/compatibilitytools.d $HOME/.local/share/Steam/compatibilitytools.d \
--dev-bind /dev/dri /dev/dri \
--dev-bind /dev/input /dev/input \
--setenv XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--setenv DISPLAY $DISPLAY \
--setenv WINEPREFIX $WINEPREFIX \
--setenv PATH $PATH \
--setenv GAMEID $GAMEID \
--setenv HOME $HOME \
--setenv MANGOHUD $MANGOHUD \
--setenv VKBASALT_CONFIG_FILE $VKBASALT_CONFIG_FILE \
--setenv ENABLE_VKBASALT $ENABLE_VKBASALT \
--setenv DXVK_CONFIG_FILE $DXVK_CONFIG_FILE \
-- \
umu $WINEPREFIX/drive_c/Hollow_Knight/hollow_knight.exe |
this would be epic to be honest just removing access from my home directory is what I use bwrap for in the first place |
Do you mind bind |
@R1kaB3rN ok I made it work export VKBASALT_CONFIG_FILE=/home/behe/Games/Genshin-Impact/vkBasalt.conf
export ENABLE_VKBASALT=0
export DXVK_CONFIG_FILE=/home/behe/Games/Genshin-Impact/dxvk.conf
export WINEPREFIX=/home/behe/Games/HOLLOW-KNIGHT
export GAMEID=0
export MANGOAPP_CONFIGFILE=~/.config/MangoHud/MangoHud.conf
export MANGOHUD=0
bwrap \
--die-with-parent \
--dev /dev \
--proc /proc \
--ro-bind /sys /sys \
--ro-bind /nix /nix \
--ro-bind $XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--ro-bind /home/behe/.config/MangoHud/MangoHud.conf /home/behe/.config/MangoHud/MangoHud.conf \
--ro-bind /home/behe/Games/Shaders /home/behe/Games/Shaders \
--ro-bind /etc/fonts /etc/fonts \
--ro-bind /lib64 /lib64 \
--ro-bind /lib /lib \
--ro-bind /etc/localtime /etc/localtime \
--ro-bind /etc/host.conf /etc/host.conf \
--ro-bind /etc/zoneinfo /etc/zoneinfo \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind /etc/hosts /etc/hosts \
--ro-bind /etc/profiles/per-user/behe /etc/profiles/per-user/behe \
--ro-bind /etc/static/profiles/per-user/behe /etc/static/profiles/per-user/behe \
--ro-bind $XDG_DATA_HOME/icons $XDG_DATA_HOME/icons \
--ro-bind $XDG_DATA_HOME/themes $XDG_DATA_HOME/themes \
--ro-bind $HOME/.config/gtk-4.0 $HOME/.config/gtk-4.0 \
--ro-bind $HOME/.config/gtk-3.0 $HOME/.config/gtk-3.0 \
--ro-bind /run/current-system/sw/bin /run/current-system/sw/bin \
--ro-bind /run/current-system/sw/share/vulkan/implicit_layer.d /run/current-system/sw/share/vulkan/implicit_layer.d \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--ro-bind /sys/dev/char /sys/dev/char \
--ro-bind /run/opengl-driver /run/opengl-driver \
--ro-bind /run/opengl-driver-32 /run/opengl-driver-32 \
--ro-bind $HOME/.Xresources $HOME/.Xresources \
--ro-bind /etc/passwd /etc/passwd \
--ro-bind /etc/ssl /etc/ssl \
--ro-bind /etc/static /etc/static \
--perms 0700 \
--dir /tmp/.wine-1000 \
--bind $WINEPREFIX $WINEPREFIX \
--bind $HOME/.cache/mesa_shader_cache $HOME/.cache/mesa_shader_cache \
--bind $HOME/.cache/python $HOME/.cache/python \
--bind $HOME/.local/share/umu/ $HOME/.local/share/umu/ \
--bind $HOME/.local/share/Steam/compatibilitytools.d $HOME/.local/share/Steam/compatibilitytools.d \
--dev-bind /dev/dri /dev/dri \
--dev-bind /dev/input /dev/input \
--setenv XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--setenv DISPLAY $DISPLAY \
--setenv WINEPREFIX $WINEPREFIX \
--setenv PATH $PATH \
--setenv GAMEID $GAMEID \
--setenv HOME $HOME \
--setenv MANGOHUD $MANGOHUD \
--setenv VKBASALT_CONFIG_FILE $VKBASALT_CONFIG_FILE \
--setenv ENABLE_VKBASALT $ENABLE_VKBASALT \
--setenv DXVK_CONFIG_FILE $DXVK_CONFIG_FILE \
-- \
umu $WINEPREFIX/drive_c/Hollow_Knight/hollow_knight.exe
#umu explorer |
@R1kaB3rN actually I can unshare everything except --unshare-net even when doing umu explorer heres the video of the problem: heres the script: export VKBASALT_CONFIG_FILE=/home/behe/Games/Genshin-Impact/vkBasalt.conf
export ENABLE_VKBASALT=0
export DXVK_CONFIG_FILE=/home/behe/Games/Genshin-Impact/dxvk.conf
export WINEPREFIX=/home/behe/Games/HOLLOW-KNIGHT
export GAMEID=0
export MANGOAPP_CONFIGFILE=~/.config/MangoHud/MangoHud.conf
export MANGOHUD=0
export PROTONPATH=GE-Proton
bwrap \
--unshare-cgroup \
--unshare-uts \
--unshare-pid \
--unshare-ipc \
--unshare-user \
--die-with-parent \
--dev /dev \
--proc /proc \
--ro-bind /sys /sys \
--ro-bind /nix /nix \
--ro-bind $XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--ro-bind /home/behe/.config/MangoHud/MangoHud.conf /home/behe/.config/MangoHud/MangoHud.conf \
--ro-bind /home/behe/Games/Shaders /home/behe/Games/Shaders \
--ro-bind /etc/fonts /etc/fonts \
--ro-bind /lib64 /lib64 \
--ro-bind /lib /lib \
--ro-bind /etc/localtime /etc/localtime \
--ro-bind /etc/host.conf /etc/host.conf \
--ro-bind /etc/zoneinfo /etc/zoneinfo \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind /etc/hosts /etc/hosts \
--ro-bind /etc/profiles/per-user/behe /etc/profiles/per-user/behe \
--ro-bind /etc/static/profiles/per-user/behe /etc/static/profiles/per-user/behe \
--ro-bind $XDG_DATA_HOME/icons $XDG_DATA_HOME/icons \
--ro-bind $XDG_DATA_HOME/themes $XDG_DATA_HOME/themes \
--ro-bind $HOME/.config/gtk-4.0 $HOME/.config/gtk-4.0 \
--ro-bind $HOME/.config/gtk-3.0 $HOME/.config/gtk-3.0 \
--ro-bind /run/current-system/sw/bin /run/current-system/sw/bin \
--ro-bind /run/current-system/sw/share/vulkan/implicit_layer.d /run/current-system/sw/share/vulkan/implicit_layer.d \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--ro-bind /sys/dev/char /sys/dev/char \
--ro-bind /run/opengl-driver /run/opengl-driver \
--ro-bind /run/opengl-driver-32 /run/opengl-driver-32 \
--ro-bind $HOME/.Xresources $HOME/.Xresources \
--ro-bind /etc/passwd /etc/passwd \
--ro-bind /etc/ssl /etc/ssl \
--ro-bind /etc/machine-id /etc/machine-id \
--ro-bind /etc/static /etc/static \
--ro-bind $DXVK_CONFIG_FILE $DXVK_CONFIG_FILE \
--perms 0700 \
--dir /tmp/.wine-1000 \
--bind $WINEPREFIX $WINEPREFIX \
--bind $HOME/.cache/mesa_shader_cache $HOME/.cache/mesa_shader_cache \
--bind $HOME/.cache/python $HOME/.cache/python \
--bind $HOME/.local/share/umu/ $HOME/.local/share/umu/ \
--bind $HOME/.local/share/Steam/compatibilitytools.d $HOME/.local/share/Steam/compatibilitytools.d \
--dev-bind /dev/dri /dev/dri \
--dev-bind /dev/input /dev/input \
--setenv XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--setenv DISPLAY $DISPLAY \
--setenv WINEPREFIX $WINEPREFIX \
--setenv PATH $PATH \
--setenv GAMEID $GAMEID \
--setenv HOME $HOME \
--setenv MANGOHUD $MANGOHUD \
--setenv VKBASALT_CONFIG_FILE $VKBASALT_CONFIG_FILE \
--setenv ENABLE_VKBASALT $ENABLE_VKBASALT \
--setenv DXVK_CONFIG_FILE $DXVK_CONFIG_FILE \
-- \
umu explorer |
Even after watching the video, I don't have enough information to determine the problem and you'll need to at least upload a wine traceback because, certainly, something occurs when control is given to wine. Though I don't know how wine explorer works, I do know that using --unshare-net should pose no problem as long as the sandbox is set correctly and the executable doesn't require internet to fully function because I've been using that option for a while. |
This would be appreciated. When I heard about umu launcher, I was concerned about layered containerization—specifically for the use case expressed in this issue. You call this a "very niche" use case, but I don't think it has to be that way: combined with structured data about game directories (that anyone can contribute and everyone can share) and store information, almost everyone could benefit from this setup. I currently use bubblewrap to make backing up game saves trivial and simultaneously support multiple couch users, providing a console-like experience. Switching users re-uses the same installation (and shader caches, etc.), but bubblewrap just binds different save paths.
Just food for thought. |
You need to ro-bind |
basically I use nixos
but thats not really relevant I have this error
and I have no idea how to fix it
basically if someone was able just to run umu in bwrap just send the command
The text was updated successfully, but these errors were encountered: