Create Shortcut for opening a Pdf using a particular Application in Ubuntu

Asked by Jason Liam

I am trying to find a way to create a shortcut for opening a pdf file with a particular application. For example this is what i do currently(manually):

Step 1. I have a pdf file say MyBook.pdf. I right click on this pdf so that a popup window appears with many options like:




Open with other application

Move to trash

Step 2. I chose/click Open with other application from the above menu and a new popup menu opens up with different options like:

Document Viewer

Google Chrome

Text Editor

Sublime Text


Step 3. I chose Okular from the above menu and the pdf opens up using Okular.

What i want is that these 3 manual steps should be encapsulated in keyboard shortcut like Ctrl + O + P

Is this possible in Ubuntu 18.04 ?

PS: I am using nautilus-folder-handler.desktop on Ubuntu 18.04


I want to be able to select any arbitrary pdf by single left click and then press a custom shortcut key that will open that selected pdf using a particular application such as okular.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Jason Liam
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :

Hover over the pdf file. Right click select Properties.
There are 4 tabs - Basic - Permissions - Open With - Document
Select Open With Tab.
Select from the list which application to open it with: Okular
At the bottom right of the screen Select: Set as default
Close window.
This should let you open the .pdf file by just clicking the file.

Revision history for this message
Jason Liam (jlame646) said :

I know i could do what you have suggested as i already use to do this. But my question is for any arbitrary application and any arbitrary file, be it pdf or text. I want to have this shortcut method(that i am asking about) besides the method you suggested. Currently i already use the method you suggested. But i want that i should be able to also press a keyboard shortcut and then some action should be taken on that selected file.

Revision history for this message
Jason Liam (jlame646) said :

I noticed that there is options like Ctrl+C for copying Ctrl+X for moving, Ctrl+I for checking the properties of a file just by a single left click and then pressing the corresponding shortcut. I want to do exactly this. That is the user left clicks one time on a file and then press the shortcut which will open the file with a given application.

Revision history for this message
Jason Liam (jlame646) said :
Revision history for this message
Bernard Stafford (bernard010) said (last edit ):