You are not logged in.

#1 2014-11-23 23:28:55

marcoms
Member
From: London
Registered: 2014-04-01
Posts: 10

xdg-open is indecisive and causes applications to not respond!

For some reason, xdg-open will not respond usually when only called once on a file. Repeating the command rapidly however will work eventually (!?)

$ touch foo.txt
$ xdg-open foo.txt
$ xdg-open foo.txt
$ xdg-open foo.txt  # after rapid [up-key]+[enter]s, this will work, for example
$ xdg-mime query filetype foo.txt
text/plain
$ xdg-mime query default text/plain
org.gnome.gedit.desktop

It looks like everything should work fine, from the examples given above, but the problem is there. As a result, I have to repeat the command rapidly in the command line to work, and in Chromium I have to keep on clicking "open in folder" to get Nautilus to launch sad

--

I remember when the problem started - it was when I installed libreoffice, and for whatever not-so-smart reason, it sets itself as the default app for text/plain, and application/javascript, in my limited usage. So I used:

$ xdg-mime default gedit.desktop text/plain
$ xdg-mime default gedit.desktop application/javascript

... to try and solve the issue, however I faced the same symptoms I am facing now, and even after removing .local/applications/*, I'm still experiencing the same problems sad

I'm in desperate need of some help, and would appreciate anyone who has insight on this

Offline

#2 2014-11-23 23:56:13

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 726
Website

Re: xdg-open is indecisive and causes applications to not respond!

I assume you're using Gnome?
In that case xdg-open will pass its arguments to Gnome's own file-opener application (gvfs-open IIRC).
So what happens if you set defaults via Gnome's own tools for this?
There are also articles in the Wiki about xdg-open and default applications which might help.

Offline

#3 2014-11-24 17:23:49

marcoms
Member
From: London
Registered: 2014-04-01
Posts: 10

Re: xdg-open is indecisive and causes applications to not respond!

Unfortunately I had no luck...

$ gvfs-open foo.txt  # same result as usual
$ gvfs-mime --query text/plain
Default application for 'text/plain': org.gnome.gedit.desktop
Registered applications:
	org.gnome.gedit.desktop
Recommended applications:
	org.gnome.gedit.desktop
$ gvfs-mime --set text/plain org.gnome.gedit.desktop
Set org.gnome.gedit.desktop as the default for text/plain
$ gvfs-open foo.txt  # :(

I should mention that running xdg-open as root (though not recommended) opens gedit *immediately*

Offline

#4 2014-11-24 17:28:05

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 726
Website

Re: xdg-open is indecisive and causes applications to not respond!

Hmm ... sorry I can't help much more as I don't use Gnome or other DE, just Openbox + extra tools.
But maybe you could create a new user and try it out with a clean sheet of Gnome settings.

Offline

#5 2014-11-24 17:29:22

marcoms
Member
From: London
Registered: 2014-04-01
Posts: 10

Re: xdg-open is indecisive and causes applications to not respond!

Actually, using

su

starts gedit immediately, whereas sudo has a delay, but eventually prints:

START /usr/bin/gedit "/home/marcoms/foo.txt"

EDIT: I tried a new user, but still the problem persists

Last edited by marcoms (2014-11-24 17:29:51)

Offline

#6 2014-12-17 18:47:28

ricardofunke
Member
Registered: 2009-11-03
Posts: 46

Re: xdg-open is indecisive and causes applications to not respond!

Same here, and this is what is printed in jounalctl:

Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x280004a (file-name)

Offline

#7 2014-12-22 05:27:47

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 658

Re: xdg-open is indecisive and causes applications to not respond!

I've had this bug ever since GNOME 3.14 came in to Arch but have never found anybody else reporting it so I thought it was something specific to my configuration. Glad to see some others have it!

If you run xdg-open once then it does start nautilus but nautilus does not open the window, e.g. "xdg-open .". Nautilus will stay running for about 1 min and it you run xdg-open again within that time it will work and open the window. As soon as Nautilus stops (or after you stop it with nautlius -q), then the next invocation of xdg-open will not work.

PS later edit: I should point out that, consistent with my description of the problem above, if you use Nautilus to manage your desktop (i.e. set "Icons on Desktop" in GNOME Tweak Tool) then you won't see this bug because Nautilus is always running.

Last edited by bulletmark (2014-12-22 05:34:16)

Offline

#8 2015-01-02 19:56:56

Henry78
Member
From: Vienna
Registered: 2012-01-23
Posts: 65

Re: xdg-open is indecisive and causes applications to not respond!

bulletmark wrote:

If you run xdg-open once then it does start nautilus but nautilus does not open the window, e.g. "xdg-open .". Nautilus will stay running for about 1 min and it you run xdg-open again within that time it will work and open the window. As soon as Nautilus stops (or after you stop it with nautlius -q), then the next invocation of xdg-open will not work.

Glad anybody has the same problem. And same thought of not-reporting-because-local. I'll open a bug tomorrow if nobody is quicker.

Offline

#9 2015-01-25 03:03:35

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 658

Re: xdg-open is indecisive and causes applications to not respond!

Henry78 wrote:

I'll open a bug tomorrow if nobody is quicker.

Henry, did you open a bug? And if you did can you please link to it here. Thanks.

Offline

#10 2015-01-25 23:19:33

Henry78
Member
From: Vienna
Registered: 2012-01-23
Posts: 65

Re: xdg-open is indecisive and causes applications to not respond!

Nope, I became father and completely forgot about it (mailbox is spilling). Will you take care about the bug report?

Offline

#11 2015-05-16 12:56:01

dquasar
Member
Registered: 2015-05-05
Posts: 9

Re: xdg-open is indecisive and causes applications to not respond!

Same problem here. I have to run two times xdg-open to actually open a folder with nautilus, this issue is only when I try to open folders, with sudo everything works fine, and with "nautilus "path"" also everything works.

Offline

#12 2015-06-01 18:53:02

Henry78
Member
From: Vienna
Registered: 2012-01-23
Posts: 65

Re: xdg-open is indecisive and causes applications to not respond!

Offline

#13 2015-06-01 23:04:47

ricardofunke
Member
Registered: 2009-11-03
Posts: 46

Re: xdg-open is indecisive and causes applications to not respond!

Voted and watching! Thanks!

Offline

Board footer

Powered by FluxBB