Page 1 of 1

How to add an image application to ROX right-click menu

Posted: Wed Aug 09, 2023 6:51 am
by step

ROX-Filer: How to add an image processing application to the right-click menu

This worked-out example concerns fotoxx (GTK3) for Fatdog64 900 in response to this question.

General method (applied example further down):

  • Create a folder named .image in your rox "SendTo" configuration folder (see the second code block further down). Rox interprets this folder as a bridge between icons of image files and image applications.

  • Create a folder named IMAGE in your rox "SendTo" configuration folder. This folder will visually group the image processing applications that your will want to add in the future. It's for keeping the right-click menu tidier.

  • Create a symbolic link to the .desktop file of an image application from a new file in the IMAGE folder. The name of the new file becomes the label of the new submenu entry. System-wide .desktop files are normally found in /usr/share/applications, sometimes in /usr/local/share/applications.

________

Example for fotoxx (GTK3)

Note: this example starts by creating a private .desktop file for fotoxx. This step is peculiar to fotoxx (GTK3) as discussed in the other thread. Also the Exec= line is peculiar to that thread. Generally speaking you will simply link to a pre-existing .desktop file.

Create file /root/.local/share/applications/fotoxx_gtk3.desktop with the following contents:

Code: Select all

[Desktop Entry]
Name=fotoxx gtk3
GenericName=Photo Editor
Comment=Edit photos and manage collections
Categories=Graphics;Photography;
Type=Application
Terminal=false
MimeType=image/bmp;image/gif;image/tiff;image/jpeg;image/png;image/webp;
Exec=env CLUTTER_BACKEND=x11 /usr/bin/fotoxx %F
Icon=/usr/share/fotoxx/icons/fotoxx.png

In a terminal run the following commands:

Code: Select all

mkdir -p "/root/.config/rox.sourceforge.net/SendTo/.image/IMAGE/fotoxx gtk3"
ln -sf /root/.local/share/applications/fotoxx_gtk3.desktop "/root/.config/rox.sourceforge.net/SendTo/.image/IMAGE/fotoxx gtk3"

Now when you right-click the icon of an image file in rox, you will see the new menu entry IMAGE, which leads to its own submenu with fotoxx gtk3 inside.

You can add more image programs to the IMAGE submenu by symbolically linking their desktop files.


Re: How to add an image application to ROX right-click menu

Posted: Wed Aug 09, 2023 12:45 pm
by proebler

@step
Thank you for your detailed instructions. I got it all working, including the right-click menu in rox - a luxury :) .
I have made an sfs for fotoxx-gtk3-25.0 with all the required dependencies. The size is 44MB.
The /etc/profile.d/clutter-backend.sh gets created and loaded automatically when the sfs loads (I assume it comes with fotoxx ? edit: it is in libclutter), there is no need to create it.
Note that in your instruction there is an error,

Code: Select all

ln -sf /root/.local/share/applications/fotoxx_gtk3.desktop "/root/.config/rox.sourceforge.net/SendTo/.image/IMAGE/fotoxx gtk3"

it should be

Code: Select all

ln -sf /usr/share/applications/fotoxx_gtk3.desktop "/root/.config/rox.sourceforge.net/SendTo/.image/IMAGE/fotoxx gtk3"

Q: did you edit your post or did I not read in the Exec line in fotoxx_gtk3.desktop ? :?

Code: Select all

env CLUTTER_BACKEND=x11 /usr/bin/fotoxx \"$@\" fotoxx %F

regards proebler


Re: How to add an image application to ROX right-click menu

Posted: Wed Aug 09, 2023 7:53 pm
by step
proebler wrote: Wed Aug 09, 2023 12:45 pm

Note that in your instruction there is an error,

Code: Select all

ln -sf /root/.local/share/applications/fotoxx_gtk3.desktop "/root/.config/rox.sourceforge.net/SendTo/.image/IMAGE/fotoxx gtk3"

it should be

Code: Select all

ln -sf /usr/share/applications/fotoxx_gtk3.desktop "/root/.config/rox.sourceforge.net/SendTo/.image/IMAGE/fotoxx gtk3"

They're both correct. Yours is the system location for .desktop files. Mine is the user's (private) location for .desktop files. They should both work for rox.

Q: did you edit your post or did I not read in the Exec line in fotoxx_gtk3.desktop ? :?

Code: Select all

env CLUTTER_BACKEND=x11 /usr/bin/fotoxx \"$@\" fotoxx %F

regards proebler

I edited my post. I had hastily pasted the original line above. The \"$@\" is for something else that you don't really need.