! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
export XDG_CURRENT_DESKTOP to the current session
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2014-10-18 15:06:17 CEST
Hi,

a Debian user reported [1] that Qt5 was using the XDG_CURRENT_DESKTOP variable to tune its behavior.

I managed to dig an old thread from freedesktop.org about this [2] with Nick participation. It seems that the idea was to have the DM export this, but apparently the discussion ended without a consensus.

LightDM (and GDM, maybe) apparently sets this if it finds the (proprietary) X-LightDM-DesktopName key in the session .desktop file, so it might be worth adding it to the xfce4-session .desktop file.

But not all DMs are using this, I guess, so having it set in xfce4-session xinitrc might be worth too.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765728
[2]: http://lists.freedesktop.org/archives/xdg/2011-July/012004.html
Comment 1 Yves-Alexis Perez editbugs 2014-10-18 15:11:45 CEST
Actually GDM uses DesktopNames property [1]

[1] https://bugzilla.gnome.org/show_bug.cgi?id=727546
Comment 2 Eric Koegel editbugs 2014-10-20 07:32:39 CEST
It makes sense for xfce4-session to set it in the xinitrc file as the user may not be using a DM at all, i.e. startxfce4. Thanks for the heads up and all the references, pushed to master:
commit 4daf68ebb6991194848756ff4f05a3ed736118bb
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Mon Oct 20 08:17:13 2014 +0300

    Export XDG_CURRENT_DESKTOP (Bug #11239)
    
    We already have been using XDG_CURRENT_DESKTOP in things such as
    garcon and other libraries but xfce4-session hasn't been setting
    it if it was left unset. This is now used by things like QT5 for
    theme decorations. Patch provided in:
    https://forum.manjaro.org/index.php?topic=13728

http://git.xfce.org/xfce/xfce4-session/commit/?id=4daf68ebb6991194848756ff4f05a3ed736118bb
Comment 3 Guido Berhoerster 2014-10-20 11:44:34 CEST
@Eric:

Can you please also add DesktopName=XFCE to the xsession file?
Comment 4 Eric Koegel editbugs 2014-10-20 16:14:01 CEST
Pushed a patch to master adding it. Thanks for pointing that out, I missed it.

commit 860aea2d6686e9dcf0359a6dfab3ccdb9caf34c3
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Mon Oct 20 17:04:32 2014 +0300

    Add DesktopNames to .desktop file
    
    GDM looks for a DesktopNames property added in the desktop file
    to set the XDG_CURRENT_DESKTOP env variable with. See
    https://bugzilla.gnome.org/show_bug.cgi?id=727546
    Thanks to Guido Berhoerster for pointing this out.
http://git.xfce.org/xfce/xfce4-session/commit/?id=860aea2d6686e9dcf0359a6dfab3ccdb9caf34c3

Bug #11239

Reported by:
Yves-Alexis Perez
Reported on: 2014-10-18
Last modified on: 2014-10-20

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Version:
4.10.1

Attachments

Additional information