You are not logged in.
Hello there,
Is there a way to customize PCManFM right-click menu? I'd like to add custom entries, for instance:
right click a folder and choose "Start slideshow" to get the following command executed: "qiv -smt <selected_folder>"
Can this be done? How?
This could be a system-wide setting or a user setting, I don't really care.
Thanks for any guidance.
Last edited by brazzmonkey (2009-03-16 20:42:36)
what goes up must come down
Offline
Hmm. I would be interested in this as well. I don't use LXDE, but I do use PCManFM as my filemanager in all my WM's
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I emailed PCMan. Hopefully he'll answer.
what goes up must come down
Offline
Without editing the source code, the only way that you're going to do it is to make custom .desktop files associated with actions. If you right click --> 'Open with', you can do it there. If your actions are complex, I'd write a script that does it, right click on whatever you want to associate the action with, then select your script.
Offline
My actions aren't complex.
I can right-click and select "open with", type the command and it works.
I can do a .desktop file that'll launch my command.
But how am I supposed to associate this .desktop file to the folder mime type (because I guess that's what I'm actually looking for)?
what goes up must come down
Offline
My actions aren't complex.
I can right-click and select "open with", type the command and it works.
I can do a .desktop file that'll launch my command.
But how am I supposed to associate this .desktop file to the folder mime type (because I guess that's what I'm actually looking for)?
If pcmanfm didn't automatically associate the mime type, you can add it to the .desktop file manually. But, you said folder mime type. Are you hoping to be able to right click a folder and do something? If so, I have no idea how to accomplish that other than:
--EDIT--
If one feels really adventurous, the code for the right click menu is in pcmanfm-<your_version>/src/ptk/ptk-file-menu.c'
Offline
I think when you open with a command you provide , a desktop file is auto-created in '~/.local/share/applications' .
English is not my native language .
Offline
I think when you open with a command you provide , a desktop file is auto-created in '~/.local/share/applications' .
Yes it is. However, the problem is that it reads the ~/.local/share/applications as well as /usr/share/applications. That's why when I use, lets say Geany to open any file, the next time there are two entries for Geany.
Is there a way to avoid this?
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Is there a way to avoid this?
Am I missing something here ?
If the .desktop file is already in '/usr/share/applications' , An entry should appear in the "All Applications" tab . You can choose this entry to open the file and avoid providing the command manually .
English is not my native language .
Offline
Inxsible wrote:Is there a way to avoid this?
Am I missing something here ?
If the .desktop file is already in '/usr/share/applications' , An entry should appear in the "All Applications" tab . You can choose this entry to open the file and avoid providing the command manually .
Yup that's what I am doing, but on selecting an app from the All Applications tab, it creates a .desktop file in my home folder under the .local folder. The next time you try to go into the Open With menu, Geany (or any other app - that I selected from the All Applications list) shows up twice.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I think when you open with a command you provide , a desktop file is auto-created in '~/.local/share/applications' .
Aaaaaah! Priceless input!!! Thanks a bunch Nezmer!!
I've got to have something like this:
[MIME Cache]
inode/directory=qiv-usercreated-0.desktop
in ~/.local/share/applications, and a qiv.desktop in the very same folder.
For record, for my qiv, this gives me:
[Desktop Entry]
Encoding=UTF-8
Name=Sildeshow (random, recursive)
Exec=qiv -Rrlfstmiu
MimeType=image/jpeg
Icon=exec
NoDisplay=false
Not exactely straightforward, but finally it works.
Thanks anyone, I hope it'll be useful for you too.
what goes up must come down
Offline
Yup that's what I am doing, but on selecting an app from the All Applications tab, it creates a .desktop file in my home folder under the .local folder. The next time you try to go into the Open With menu, Geany (or any other app - that I selected from the All Applications list) shows up twice.
Well , I'm not sure what's the problem here . I only see this when I attach a media player(e.g mplayer) to different file formats . PcManFM seems to insist on creating a .desktop file for each association but I don't see duplicate entries in the menu .
~/.local/share/applications$ ls | grep mplayer
mplayer-usercreated-1-usercustom-0.desktop
mplayer-usercreated-1-usercustom-1.desktop
mplayer-usercreated-1-usercustom-2.desktop
mplayer-usercreated-1-usercustom-3-usercustom-0-usercustom-0.desktop
mplayer-usercreated-1-usercustom-3-usercustom-0.desktop
mplayer-usercreated-1-usercustom-3.desktop
mplayer-usercreated-1.desktop
smplayer-usercustom-0-usercustom-0-usercustom-0-usercustom-0.desktop
smplayer-usercustom-0-usercustom-0-usercustom-0-usercustom-1.desktop
smplayer-usercustom-0-usercustom-0-usercustom-0.desktop
Last edited by Nezmer (2009-03-16 22:50:28)
English is not my native language .
Offline
IMHO, his feature is very confusing from a user point of view... and I haven't found a proper documentation for it... If you know about some useful resources, please let me know.
I needed to add another entry, and this has been a hassle: I couldn't found a way to get 2 custom entries in my menu... until I found out that (by lucky trial and error):
/home/photos/.local/share/applications/mimeinfo.cache
[MIME Cache]
inode/directory=lazyslideshow-usercreated-0.desktop;qiv-usercreated-0.desktop
application/x-shellscript=sh-usercreated-0.desktop
text/plain=leafpad-usercreated-0.desktop
.desktop files
lazyslideshow-usercreated-0.desktop
qiv-usercreated-0.desktop
Now I know LXDE will never be my desktop of choice...
what goes up must come down
Offline
I'm a little late to the party but I hit this issue so I thought I would share my solution. It works pretty well and is very flexible.
http://igurublog.wordpress.com/downloads/mod-pcmanfm/
Offline