Posts: 1,028
SamK
Joined: 21 Aug 2011
#1
An"Open With" function is often found in a file manager but is not avaiable in ROX. Instead it offers Set Run Action and Customise Menu. Neither of these are friendly for novice users. Both provide very concise help prompts containing technical terminology.

When using Linux for the very first time how many of us understood terms such as 'text/<anything>', enter a shell command, symlink, etc? How many of us knew where the applications are stored?
Probably none.

The following adds an entry"Open With Menu" to ROX-Filer (via right-click-->Send To). Using it automatically opens three windows:
  1. Shows the icons for apps installed in the system
  2. Opens at the Send To directory for apps that work with the selected file
  3. Displays a step-by step guide on what to do
The short version is drag an icon from window 1 to window 2.



Install the Script
  1. Download open-with-menu.sh.zip attached at the foot of this post
  2. As root extract it to /usr/local/bin/open-with-menu.sh
  3. Download open-with-menu.png.zip attached at the foot of this post
  4. As root extract it to /usr/share/pixmaps/open-with-menu.png


Set Up the Menu Entry in ROX-Filer
Do the following as your normal user in ROX-Filer
  1. Open the directory /home/USERNAME/.config/rox.sourceforge.net/SendTo/
  2. Drag-n-drop /usr/local/bin/open-with-menu.sh to it and create a symlink
  3. Right-Click on the symlink-->Rename it Open With Menu
  4. Right-Click on the symlink-->Set icon. Select Only for the file...
  5. Drag-n-drop /usr/share/pixmaps/open-with-menu.png to the set icon box

To use, highlight a file, right-click-->Send To-->Open With Menu and follow the steps in the guide.


Abstact from guide
Open With Menu Guide


Purpose
Add one or more apps to the ROX-Filer right-click menu via drag-and-drop.


Summary
In ROX-Filer, right-clicking on a file displays a pop-up menu. At the head of the
menu is an area that shows apps added by you, the user. Choosing one of
these apps opens it with the selected file.

The apps displayed in this pop-up menu change depending upon the type of file
you right-clicked on. Only apps that work with the type of file selected are
displayed.

It is possible to have multiple apps in the menu that will work on a single
type of file. For example, if your photos are jpeg type files, you might have
an app to view image files and a different app to edit them.


Example
Add two apps that can open a file named filename.jpeg

1. Highlight a jpeg file in ROX-Filer
2. Right-Click-->Send To-->Open With Menu
3. Drag-and-drop mirage.desktop (a viewer) and mtpaint.desktop (an editor)
from the window named /usr/share/applications
to the window named ~/.config.sourceforge.net/SendTo/.image_jpeg
4. Choose Link (relative) when prompted
5. On the mirage.desktop link, right-click-->Rename
6. Rename mirage.desktop to Open With Mirage
7. Repeat renaming mtpaint.desktop to Open With mtPaint

A right-click on a jpeg or jpg file will display both apps at the head of the pop-up menu.


Apps can also be removed from the pop-up menu.

Example
Remove"Open With mtPaint" for jpeg type files

1. Highlight a jpeg file in ROX-Filer
2. Right-Click-->Send To-->Open With Menu
3. In the window named ~/.config.sourceforge.net/SendTo/.image_jpeg
Delete"Open with mtPaint"
A screen shot of it in action
Screen shot of all three windows open and the Open With menu entries for mirage and mtpaint created as described in the guide.
Screen shot of all three windows open and the Open With menu entries for mirage and mtpaint created as described in the guide.




Edit: 2013-Sep-11 uploaded script again with minor revision to place guide in /tmp