Created attachment 32508 [details] [review] better logic for DE detection I use xdg-utils-1.0.2, xfce-4.6.1 and xdg-open does not detect XFCE properly. xdg-open uses following logic: > if xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; and, if I run xprop, I see following: $ xprop -root _DT_SAVE_MODE _DT_SAVE_MODE: no such atom on any window. I've written trivial patch, that works for me, it's attached. I added some logic for gnome as every gnome installation I see has following environment variable: GNOME_DESKTOP_SESSION_ID=this-is-deprecated Also, I am not sure if additional logic for KDE makes sense.
This only occurs when xfce4-session is compiled with '--disable-legacy-sm', which is not default. When legacy support is disabled, _DT_SAVE_MODE and _DT_RESTORE_MODE are not set. Nonetheless, it would be best to check against DESKTOP_SESSION at the least.
Guys, I do not agree with detection based on environment variable. I use archlinux with xfce 4.8 --disable-legacy-sm is used for xfce4-session. My login manager is LXDM (built from git), and it sets : [eugene@el-vaio ~]$ set | grep DESKTOP DESKTOP_SESSION='Xfce Session' So condition proposed in patch: elif [ x"$DESKTOP_SESSION" = x"xfce" ]; then DE=xfce; won't work for me. Find other way to detect XFCE with --disable-legacy-sm: [eugene@el-vaio ~]$ xprop -root | grep -i "xfce" XFCE_DESKTOP_WINDOW(WINDOW): window id # 0x1400003 I propose this: elif [ x"$(xprop -root| grep -i 'xfce_desktop_window')" != x"" ]; then DE=xfce;
Thanks, incorporated the ideas here into git. See also related bug #33321
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.