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

XDG is not used by default #99

Closed
Doomsdayrs opened this issue Jan 19, 2023 · 7 comments
Closed

XDG is not used by default #99

Doomsdayrs opened this issue Jan 19, 2023 · 7 comments

Comments

@Doomsdayrs
Copy link

During my work on ruffle-rs/ruffle#9220 , I noticed that XDG is not used by default. Can this behavior be modified for proper desktop integration?

@PolyMeilex
Copy link
Owner

Well there are two ways to always use XDG Desktop Portal, either use XDG portal backend of rfd (behind feature flag as not every system has proper desktop portal setup), or just set GTK_USE_PORTAL=1 env variable, or run your app under Flatpack.

So the only solution would be to set GTK_USE_PORTAL env variable inside of rfd.

@Doomsdayrs
Copy link
Author

The behavior is stated with this, defaulting to gtk3.

rfd/Cargo.toml

Line 14 in f565c62

default = ["gtk3"]

I may be misunderstanding something here, but can it not just check for XDG existing or not?

@PolyMeilex
Copy link
Owner

Yes, but switching to XDG Portal means no file dialog at all for anyone not running one of the available desktop portals.

@Doomsdayrs
Copy link
Author

So there is no way to just load the gtk3 backend when portals are not available?

And who is not using XDG portals?

@PolyMeilex
Copy link
Owner

So there is no way to just load the gtk3 backend when portals are not available?

Setting GTK_USE_PORTAL=1 would result in the same behavior, GTK would be used only as a fallback.

And who is not using XDG portals?

Sadly, WM users usually don't, same goes for people who don't like this so-called "dbus bloat". My hope is that over time apps like browsers will drop their fallbacks and then people will simply be forced to have portals on their systems, and then we can happily drop the GTK backend all together in favor of a lot cleaner and better XDG portal backend.

@Doomsdayrs
Copy link
Author

Thank you for explaining the situation better! I understand, and I'll close this for now. May the future be better for us all!

@PolyMeilex
Copy link
Owner

PolyMeilex commented Feb 19, 2024

Done, XDG Portal is now the default

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

2 participants