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

Specify system settings file for command line launch #218

Open
judelove opened this issue Sep 4, 2020 · 3 comments
Open

Specify system settings file for command line launch #218

judelove opened this issue Sep 4, 2020 · 3 comments

Comments

@judelove
Copy link

judelove commented Sep 4, 2020

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?

@LubosD
Copy link
Owner

LubosD commented Sep 4, 2020

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.

@judelove
Copy link
Author

judelove commented Sep 4, 2020

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

@fbriere
Copy link
Collaborator

fbriere commented Feb 16, 2022

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. 😄

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants