Page 2 of 2

Re: Playing from my flash drive?

PostPosted: 01 Apr 2020, 11:41
by tuxkartkaye
Hi benau

So I've downloaded the SuperTuxKart-1.1-linux.tar.xz

I then extracted it to an NTFS partition of my hard drive. I was able to run it, BUT I noticed the folder supertuxkart would be created in:

/home/user/.config

and

/home/user/.cache

and

/home/user/.local/share/supertuxkart

IF I extract the -----SuperTuxKart-1.1-linux.tar.xz----- file into my USB flash drive (instead of anywhere in my laptop's hard drive), I cannot run it, it says permission denied.

1. What I want to do is to be able to run it from my USB flash drive like I am able to do from my laptop's hard drive.

2. The supertuxkart folder that is normally created in ----- /home/user/.config ------ and ------- /home/user/.cache ------------- and ------------ /home/kaye/.local/share/supertuxkart ------------should be created in my USB flash drive instead, because I want everything to be in my flash drive, so I can take the game anywhere and plug it in any computer and continue where I left off.

Is this possible?

Thank you for your time.

Re: Playing from my flash drive?

PostPosted: 01 Apr 2020, 12:15
by benau
Probably you need to format it to ext4 and use the environment variable i mentioned

Actually the main advantages of stk 1.x is online play, if you have no interests in online play you can just playing 0.9.3

Re: Playing from my flash drive?

PostPosted: 02 Apr 2020, 01:57
by QwertyChouskie
tuxkartkaye {l Wrote}:Hi benau

So I've downloaded the SuperTuxKart-1.1-linux.tar.xz

I then extracted it to an NTFS partition of my hard drive. I was able to run it, BUT I noticed the folder supertuxkart would be created in:

/home/user/.config

and

/home/user/.cache

and

/home/user/.local/share/supertuxkart

IF I extract the -----SuperTuxKart-1.1-linux.tar.xz----- file into my USB flash drive (instead of anywhere in my laptop's hard drive), I cannot run it, it says permission denied.

1. What I want to do is to be able to run it from my USB flash drive like I am able to do from my laptop's hard drive.

2. The supertuxkart folder that is normally created in ----- /home/user/.config ------ and ------- /home/user/.cache ------------- and ------------ /home/kaye/.local/share/supertuxkart ------------should be created in my USB flash drive instead, because I want everything to be in my flash drive, so I can take the game anywhere and plug it in any computer and continue where I left off.

Is this possible?

Thank you for your time.


If you run `chmod +x run_game.sh` in the folder with `run_game.sh`, that should hopefully fix the permission denied error. As for save file location, change the contents of `run_game.sh` to the following:

{l Code}: {l Select All Code}
#!/bin/sh

export DIRNAME="$(dirname "$(readlink -f "$0")")"
export MACHINE_TYPE=`uname -m`
export SYSTEM_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"

export SUPERTUXKART_DATADIR="$DIRNAME"
export SUPERTUXKART_ASSETS_DIR="$DIRNAME/data/"
export SUPERTUXKART_SAVEDIR="$DIRNAME/savedir/"
export XDG_DATA_HOME="$DIRNAME/savedir/"

cd "$DIRNAME"

if [ $MACHINE_TYPE = "x86_64" ]; then
   echo "Running 64-bit version..."
   export LD_LIBRARY_PATH="$DIRNAME/lib-64:$LD_LIBRARY_PATH"
   "$DIRNAME/bin-64/supertuxkart" "$@"
else
   echo "Running 32-bit version..."
   export LD_LIBRARY_PATH="$DIRNAME/lib:$LD_LIBRARY_PATH"
   "$DIRNAME/bin/supertuxkart" "$@"
fi


Now, when you run `run_game.sh`, it should read/write the save files/addons/etc. to the `savedir` directory. I did a quick test on my system and it appears to work as intended.

Re: Playing from my flash drive?

PostPosted: 05 Apr 2020, 07:45
by tuxkartkaye
QwertyChouskie

Your two lines did it!

export SUPERTUXKART_SAVEDIR="$DIRNAME/savedir/"
export XDG_DATA_HOME="$DIRNAME/savedir/"

As for the permission, I did not run `chmod +x run_game.sh` , but I edited the line in /etc/fstab to look like this:

UUID=2E7B-BA02 /media/myflashdrive vfat noauto,uid=1000,gid=users,umask=0,dmask=0,fmask=0,users,exec 0 0

Do you see any problem with that? I'm not an expert. But I think it's ok?

Also, a supertuxkart folder gets created in /home/user/.cache after I play supertuxkart from my flash drive, but I guess it's ok since it's just cache.

Thank you very much!

Re: Playing from my flash drive?

PostPosted: 06 Apr 2020, 21:03
by QwertyChouskie
No problem! As for the fstab line, if it works it works :)