Skip to content
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

Settings wont save on Debian/Ubuntu/Mint with GUI #124

Closed
staticnation opened this issue Nov 1, 2020 · 15 comments
Closed

Settings wont save on Debian/Ubuntu/Mint with GUI #124

staticnation opened this issue Nov 1, 2020 · 15 comments

Comments

@staticnation
Copy link

if I use the gui to change something like gamemode, and save+reload, save, etc. the settings do not save. STL is in /usr/local/bin and stl doesnt seem to be updating the conf files in ~/.config/stl.

/usr/local/bin$ ls
.rwxrwxrwx 261k static  1 Nov  6:36 stl
.rwxrwxrwx 7.6M static  1 Nov  6:18 Yad-313ada9-x86_64.AppImage
@staticnation staticnation changed the title Settings wont save on Debian Settings wont save on Debian/Mint Nov 1, 2020
@kadogo
Copy link

kadogo commented Nov 1, 2020

I had the same issue with my Yad package build really so I not think it's an AppImage issue.

But I didn't dig yet. As workaround You can click on "editor menu" and select the file that concern the game.
You can edit the parameter in your editor, it's not the best but it can still help.

@staticnation
Copy link
Author

@kadogo thanks for the reply, yeah Ive been editing the conf files in sublime text editor, just wanted to get the issue on the tracker

@staticnation staticnation changed the title Settings wont save on Debian/Mint Settings wont save on Debian/Ubuntu/Mint Nov 3, 2020
@staticnation staticnation changed the title Settings wont save on Debian/Ubuntu/Mint Settings wont save on Debian/Ubuntu/Mint with GUI Nov 3, 2020
@frostworx
Copy link
Collaborator

frostworx commented Nov 3, 2020

@staticnation
Pretty sure this is appimage related, but I'm sure we'll find out soon or later.
Would be nice if you would attach an initial log like this (1+2 to make sure we start from scratch)

  1. remove/rename the ~/.config/stl directory
  2. remove the temp directory /dev/shm/stl if it exists
  3. stl settings
  4. change any value and "save"
  5. attach the /dev/shm/stl/stl.log here

If you have the chance to try the same with a self-rolled yad this would be great.

@kadogo
Copy link

kadogo commented Nov 3, 2020

Hello

I dig a bit and I found what to change for make it work but I not understand why it's not working with the extRun function. It looks like it's related to extRun that make the result empty.

diff --git a/stl b/stl
index 91c4c14..2849836 100755
--- a/stl
+++ b/stl
@@ -1794,10 +1794,10 @@ function saveYadCfg {
                loadCfg "$YADCFG"
                YLC=1
                YADCATLIST="$STLSHM/yadcatlist.txt"
-               extRun sed -n "/^#STARTYAD$DELIM/,/^#ENDYAD$DELIM/p;/^#ENDYAD$DELIM/q" "$0" | grep "\-\-field" | rev | cut -d '{' -f1 | rev | sed '/LBL/c\NOVAL' | sed '/BTN/c\NOVAL' | cut -d '/' -f1 > "$YADCATLIST"
+               sed -n "/^#STARTYAD$DELIM/,/^#ENDYAD$DELIM/p;/^#ENDYAD$DELIM/q" "$0" | grep "\-\-field" | rev | cut -d '{' -f1 | rev | sed '/LBL/c\NOVAL' | sed '/BTN/c\NOVAL' | cut -d '/' -f1 > "$YADCATLIST"
 
                while extRun read -r YADVAL; do
-                       YADCAT="$(extRun sed "${YLC}q;d" "$YADCATLIST")"
+                       YADCAT="$(sed "${YLC}q;d" "$YADCATLIST")"
                        YADVALUNQ="${YADVAL//\'/}"
                        WRITEYADVAL="${YADVALUNQ/# -/-}"

Edit:

I think I just found it... Debian have sed in /bin/ ...

$ whereis sed
sed: /bin/sed /usr/share/man/man1/sed.1.gz /usr/share/info/sed.info.gz

If I unset the variables like in extRun sed is not found anymore

$ LC_ALL="" PATH="/usr/local/bin:/usr/bin" LD_LIBRARY_PATH="" LD_PRELOAD="" sed
bash: sed : commande introuvable

I changed added /bin to the PATH variable in extRun and it's working for me.

@frostworx
Copy link
Collaborator

Hi,
thanks for digging through this.

To quickly explain extRun: Some system programs do simply not work when executed with the Steam internal environment (f.e. "file"), that's why I disable multiple variables centrally in extRun to get the programs working - so extRun is here for a reason :)
In other words - avoiding extRun f.e. with a simple "USINGAPPIMAGE" boolean apparently could get the AppImage to work here, but very likely will break multiple other functions and external system calls.

@kadogo
Copy link

kadogo commented Nov 3, 2020

Sorry I edit a bit before for avoiding multi posting. But I think the issue is sed because it's not in /usr/bin or /usr/local/bin at least for Debian. But by adding /bin to PATH it worked for me but maybe it's different for Ubuntu or Mint.

@frostworx
Copy link
Collaborator

Oh wow, debian still has "/bin/" as standalone variable?
I thought any major distribution symlinks to /usr/bin since years.
Very good find! Thanks a lot! :)

@frostworx
Copy link
Collaborator

@kadogo
Would you please paste a default $PATH? I'd like to use the same order in extRun, to avoid (unlikely) priority glitches

@kadogo
Copy link

kadogo commented Nov 3, 2020

@frostworx You are reading my mind I was just copy pasting ^^

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

@frostworx
Copy link
Collaborator

thanks a lot! Will use that 1to1 :)

frostworx added a commit that referenced this issue Nov 3, 2020
@frostworx
Copy link
Collaborator

Could you please check if this is fixed in 1432743 ?

@kadogo
Copy link

kadogo commented Nov 3, 2020

@frostworx I just tested on a native linux game by changing the options and saving / reload and it looks good on Debian Buster at least.

@frostworx
Copy link
Collaborator

Thanks @kadogo! Sounds good!
I'll leave the issue open until op can confirm that it works now.

@staticnation
Copy link
Author

@frostworx @kadogo good job guys, this fixed it on my end

@frostworx
Copy link
Collaborator

nice! Thanks for the feedback @staticnation!
closing here

frostworx added a commit that referenced this issue Nov 27, 2020
frostworx added a commit that referenced this issue Nov 27, 2020
frostworx added a commit that referenced this issue Nov 27, 2020
frostworx added a commit that referenced this issue Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants