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

Add desktop Linux implementation #113

Open
russhwolf opened this issue May 2, 2022 · 2 comments · May be fixed by #111 or #112
Open

Add desktop Linux implementation #113

russhwolf opened this issue May 2, 2022 · 2 comments · May be fixed by #111 or #112

Comments

@russhwolf
Copy link
Owner

I've wanted to have something here for a long time but I'm not a frequent enough Linux user to know what a reasonable backing API is. There are some proofs-of-concept in #111 and #112.

@YoshiRulz
Copy link

o/ Just saw your KotlinConf talk. Here's my experience of using desktop Linux for almost a decade:

The GNOME suite and some other apps built on GTK use dconf (GSettings), analagous to the Windows registry. The KDE suite and some other apps built on Qt use KConfig. It would be sufficient to just pick one, as distros typically package both sets of base libraries even if the corresponding DE isn't officially supported.

But most apps use a bespoke method, serialising as INI, XML, etc. to the file/dir $HOME/.config/<app> or, if you're lucky, $XDG_CONFIG_HOME/<app>. Some apps also use /etc/<app> (for daemons; only writable by admins) as a fallback or base for per-user settings.

I'm not sure if AppImage/Flatpak/snap have settings APIs, but when packaging with those, apps could always use the filesystem APIs.

@russhwolf
Copy link
Owner Author

Thanks for the notes! Apparently I actually started to look at dconf/gsettings back when I did the last round of PoCs, but didn't go further than configuring the cinterop. Looking at them now, I'm wary of GSettings since from what I can tell from the docs, it requires a schema with all possible keys defined in advance. That's much more restrictive than other existing implementations and seems like it could be a pretty big source of issues. Talking to dconf directly may be better, so I can give that a closer look, though it's a little confusing finding api docs for it.

I can give kconfig a look too, but if it's GPL rather than LGPL, then I don't think it's safe to link against from Apache-licensed code.

I've thought a little about whether it'd be worth doing some sort of custom filesystem-based implementation for users who don't care about interop, but with multiplatform DataStore on the horizon I think that might become a better choice in the medium term so I'm not sure it's worth the effort.

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