You are not logged in.

#1 2009-10-13 04:15:28

smellsource
Member
Registered: 2009-10-13
Posts: 1

xdg-open ignores defaults.list and opens everything in firefox

Hello.

Running Archlinux with LXDE. The topic describes my problem. I'm not sure if it's relevent, but I was running KDE-mod. I've removed most of it save for what is required to continue using some of the KDE applications I like (eg. k3b).

PCManFM opens files correctly, I only notice this weird behaviour when executing xdg-open from the command line.

Thanks for any help you might be able to give!

Offline

#2 2009-10-14 23:34:31

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: xdg-open ignores defaults.list and opens everything in firefox

I have the same problem.
Firefox should only be associated with html.

I use pekwm.


Arch x64 on Thinkpad X200s/W530

Offline

#3 2009-11-20 01:40:31

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: xdg-open ignores defaults.list and opens everything in firefox

I have the same problem.  I'm using icewm.  I use xdg-mime to query default application for certain file type and they're correct (i.e "xdg-mime query default image/png", returns "geeqie.desktop", which is correct), but when I use xdg-open, it always opens in firefox.  Any suggestion?  Thanks

Offline

#4 2009-11-20 02:43:02

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: xdg-open ignores defaults.list and opens everything in firefox

Offline

#5 2009-12-16 22:51:18

indelhi
Member
Registered: 2007-10-10
Posts: 3

Re: xdg-open ignores defaults.list and opens everything in firefox

I patch xdg-open as follows:

--- /usr/bin/xdg-open.orig      2009-12-16 17:41:58.000000000 -0500
+++ /usr/bin/xdg-open   2009-12-16 17:43:20.000000000 -0500
@@ -304,6 +304,7 @@
     if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
     elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
     elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+    elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
     fi
}

@@ -426,6 +427,10 @@
     open_xfce "$url"
     ;;

+    lxde)
+    pcmanfm "$url"
+    ;;
+
     generic)
     open_generic "$url"
     ;;
~

In short, add a line in detectDE to detect LXDE and then add pcmanfm as the default opener in open_generic.  Incidentally, chromium uses xdg-open .. so this helps open files from it.

Offline

#6 2009-12-17 00:04:45

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: xdg-open ignores defaults.list and opens everything in firefox

xdg-open doesn't care about what xdg-mime says. If you're in GNOME, KDE, or XFCE, it uses the default app set by that desktop. Otherwise, it uses $BROWSER, or "firefox" if there's no $BROWSER set either. Very stupid...

Offline

#7 2009-12-17 00:32:51

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: xdg-open ignores defaults.list and opens everything in firefox

tri1976 wrote:

for completeness, the solutions: put one of those in your X startup file:

export DE=kde
export DE=gnome

He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#8 2011-12-02 08:07:23

JohnDVD
Member
Registered: 2011-11-29
Posts: 39

Re: xdg-open ignores defaults.list and opens everything in firefox

Rasi wrote:

for completeness, the solutions: put one of those in your X startup file:

export DE=kde
export DE=gnome

...which means ~/.xinitrc

This solves the problem, even if no gnome or kde is installed. I'm using icewm.

Thanks for the solution.

Offline

#9 2011-12-02 12:11:07

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: xdg-open ignores defaults.list and opens everything in firefox

Two years old thread and nothing new. Keep it read-only now.
Please read our forum etiquette on necro-bumping.

Closing.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB