Discussion:
Proposal: $XDG_CURRENT_DESKTOP and the xdg-* commands
Jerome Leclanche
2015-05-31 18:51:51 UTC
Permalink
Hi

Just earlier a user encountered an issue with xdg-settings, which
would complain about an "unknown desktop environment". Looked in the
code and sure enough, it hard-checks for $XDG_CURRENT_DESKTOP and
actually only implements kde, gnome and xfce. All other DEs are
implemented with a "dispatch_generic" which would be suitable for any
DE, really.

Seeing as we have generic functions in all xdg-* commands, cant we
merely check whether XDG_CURRENT_DESKTOP is set at all, and if it is
(and we dont have a specific function for the DE in question), use the
generic one?

Writing a new DE shouldn't require changing these tools. As long as we
don't do nonstandard stuff, they should just work.

J. Leclanche
Simon Lees
2015-05-31 22:24:39 UTC
Permalink
Post by Jerome Leclanche
Hi
Just earlier a user encountered an issue with xdg-settings, which
would complain about an "unknown desktop environment". Looked in the
code and sure enough, it hard-checks for $XDG_CURRENT_DESKTOP and
actually only implements kde, gnome and xfce. All other DEs are
implemented with a "dispatch_generic" which would be suitable for any
DE, really.
Seeing as we have generic functions in all xdg-* commands, cant we
merely check whether XDG_CURRENT_DESKTOP is set at all, and if it is
(and we dont have a specific function for the DE in question), use the
generic one?
Writing a new DE shouldn't require changing these tools. As long as we
don't do nonstandard stuff, they should just work.
J. Leclanche
I agree 100% here, I fixed similar issues with xdg-su and xdg-terminal
under enlightenment, someone implemented xdg-open which added a check
for the DE and because they didn't know they had to add actions to the
others it broke everything else. xdg-su and xdg-terminal also just use
xterm so they should just work regardless of DE. From what I saw when
fixing enlightenment i'm pretty sure there is atleast 1 place where one
of the other smaller DE's is still broken.

Cheers

Simon Lees

Loading...