FS#22848 - [xdg-utils] XFCE 4.8 detection is broken

Attached to Project: Arch Linux
Opened by Mauro Santos (R00KIE) - Thursday, 10 February 2011, 23:00 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 19 June 2011, 05:01 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
Using xdg-open with xfce 4.8 does not work as expected, instead of opening a file with the associated program it opens firefox (or possibly another browser). This also affects other programs that rely on xdg-utils, such as chromium and thunderbird.

The problem seems to be with the way the detection is made, it seems previously xfce was detected using xprop, however the properly that was used to identify xfce is no longer set and xdg-open will default to a generic DE which in turn will look for a few browsers and try to open the file there.

Currently it seems xfce exports DESKTOP_SESSION and that can be used to identify xfce 4.8 (and newer?). I provide a patch with a possible solution which shouldn't break the detection of previous versions of xfce (not tested though).


Additional info:
* package version(s)
xdg-utils 1.1.0rc1-1
All other packages are up-to-date


Steps to reproduce:
While using xfce 4.8 try to open an image file with 'xdg-open /path/to/image.jpg', it will open firefox (if installed) instead of the associated image viewer.
This task depends upon

Closed by  Eric Belanger (Snowman)
Sunday, 19 June 2011, 05:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  xdg-utils-1.1.0rc1-3 : Added patch from upstream git to fix Xfce detection
Comment by Eugene L (el) - Wednesday, 16 February 2011, 14:20 GMT
I do not agree with thi fix.
I'm using Xfce 4.8 with lxdm together.
(lxdm-git 20110212-1)

My DESKTOP_SESSION='Xfce Session', so condition x"$DESKTOP_SESSION" == "xfce" is never true.

Proper detection will be:
elif [ x"$(echo "$DESKTOP_SESSION" | grep -i 'xfce')" != x"" ]; then DE=xfce;

See my patch attached.



Comment by Jan de Groot (JGC) - Wednesday, 16 February 2011, 14:39 GMT
xdg-utils uses xprop to detect Xfce. Is xorg-xprop actually installed on your system? I don't think grepping an environment variable set by a login manager should be the way to detect this.
Comment by Eugene L (el) - Wednesday, 16 February 2011, 16:20 GMT
Sure is installed.

[eugene@el-vaio ~]$ pacman -Q | grep xprop
xorg-xprop 1.2.0-1
Comment by Eugene L (el) - Wednesday, 16 February 2011, 16:21 GMT
I'm running XFCE 4.8 session and what xprop tells me:

[eugene@el-vaio ~]$ xprop -root | grep -i xfce
XFCE_DESKTOP_WINDOW(WINDOW): window id # 0x1200003
Comment by Jan de Groot (JGC) - Thursday, 17 February 2011, 07:39 GMT
This would be https://bugs.freedesktop.org/show_bug.cgi?id=25941 upstream.
According to the last comment, it's because we build xfce-session with --disable-legacy-sm. Is there a reason for building with that?
Comment by Eugene L (el) - Thursday, 17 February 2011, 09:38 GMT
think easier to build without '--disable-legacy-sm' option than patching xdg-utils :)
Comment by Mauro Santos (R00KIE) - Thursday, 17 February 2011, 18:24 GMT
If the patch submitted upstream gets accepted then there is no need to recompile other packages, besides xdg-utils should be able to detect xfce even if it was built with --disable-legacy-sm.

Speaking of xorg-xprop, yes I do have it installed. Also shouldn't xdg-utils at least have xorg-xprop as an optdepend?

Loading...