SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

smapi won't run when running inside linux sandbox ( firejail )

kuesji opened this issue ยท 3 comments

commented

describe the bug
you are adding unnecessary things to game/StardewValley file like checking user's terminal. this is breaking game launch in strict sandbox environments where launching new terminal is prohibited but executing sandboxed binaries allowed.

to reproduce

  1. install firejail
  2. create directory named stardew_valley
  3. install game into stardew_valley
  4. launch firejail with default profile via firejail --private=stardew_valley
  5. launch game with ./GOG_Games/StardewValley/start.sh
  6. game wont run due can't launch gnome-terminal

solution:
remove terminal detection and just use

export TERM=xterm 
exec $LAUNCHER $@
commented

Hi! The simplicity would be nice, but SMAPI looks for a preferred terminal first because there were often issues with terminals that didn't work with the game's bundled version of Mono (e.g. see #219, #227, #489, #656, and #676). Now that it's fully working for the vast majority of Linux users, I'm wary of potentially rebreaking it for many users.

commented

Thanks! Fixed via #776 for the upcoming SMAPI 3.10.

commented

oh. you right. i created a fix considering this information.
i added small check the is terminal is readable and executable. it will follow previous terminal code if terminal is executable. otherwise it just follow to exec way.