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.


#8

Yes, I have all of those packages.

I think the issue has nothing to do with MIME types, but rather with the fact that pcmanfm-qt does not fully refresh itself when important things happens. For instance, I’ve also noticed that if I click on a file, press F2, then rename the file, the new name does not appear until I manually refresh the file manager window by pressing F5.


(Pedram Pourang) #9

If that really happened, we’d announce an emergency :wink:

Something’s wrong with your installation; I have no idea what it is, especially with outdated packages.


#10

I figured it’s an issue with my system. Oh, well. I’m stuck with 0.13 for now, since that’s what OpenBSD (version 6.4 as well as the new 6.5) have in ports. Probably the only way for me to upgrade would be to compile all of LXQt (perhaps also some dependencies) myself. With a wife and three kids, no way I’d ever find the time :frowning:

Anyway, thank you for all your help. Guess I’ll just have to live with these little issues. If I ever do find out what is it about my system that pcmanfm-qt 0.13 doesn’t like, I’ll make sure to post it here.


(Pedram Pourang) #11

Sorry that I couldn’t help.

LXQt compilation isn’t that hard but I don’t know about package building on *BSD. I wouldn’t recommend direct installation from sources.