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_CURRENT_DESKTOP not set will lead to xdg-desktop-portal errors #584

Closed
cookiengineer opened this issue Mar 8, 2024 · 0 comments · Fixed by #517
Closed

XDG_CURRENT_DESKTOP not set will lead to xdg-desktop-portal errors #584

cookiengineer opened this issue Mar 8, 2024 · 0 comments · Fixed by #517
Labels
bug This issue or pull request discusses a bug

Comments

@cookiengineer
Copy link

For window managers that don't rely on a dbus session to set the XDG_CURRENT_DESKTOP environment variable, the xdg-desktop-portal throws the following error:

No such interface "org.freedesktop.portal.FileChooser" on object at path /org/freedesktop/portal/desktop

This error is caused by two stages:

  1. The XDG_CURRENT_DESKTOP environment variable must be set.
  2. A config file in /usr/share/xdg-desktop-portal/portals must match the currently set XDG_CURRENT_DESKTOP environment variable (e.g. UseIn=i3)

The missing environment variable is the cause of this problem for ly and i3 users. After looking at the code and successfully fixing this error (pull request incoming), it's a minor fix.

For Desktop Environments like GNOME, MATE, KDE, etc: These Desktop Environments set those environment variables via the dbus session in the background (which is started usually by the init.d implementation or systemd). That's probably why this error has not been reported before.

It would be awesome if this could get merged, because it took a while to understand/debug and was just a hazzle which can be avoided easily.

@AnErrupTion AnErrupTion linked a pull request Apr 16, 2024 that will close this issue
@AnErrupTion AnErrupTion added the bug This issue or pull request discusses a bug label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request discusses a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants