You are not logged in.
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
--
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
I'm in desperate need of some help, and would appreciate anyone who has insight on this
Offline
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
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
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
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
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
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
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
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
Nope, I became father and completely forgot about it (mailbox is spilling). Will you take care about the bug report?
Offline
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
Opened a bug: https://bugs.archlinux.org/task/45167
Offline
Voted and watching! Thanks!
Offline