You are not logged in.
Hi everyone,
I hope I am at the right place to post this.
I created a trash.desktop file and I would like all the MIME types getting an [Added Associations] to it. Is it possible without adding MIME type by MIME type in the ~/.config/mimeapps.list file ([Added Associations] section)? I think everything is well set, I just want my file manager (pcmanfm) to propose my trash application in "Open With" for all the files, doesn't matter their MIME types.
I already tried in ~/.config/mimeapps.list:
[Added Associations]
application/octet-stream=trash.desktop;
Thank you for your time.
Last edited by Yann (2017-12-08 22:52:28)
all different - all equal
Offline
Maybe I'm not understanding fully, but if you are using PCManFM, then this is the sort of procedure which could work well:
Firstly, create the directory: ~/.local/share/file-manager/actions
Then create 'trash.desktop' within this directory:
[Desktop Entry]
Name=My trash
Tooltip=Customized trash
Icon=user-trash
Profiles=on_files;
[X-Action-Profile on_files]
Name=Trash
MimeTypes=all/all;
Schemes=file;
Exec=trashcommand %F
where obviously you replace 'trashcommand' (or the Icon) with whatever you wish to use.
The choice 'My trash' will then appear in the PCManFM context menu (NOT under Open With)'
Would this do what you want?
PS: PCManFM follows the 'Desktop file specification extension' (DES-EMA)
Offline
Thank you very much ninian for your quick answer.
Your solution completely solved my problem. Thank you so much.
I took a long time few weeks ago looking for a way to customize the PCManFM menu and I did not find what you suggest. I missed a huge part of the PCManFM customization possibilities.
I assume I have to add the string "[SOLVED]" at the beginning of the title post?
Thank you for your time.
all different - all equal
Offline
You are most welcome
Yes, please add [SOLVED] to the title post.
I first saw this capability on the LXDE Wiki but it's not terribly easy to find elsewhere.
Note that you can also add a menu to the context menu, by adding a file like this, say mymenu.desktop to ~/.local/share/file-manager/actions/:
[Desktop Entry]
Type=Menu
Name=MyMenu
Tooltip=Open my own applications
Icon=applications-accessories
ItemsList=myapp1;myapp2;myapp3
where you would also place the files: myapp1.desktop, myapp2.desktop, myapp3.desktop.
These files would be formatted similarly to your 'trash' example.
Offline
Yes, I read all the 'Desktop file specification extension' page you linked to me and discovered the "ItemList" possibility.
One more time thank you for your time.
all different - all equal
Offline