Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: xor on February 11, 2021, 12:36:30 AM

Title: ?! How do I find where an application is storing its settings !?
Post by: xor on February 11, 2021, 12:36:30 AM
?! How do I find where an application is storing its settings !?
Title: Re: ?! How do I find where an application is storing its settings !?
Post by: Juanito on February 11, 2021, 04:07:12 AM
Look under /home/tc, /home/tc/.config or /usr/local/etc - if it's a gtk3 app, you could look with dconf-editor.

You could also take a look at the app's documentation.
Title: Re: ?! How do I find where an application is storing its settings !?
Post by: mocore on February 11, 2021, 01:16:41 PM

perhaps with lsof

https://en.wikipedia.org/wiki/Lsof
Title: Re: ?! How do I find where an application is storing its settings !?
Post by: patrikg on February 12, 2021, 08:08:49 AM
You can also install strace to trace the syscall open.
To see what files the program/app tries to open.

Code: (bash) [Select]
strace -e trace=open your-command-here
Title: Re: ?! How do I find where an application is storing its settings !?
Post by: Rich on February 12, 2021, 11:17:04 AM
Hi patrikg
That looks like a pretty handy command, so I decided to try it out. I entered:
Code: [Select]
strace -e trace=open editor Notes.txt
To my surprise, I got nothing. So I tried this:
Code: [Select]
strace -e trace=open editor Notes.txt | grep -i open
It turns out there's an  openat  syscall  that was being used instead. Changing it to this works:
Code: [Select]
strace -e trace=open,openat editor Notes.txt
As of kernel version 5.6, there is now also an  openat2  syscall.
Title: Re: ?! How do I find where an application is storing its settings !?
Post by: patrikg on February 13, 2021, 02:46:59 AM
Hi Rich.
Thank you, didn't know that.
Haven't used that command for a while.
But everyday you learn something.   :) :)
Title: Re: ?! How do I find where an application is storing its settings !?
Post by: Rich on February 13, 2021, 10:41:28 AM
Hi patrikg
Yup, you taught me something and I taught you something. That's a win win in my book. ;D