ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 175 forks source link

Appimage based games fail to launch if steam is run in a sandboxed mode. #11364

Open Redhawk18 opened 1 month ago

Redhawk18 commented 1 month ago

Your system information

Please describe your issue in as much detail as possible:

Any Love2d game to built as an appimage is not guaranteed to work on generic linux computers. Which is a cause for of refunding games.

Steps for reproducing this issue:

example game is Gravity Circuit

  1. launch button
  2. Fails to launch on distros where appimage is not setup by default. (not steamos)
Redhawk18 commented 1 month ago

Even when adding fuse, the app image still crashes

chdir "/mnt/games/SteamLibrary/steamapps/common/Gravity Circuit"
ERROR: ld.so: object '/home/redhawk/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/redhawk/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/redhawk/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/redhawk/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Adding process 9755 for gameID 858710
fusermount: mount failed: Operation not permitted
pid 9757 != 9756, skipping destruction (fork without exec?)

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory
Adding process 9756 for gameID 858710
Uploaded AppInterfaceStats to Steam
Removing process 9756 for gameID 858710
Removing process 9755 for gameID 858710

I would also like to add that if I browse to the folder and add the correct steam_appid.txt and run the AppRun, the game just works perfectly. The issue is that steam is sandboxed and fails to open the appimage. While I could use something like proton, the controller input through this engine with proton will not register controller input after clicking out of the window.

Samueru-sama commented 1 month ago

Doesn't NixOS use bubblewrap to run applications? in that case that's the problem.

You might still be able to run appimages by setting the env variable APPIMAGE_EXTRACT_AND_RUN=1 though

Redhawk18 commented 1 month ago

Doesn't NixOS use bubblewrap to run applications? in that case that's the problem.

You might still be able to run appimages by setting the env variable APPIMAGE_EXTRACT_AND_RUN=1 though

Yes, and that doesn't work. It works perfectly without steam though. The problem is steam doesn't have the tools to deal with this. I already added libfuse and it still fails to mount.

Samueru-sama commented 1 month ago

Doesn't NixOS use bubblewrap to run applications? in that case that's the problem. You might still be able to run appimages by setting the env variable APPIMAGE_EXTRACT_AND_RUN=1 though

Yes, and that doesn't work. It works perfectly without steam though. The problem is steam doesn't have the tools to deal with this. I already added libfuse and it still fails to mount.

We use bubblewrap in this Steam AppImage and we had to patch it in order to let Steam launch AppImages from Steam.

You might wanna test building bubblewrap with that patch and also pass the CAP_SYS_ADMIN capability to Steam.

Redhawk18 commented 4 weeks ago

CAP_SYS_ADMIN

Doesn't this basically let it run as root? I remember it from when I had to setup sunshine

Samueru-sama commented 4 weeks ago

CAP_SYS_ADMIN

Doesn't this basically let it run as root? I remember it from when I had to setup sunshine

I'm really not sure, as far as I know Steam itself won't be running as root, also I think the security implications really depend if bubblewrap is the suid version or not.

In the case of the appimage everything happens at user level and root is never needed for anything, I don't know about Nix.

Redhawk18 commented 4 weeks ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/11364#issuecomment-2435623945

I asked the people in my sphere who control that, but the dev created a extracted option in steam that just extracts the appimage which works perfectly.