WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] pcmanfm - possible fix for your missing mime types  (Read 2859 times)

aus9

  • Guest
OK

Firstly I was inspired by GNUser (currently) private package for tinyopen.

There are some tricks here so forgive me if you already know this.

A You may have a TCE loading in your boot list
B You may TCE loading from ~/X.d  (maybe calling a ~/.local/bin file?)
C Manually loading a TCE

current pcmanfm does not refresh your mime types. No-one has noticed  ;D

Here is a possible fix.

Code: [Select]
tce-load -i desktop-file-utils shared-mime-info
sudo update-mime-database /usr/local/share/mime/
sudo update-desktop-database /usr/local/share/applications/

Now because I use various boot lists, I may be my worse enemy here. But I was mislead somewhat by noticing a pesky firefox web browser changing the time stamp and contents of a file I had under .config

It is taken me this long to find the following (YMMV)
-- you do not need local mimeapps.list and related files

If you manually load a TCE and clicking on a file in pcmanfm does not auto open your app,
you repeat above commands,
until I provide an updated install script
or better make a .local/bin by providing a shebang.

so with pcmanfm open.....I loaded feh and mtpaint....and they appeared in my context menu without closing and re-opening pcmanfm

It is still not perfect but for main files like most audio video text files, mime handling appears OK with this fix.

Hope that helps.

PS spacefm has those 2 TCEs either in the dep file or recursive and install script
refreshes those databases.

I have not tested the loading of a package after loading spacefm as this is not about that TCE
but anyone building a new filemanager might like to have a gander at coreplayer2's install script.

Thanks for reading

If you do want to change the order of choices to open a file, then sure you are likely going to need to do a lot more with mime handling. Thats above my payscale ATM  ;D
« Last Edit: August 15, 2020, 09:43:33 AM by Rich »

aus9

  • Guest
Re: pcmanfm - possible fix for your missing mime types
« Reply #1 on: July 31, 2020, 04:34:24 AM »
if anyone is interested, I tested that possible fix against both pcmanfm and spacefm.
FM=file manager.....exe=executable........It works as expected.

Full reboot with not all TCEs in your boot list but with either pcmanfm or spacefm in list.
open either FM and for a right hand mouse user RH click to bring up context menu.

For any association already setup ....that menu will offer a choice of exes or only one.
So clicking that file will open the first named exe

Now load a rival app that can open that file type.
With either FM open....no extra exe appears in menu.
Run possible fix command -> the context menu changes to offer that new exe

I plan to submit a TCE called update-desktops that might assist users of these FMs YMMV

Thanks for reading

aus9

  • Guest
Re: pcmanfm - possible fix for your missing mime types
« Reply #2 on: August 15, 2020, 08:40:44 AM »
@Rich

Can you mark as solved please. Thanks heaps  ;D

Below are comments for those interested.

I finally got around to submitting a new dep and new info file for anyone using pcmanfm and that with luck means if a member loads all packages at boot....pcmanfm should find an executable to open certain mime types. And if they load a package by X.d or ondemand (I don't use it either) or manually, and they remember to run the command showing in update-desktops....those new packages "should" also appear in pcmanfm.

There are still some issues for pcmanfm, but its size makes it - for me - better than spacefm as I use it to control wallpaper for my desktop.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: [Solved] pcmanfm - possible fix for your missing mime types
« Reply #3 on: August 15, 2020, 09:45:37 AM »
Hi aus9
Can you mark as solved please. Thanks heaps  ;D
Why yes, yes I can.  :D