Bug 33321

Summary: xdg-open cannot detect xfce 4.8 correctly
Product: Portland Reporter: georgy@kibardin.name <george-kibardin>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description georgy@kibardin.name 2011-01-20 22:35:43 UTC
it seems that "xprop -root _DT_SAVE_MODE" doesn't work anymore
Comment 1 Christoph Wickert 2011-01-21 07:12:44 UTC
Works fine for me:
$ xprop -root _DT_SAVE_MODE
_DT_SAVE_MODE(STRING) = "xfce4"
Comment 2 Rex Dieter 2011-01-21 07:14:36 UTC
Reporter, what does
xprop -root _DT_SAVE_MODE
report for you then?
Comment 3 Rex Dieter 2011-01-21 07:15:07 UTC
and what version of xdg-utils are you using?
Comment 4 Rex Dieter 2011-01-21 07:22:03 UTC
I suppose we could fallback to try $DESKTOP_SESSION env, on my xfce-4.6 environment, it reports

$ echo $DESKTOP_SESSION
xfce4

(and apparently xfce 4.8 returns just 'xfce', but I'd like to confirm if you see that too)
Comment 5 georgy@kibardin.name 2011-01-21 10:27:42 UTC
xprop -root _DT_SAVE_MODE is used by xdg-open script to detect that currently running DE is xfce. For me it worked fine in xfce 4.6, but in 4.8 it doesn't work. 

$ echo $DESKTOP_SESSION
xfce

(not xfce4)

I'm using xdg-utils 1.0.2 in Arch
Comment 6 georgy@kibardin.name 2011-01-21 10:29:26 UTC
Sorry, forgot to paste this:

$ xprop -root _DT_SAVE_MODE
_DT_SAVE_MODE:  no such atom on any window.
Comment 7 mkkot 2011-02-06 13:53:50 UTC
Confirming this problem. I use Archlinux as the reporter. People, it's really serious, Chromium opens all files in Mozilla Firefox (!!) and Xarchiver does the same. I had to manually edit all xdg-* scripts (can't send a patch because it's a dirty hack :)
Comment 8 Rex Dieter 2011-02-06 14:02:08 UTC
I'd suggestion someone with contact with xfce upstream... ask them how best to detect it.
Comment 9 georgy@kibardin.name 2011-02-06 22:13:43 UTC
mkkot, as a workaround I would suggest to make "export DE=xfce" somewhere. This act as a fallback entry for xdg-open when desktop environment isn't detected.
Comment 10 alex 2011-02-15 11:18:41 UTC
Bug #25941 seems to be related.

(In reply to comment #9)
> mkkot, as a workaround I would suggest to make "export DE=xfce" somewhere. This
> act as a fallback entry for xdg-open when desktop environment isn't detected.

This doesn't work since this commit: http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=c9551d250722081cbf7d6611f417bc597765e5c9 .
Comment 11 Rex Dieter 2011-02-15 11:46:45 UTC
In retrospect, I'm unsure of the wisdom of clearing DE in that referenced commit.  Perhaps that portion should be reverted (unless there was some good reason for it, that I fail to fathom).
Comment 12 georgy@kibardin.name 2011-02-15 23:37:30 UTC
(In reply to comment #11)
> In retrospect, I'm unsure of the wisdom of clearing DE in that referenced
> commit.  Perhaps that portion should be reverted (unless there was some good
> reason for it, that I fail to fathom).

Totally agree, I had to remove this line so that my workaround with "export DE=xfce" could work again.
Comment 13 safonas 2011-02-26 18:08:41 UTC
Commenting out this DE clearing helped me. It doesn't overwrite my "export DE=xfce" in .xinitrc. Ideally there should be a check if it was already defined manually.
Comment 14 Rex Dieter 2011-03-28 08:52:55 UTC
this should hopefully do the trick:

http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=a9d65ff51ce0dd40cf0cb39b0f3c36dca100c527

For posterity, I would still appreciate someone investigate why/how xprop fails on some platforms and/or ping xfce upstream for a better or proper way to detect it's use.

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.