twinkle icon indicating copy to clipboard operation
twinkle copied to clipboard

Specify system settings file for command line launch

Open judelove opened this issue 5 years ago • 3 comments

It is my understanding that the -f option allows you to set a profile on startup, allowing for a custom path for a profile configuration.

I however can not seem to find an option that would allow me to set the system settings file (twinkle.sys) and as such I think I am restricted to the settings of the user that launched twinkle?

Is it possible to specify a system settings path or is this a feature that does not exist yet?

judelove avatar Sep 04 '20 16:09 judelove

That doesn't make sense to me - technically. What would be the use case of such a shared profile?

At the very least, it would complicate the screens where the profile can be modified, which may not be possible with a shared profile.

LubosD avatar Sep 04 '20 16:09 LubosD

Am launching twinkle on the commandline with a user that does not have a home directory. Am wondering where the system settings would be picked from. At the moment it fails because /home/ does not exist.

If I had this option I could point to a config from one of the other user home dirs, or a global one, or even a custom one local to this user.

What I think might help (just thinking), is a global twinkle config, e.g in /etc/twinkle, whose defaults can be overridden in individual profiles. Every user would get a system settings file that is with customizations for their profile overlaid on the master system settings

judelove avatar Sep 04 '20 16:09 judelove

Am launching twinkle on the commandline with a user that does not have a home directory. Am wondering where the system settings would be picked from. At the moment it fails because /home/ does not exist.

Wouldn't it fail anyway the moment it tries to create a settings file or its lockfile and socket? (Admittedly, the latter two should belong in $XDG_RUNTIME_DIR.)

If I had this option I could point to a config from one of the other user home dirs, or a global one, or even a custom one local to this user.

Wouldn't simply copying a file be an easier solution?

What I think might help (just thinking), is a global twinkle config, e.g in /etc/twinkle, whose defaults can be overridden in individual profiles. Every user would get a system settings file that is with customizations for their profile overlaid on the master system settings

Ah! Now we have a challenge. :smile:

While it's true that QSettings indeed has such a fallback mechanism (albeit with a rather peculiar naming scheme), Twinkle must also be buildable without Qt, so this wouldn't be an acceptable solution.

Further complicating this is the fact that Twinkle has one additional settings file per user profile, whose name and number are configurable. I imagine this could quickly make things much messier.

Does anybody have any example of another application that combines both features, namely fallback to /etc and multiple profiles? I know of many instances of the former, and Firefox comes to mind for the latter, but nothing for both.

fbriere avatar Feb 16 '22 21:02 fbriere