Suggest setting XDG_CURRENT_DESKTOP if DE cannot be detected #2634
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, let me say this is a stupid PR, so feel free to ignore it if you want :)
Now, some context: in sway, you are responsible for setting environment variable "XDG_CURRENT_DESKTOP=sway" before running it.
The "problem" is that if you are using a logging manager such as GDM, you need to manually edit the "/usr/share/wayland-sessions/sway.desktop" which is overwritten every time sway is updated (at least in Arch), which happens every few months.
Well... this is the third time this has happened to me and each time I completely forgot what the issue was and had to compile a new version, attach the debugger and step through the code to figure out what the problem was (yes... I must have the worst short term memory in the world).
Anyway, in this PR I simply add a message suggesting to check environment variable XDG_CURRENT_DESKTOP when the desktop environment cannot be detected in the hope that this will save me (and probably others) ~1 hour in a few months once sway is updated again.
Thanks!