Re: XDG_CURRENT_DESKTOP
On 07/14/2011 11:36 AM, Michael Terry wrote: Hello! I've seen the idea of a XDG_CURRENT_DESKTOP environment variable tossed around a few times on this mailing list, but I don't see it in any spec. So XFCE and LXDE are already using it, xdg-utils wants to use it, and Unity provides a use case for its adoption in GNOME libraries. Looking at their code, XFCE and LXDE do different things when it's set to the empty string, but that would still match my suggested undefined behavior for that case. Any thoughts on the addition of a DesktopName key for XSession .desktop files? Is the next step to add my behavior proposal as a mini-spec on the XDG site or is this email thread sufficient to define use of the variable? (I don't think any changes have been proposed from the original email.) -mt ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: XDG_CURRENT_DESKTOP
On Thu, 2011-07-14 at 11:36 -0400, Michael Terry wrote: Hello! I've seen the idea of a XDG_CURRENT_DESKTOP environment variable tossed around a few times on this mailing list, but I don't see it in any spec. Historically, most desktop file parsing libraries were tightly tied to a desktop and were able to assume which XDG desktop they were in (e.g. libgmenu assumes 'GNOME'). However in Unity, it uses most of the same libraries but still wants the ability to respect OnlyShowIn=Unity. So there's a need for those libraries to detect which desktop is running. The easiest/quickest way is to use an environment variable like XDG_CURRENT_DESKTOP. I have said this repeatedly, I will say it again: I don't think such 'desktop marking' is making anything better, really. It only makes the mess bigger by proliferating wierd and unmaintainable desktop-specific workarounds in many places. Applications should ideally not change their behavior depending on such markers. If they need to use services which may or may not be present, check for the proper dbus service names on the bus. ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: XDG_CURRENT_DESKTOP
On 07/19/2011 09:08 AM, Michael Terry wrote: On 07/14/2011 11:36 AM, Michael Terry wrote: Hello! I've seen the idea of a XDG_CURRENT_DESKTOP environment variable tossed around a few times on this mailing list, but I don't see it in any spec. So XFCE and LXDE are already using it, xdg-utils wants to use it, and Unity provides a use case for its adoption in GNOME libraries. Looking at their code, XFCE and LXDE do different things when it's set to the empty string, but that would still match my suggested undefined behavior for that case. Any thoughts on the addition of a DesktopName key for XSession .desktop files? Is the next step to add my behavior proposal as a mini-spec on the XDG site or is this email thread sufficient to define use of the variable? (I don't think any changes have been proposed from the original email.) -mt ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg Without loss of generality the Exec key can point to a script that sets any environment variable one might want. There is no chance of convincing all DMs to upgrade to do this based on a new key in the XSession file, nor is this special purpose mechanism needed. Speaking of which I have never come across any specification that documents XSession files. The things I know are that they are in /usr/share/xsessions, that Type=Application and Type=XSession are allowed, and that Exec works. Apparently in KDM you can customize the search path. It would make sense if Comment and Icon and TryExec worked as well but I do not know if those are implemented in all the places that process these. It would be good to have that written down as well. As a general proposition {Not,Only}ShowIn is not proving to be a good idea. Many of the problem reports we have in LXDE with menu items not showing up are traced to OnlyShowIn=some other desktop. ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: XDG_CURRENT_DESKTOP
On 07/19/2011 09:38 AM, Marty Jack wrote: Without loss of generality the Exec key can point to a script that sets any environment variable one might want. There is no chance of convincing all DMs to upgrade to do this based on a new key in the XSession file, nor is this special purpose mechanism needed. Ah, great point. So no need to worry about how the key gets set, either the shell or the XSession file or someone can set it themselves without involving the DMs. As a general proposition {Not,Only}ShowIn is not proving to be a good idea. Many of the problem reports we have in LXDE with menu items not showing up are traced to OnlyShowIn=some other desktop. Yeah, it's easily misused, e.g. I'm writing in GTK+, so I should add OnlyShowIn=GNOME. But using the keys to partition the desktops is still a strong use case, e.g. OnlyShowIn=KDE/NotShowIn=KDE in two different desktop files for your app's two frontends. -mt ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg