Bug 392532

Summary: XDG_CURRENT_DESKTOP does not get set to "kde" on Plasma startup
Product: [Plasma] plasmashell Reporter: mellotanica <mellotanica>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description mellotanica 2018-03-30 17:19:31 UTC
I found a related issue (https://bugs.kde.org/show_bug.cgi?id=344149) marked as wontfix, as it was issued by other dekstop environments users, but I'm running Plasma 5 and i'm affected too.

I'm running Kde without login manager or x autostart, I use xinit with a simple xinitrc file that starts xbindkeys and Plasma with `exec startkde`.

If i try to run ANY Kde application from terminal (or other programs that are not strictly Kde applications, e.g. chrome) i got this same issue, the fix is to manually export the XDG_CURRENT_DESKTOP="kde" variable beforehand, shouldn't this be already done by the startkde program?
Comment 1 Kai Uwe Broulik 2018-04-04 07:40:33 UTC
Yes, startkde script does

XDG_CURRENT_DESKTOP=KDE
export XDG_CURRENT_DESKTOP

How about using "source" instead of "exec"? Anyway, this isn't really a usecase we support.
Comment 2 mellotanica 2018-04-04 16:09:33 UTC
(In reply to Kai Uwe Broulik from comment #1)
> How about using "source" instead of "exec"? Anyway, this isn't really a
> usecase we support.

this works perfectly, but every default .xinitrc file I saw makes the xinit program run "exec" instead of "source" to start the desktop environment, this behavior should be notified and documented..

two of the most beautiful traits of Linux are its openness and customizability, which mean that you should be free to start your desktop session in any way you prefer, why shouldn't KDE support users who don't want to start an x session and a login manager at boot time, while already providing a script to start a session from a tty?