4

I am using Gnome with Archlinux. My default file manager is Nautilus. How do I add recommended apps in "right-click" menu? (Ubuntu-like) They listed only, when I click "Open with other Application" But it's too long!

Nike
  • 1,223
  • 2
  • 19
  • 42

2 Answers2

4

Items in Nautilus's 'Open With Other Application' dialogue are added to to the 'recommended' list automatically after using it once (successfully).

Create a desktop-file in ~/.local/share/applications/ to add another item to the list of available applications.

Example entry to mount disk images (like LUKS container) writable (copied from /usr/share/applications/gnome-disk-image-mounter.desktop):

[Desktop Entry]
Name=Disk Image Mounter (rw)
Comment=Mount Disk Images writable
Exec=gnome-disk-image-mounter --writable %U
Icon=drive-removable-media
MimeType=application/x-cd-image;application/x-raw-disk-image;
Terminal=false
StartupNotify=false
Type=Application
NoDisplay=true

Refer to man update-desktop-database or man desktop-file-install for more information about desktop-files.

doak
  • 809
  • 9
  • 24
  • The important part is MimeType. That is the crucial part that makes your app to appear in "Recommended apps" when you click on "Open with". You can copy the MimeType from a a .desktop of one of the recommended listed – Allexj Jun 09 '23 at 15:38
1

To install nautilus-action on Ubuntu, run simply this command via the Terminal:

sudo apt-get install nautilus-actions

(or equivalant packet manager as yum or pacman)

After the installation is complete, let's now see a quick example of how to add an extra action to the right-click menu with nautilus-actions.

The example consists of adding to the right-click menu the "Edit With Gimp" action to edit, for example, image files using The Gimp (Image Editor).

_Using the dash search "nautilus-actions" and click Nautilus-Actions Configuration.

_Under the Action tab, fill the following fields:

  • Context label: The text that will be displayed in the right-click menu, in our example, it's "Edit With Gimp"
  • Icon: This option allows to select an icon for your action (optional)

_Open now the Command tab and fill in the following fields:

  • Label: Enter any label of your choice for your action.
  • Path: Enter the path to the program you want to use using the Browse button. For our example, we will simply type "gimp".
  • Parameters: Click the Legend button to get suggested parameters. In our example, we will use the %f parameter to be able to edit image files with The Gimp.

_Log out the current session and log on again, or simply restart Nautilus with these commands from the Terminal:

nautilus -q
nautilus
plombix
  • 396
  • 3
  • 13