Have multiple 'open with' applications in context menu

I work with a lot of csv files and I open them with either gedit or libreoffice at different times. I would like to have them both in the context menu to save time.

In the past, there was this sub-menu where I could select open with and it lists other applications, without opening a second menu. This new behaviour wastes several useful seconds.

Is there an option to bring this context menu entry back? Or any hacks to get a similar behaviour?


I don't think you can bring the old behaviour back without adapting source code. However, clicking wise, the current behaviour is not that bad. As before, you need three clicks to launch a file/document with another application. The only difference is that the last step is a double-click rather than a single click. Yes, rather than clicking the application and then the "Select" button, you can double-click the application.

The first time, the "Recommended Applications" dialog will be empty. However, that list gets populated with the applications you designate. So in your case, "Text Editor" (gedit) and "Libreoffice Writer" will make it to that list. You select the program with a double click, whereas with the previous approach of the submenu, it would have been a single click.

Personally, I like the interface better, because the program icons are presented in a larger size and the dialog is not prone to closing when you hover the mouse a bit in the wrong direction.

Alternatively, you may workaround with nautilus script, but this is not sensitive to the file that you selected.

As a third option, you can configure fully context sensitive right-click menu items with the third party application nautilus-actions. Installation may nowadays be less straightforward, and if you get it working properly, you will face some learning curve. It is powerful but also a bit complex.


Instead of focusing trying to open multiple apps, let's have a single app that opens the file in multiple other apps. For that we can create a custom .desktop file in ./.local/share/applications/ and lets call it open_dual.desktop. Contents are as so ( Icon= is optional, so not included; also note I don't have libre office, so using wps in this example instead, but for you the command should be libreoffice --writer ):

[Desktop Entry]
Name=Dual Open
Exec=bash -c 'setsid gedit "$1" & setsid wps "$1" &' sh %F
Terminal=false
Type=Application
MimeType=text/plain;text/csv;

Once that is done you should be able to ad that to the "open with" menu.


Alternatively, as a Nautilus script. Save it in .local/share/nautilus/scripts/ and lets call it dual_open.sh

#!/usr/bin/env bash
setsid gedit "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" &
setsid libreoffice --writer "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" &

Make the script executable with chmod +x ~/.local/share/nautilus/scripts/dual_open.sh. Now you should have a menu "scripts" when you right click on the file and dual_open.sh should be available as an option.