xdg-open doesn't properly detect Xfce/Xubuntu

Bug #1388922 reported by Danila Poyarkov
80
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Xdg-utils
Fix Released
Medium
xdg-utils (Ubuntu)
Undecided
Sean Davis

Bug Description

xdg-open doesn't detect the XFCE desktop environment on its fresh install on Ubuntu (not Xubuntu).
I was able to fix that by adding 'elif [ x"$DESKTOP_SESSION" = x"xubuntu" ]; then DE=xfce;' line in 'detectDE()' function.

Revision history for this message
In , George Kibardin (george-kibardin-deactivatedaccount) wrote :

it seems that "xprop -root _DT_SAVE_MODE" doesn't work anymore

Revision history for this message
In , Christoph Wickert (cwickert) wrote :

Works fine for me:
$ xprop -root _DT_SAVE_MODE
_DT_SAVE_MODE(STRING) = "xfce4"

Revision history for this message
In , Rdieter-math (rdieter-math) wrote :

Reporter, what does
xprop -root _DT_SAVE_MODE
report for you then?

Revision history for this message
In , Rdieter-math (rdieter-math) wrote :

and what version of xdg-utils are you using?

Revision history for this message
In , Rdieter-math (rdieter-math) wrote :

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)

Revision history for this message
In , George Kibardin (george-kibardin-deactivatedaccount) wrote :

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

Revision history for this message
In , George Kibardin (george-kibardin-deactivatedaccount) wrote :

Sorry, forgot to paste this:

$ xprop -root _DT_SAVE_MODE
_DT_SAVE_MODE: no such atom on any window.

Revision history for this message
In , mkkot (marcin2006) wrote :

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 :)

Revision history for this message
In , Rdieter-math (rdieter-math) wrote :

I'd suggestion someone with contact with xfce upstream... ask them how best to detect it.

Revision history for this message
In , George Kibardin (george-kibardin-deactivatedaccount) wrote :

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.

Revision history for this message
In , Iwtcex (iwtcex) wrote :

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 .

Revision history for this message
In , Rdieter-math (rdieter-math) wrote :

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).

Revision history for this message
In , George Kibardin (george-kibardin-deactivatedaccount) wrote :

(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.

Revision history for this message
In , Ja-safonau (ja-safonau) wrote :

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.

Revision history for this message
In , Rdieter-math (rdieter-math) wrote :

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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xdg-utils (Ubuntu):
status: New → Confirmed
Changed in xdg-utils:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Filipe Roque (flip-roque) wrote : Re: xdg-open doesn't properly detect XFCE DE

a pacth to attempt a correction for this bug

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bug1388922.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :
summary: - xdg-open doesn't properly detect XFCE DE
+ xdg-open doesn't properly detect Xfce/Xubuntu
tags: removed: patch
Revision history for this message
Jamin W. Collins (jcollins) wrote :

The patch referenced in post #17 won't correct this issue.

It's adding the following condition:
x"$DESKTOP_SESSION" = x"xfce"

However, that's not the value of DESKTOP_SESSION:

$ env | grep DESKTOP
DESKTOP_SESSION=xubuntu
XDG_SESSION_DESKTOP=xubuntu
XDG_CURRENT_DESKTOP=XFCE

A more correct check would be against XDG_CURRENT_DESKTOP

Revision history for this message
Michael MacEachern (maceach-b) wrote :

Can we finally fix this please? This still isn't working correctly in 15.04, and I still have to modify xdg-open.

Revision history for this message
Johan Gunnarsson (johang) wrote :

Still happens on Xubuntu 15.04, but fixed upstream.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-utils - 1.1.0~rc3+git20150907-1ubuntu1

---------------
xdg-utils (1.1.0~rc3+git20150907-1ubuntu1) wily; urgency=low

  * Merge from Debian unstable. Remaining changes: (LP: #1495273)
    - debian/patches:
      * gnome-3.0.diff: Correctly open preferred browser with
        gnome-open (LP: #670128)
      * lp779156-lubuntu.diff: Add open_lxde and run_sylpheed function
        for improved LXDE and sylpheed support (LP: #779156)
      * xdg-screensaver-restore-timeout.diff: restore previous X11
        screensaver timeout when xdg-screensaver resume is used (LP: #1363540)
  * New upstream release fixes the following bugs:
    - xdg-mime query filetype does not work on KDE 5 (LP: #1454833)
    - xdg-open doesn't properly detect Xfce/Xubuntu (LP: #1388922)
    - xserver-blanking patch in Ubuntu duplicates code (LP: #1330386)
    - Typo in manpage of 'xdg-icon-resource' (LP: #996304)
    - xdg-open (to gnome-open) fails to launch file:// URL with query string
      (LP: #396162)

 -- Sean Davis <email address hidden> Sun, 13 Sep 2015 12:39:10 -0400

Changed in xdg-utils (Ubuntu):
status: Confirmed → Fix Released
Pasi Lallinaho (knome)
Changed in xdg-utils (Ubuntu):
assignee: nobody → Sean Davis (bluesabre)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.