Incorrect filetype association for files created in ~/Desktop


#1

I noticed something very strange about pcmanfm-qt 0.13.0: Any files created in my desktop directory is seen as a plain text file, regardless of file type.

Even more strange: If file is moved to a different directory, filetype is then correct and continues to be correct if file is moved back to the desktop.

To reproduce:

  1. Download a file (for example, an image file) to desktop or create an image file there, for example with this command: $ import -window root ~/Desktop/test.jpg

  2. Right-click on the file’s icon, choose Properties. It says “MIME type: text/plain” (wrong).

  3. $ mv ~/Desktop/test.jpg ~/test.jpg; mv ~/test.jpg ~/Desktop/test.jpg

  4. Right-click on the file’s icon, choose Properties. Now it is says “MIME type: image/jpeg” (correct).

What gives? I use my desktop directory a lot and would like to find a fix or workaround.


(Pedram Pourang) #2

There’s no bug to fix or work around. Something is broken or missing in your system.

pcmanfm-qt 0.13.0 is outdated, although what you see isn’t related to that.


#3

Thank you, tsujan. Knowing the inner workings of LXQt, does the issue suggest anything to you regarding what might be missing or broken? I have no leads at the moment.


#4

Hmmm, I discovered that if I create a file on Desktop (e.g., by downloading or through output of a command in terminal), then open up a pcmanfm-qt window, navigate to ~/Desktop, and press F5, the MIME type of the file corrects itself from text/plain to whatever is correct.

So file creation needs to trigger pcmanfm-qt to parse the file and determine MIME type. On my system this does not seem to happen automatically.


(Pedram Pourang) #5

The core of libfm-qt 0.14 is very different from that of 0.13. PCMan ported all remaining libfm based functionalities to C++, so that libfm-qt became self-sufficient. Then, lots of small but serious bugs/regressions were found and fixed in 2018.

So, I really have no idea what could cause that with 0.13; thinking in terms of an old code would be a waste of time even if possible.

I recommend you upgrade to 0.14. I think it’ll come to non-LTS distros soon.


#6

Thank you for this. Maybe it’s time I roll up my sleeves and compile 0.14. If not, 0.14 will certainly be in the OpenBSD 6.5 (expected in May) repos.

Either way, I’ll stop asking for support for LXQt 0.13. Sorry for the noise and thank you very much for your help.


(Pedram Pourang) #7

If it’s OpenBSD, are you sure that you’ve installed important recommended packages? For example, gvfs packages, shared-mime-info, perl-file-mimeinfo… as they’re called in Arch.