You are not logged in.

#1 2019-08-07 17:50:58

Mendess
Member
Registered: 2019-08-07
Posts: 5

xdg-open and xdg-mime hang and consume CPU cycles doing nothing.

This started happening after I used them to open some xls files with libreoffice.

Both of them never finish execution but in different ways, I ran `strace` to verify this:
- `xdg-open` tries to `lstat` every file in the directory it's in.
- `xdg-mime` blocks on a read from a pipe.

From what I understand of the code in `xdg-open` (it's a shell script) it's recursively trying to find a something.desktop file. But I've never had this problem.

If anyone knows how to fix this I'd be much a appreciated as it's probably something that I need to configure.

EDIT: I found that if I run `xdg-open` from `/` it works fine because it (I assume) finds the `/usr/share/applications/` directory where the *.desktop files are located. I don't know why it stopped looking at that folder.

Last edited by Mendess (2019-08-07 18:16:09)

Offline

#2 2020-02-19 13:10:03

scippio
Member
Registered: 2007-01-02
Posts: 74

Re: xdg-open and xdg-mime hang and consume CPU cycles doing nothing.

This started happening on my system today after upgrade sad

example: xdg-open <url>
I'm using google-chrome.desktop for urls...

EDIT: And yes... when I'm in root / it's working...

EDIT2: When I copy google-chrome.desktop from /usr/share/applications to my /home/scippio/.local/share/applications ... it works with urls ...

Last edited by scippio (2020-02-19 13:29:47)


Sorry for my English...

Offline

#3 2020-02-20 11:37:52

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,442

Re: xdg-open and xdg-mime hang and consume CPU cycles doing nothing.

https://wiki.archlinux.org/index.php/XD … eapps.list

Check mimeapps.list and somedesktopenvironment-mimeapps.list files in those locations.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2020-02-24 07:58:01

lainproliant
Member
From: Seattle, WA
Registered: 2019-11-30
Posts: 1
Website

Re: xdg-open and xdg-mime hang and consume CPU cycles doing nothing.

This was happening to me too.

With no output from `xdg-open`, I decided to give `strace xdg-open https://google.com` a try.  Turns out xdg-open recursively searches `~/.local/share/applications` for `firefox.desktop`, following symlinks and expanding them to the current search directory.  But there was a huge directory structure there!  Turns out it was troving through all of the files I had installed for League of Legends through Lutris.  Since I don't use a desktop environment, and I don't need desktop entries for League of Legends or my steam games, I simply deleted the extraneous stuff, and `xdg-open` began working again.

I hope this helps.

Offline

Board footer

Powered by FluxBB