You are not logged in.
Only recently I observed that it was no longer possible to open a file via nnn or lf file managers. Instead of opening the file the system produces another file called "test.--version" in the current directory and starts eating up the whole RAM until it eventually freezes.
I further investigated the issue and found out that there is not a single "mimeapps.list" file present on the system and that the command
xdg-mime query filetype FILE
seems to cause the problem.
Furthermore it is worth noting that this issue only occurs when using a window manager (dwm, herbstluftwm) and not when using a desktop environment (XFCE, Gnome).
Any ideas what I can do about this issue? Thanks in advance!
Last edited by blutlauge (2024-04-28 06:18:57)
Offline
xdg-mime is a shell script, you can add "set -x" below the shebang to trace its execution.
only occurs when using a window manager (dwm, herbstluftwm) and not when using a desktop environment
Do you start the sessions the same way (eg. lightdm ot startx)?
Offline
Thanks for the quick reply!
In fact I knew that xdg-mime is a shell script. I had a look at it and even did a
bash -x xdg-mime query filetype FILE
before. But I could not figure out where the problem lies.
After reading your response I had another look and eventually found the cause of the weird behavior. I wrote a shell script called "mimetype" - I renamed it only recently - for automating the creation of a personal mimeapps.list file. And xdg-mime checks whether an executable called "mimetype" is present on the system via
if mimetype --version > /dev/null 2&>1; then
...
and therefore calls my shell script with the argument "--version". Consequently the file "test.--version" is created by my shell script. This check is only performed when not using a desktop environment. I renamed my script and now xdg-mime works as it should again.
Last edited by blutlauge (2024-04-28 07:10:41)
Offline