I'm using Ubuntu 18, and all the information I've found on web searches is outdated.

I have files with a .p4r extension that I want to associate to a non-GUI application. These files are actually .zip files in disguise, but I don't want them to opened via the Archive Manager.

How do I get Nautilus (the file manager used in Ubuntu 18) to associate a .p4r file with a specific non-GUI app. Because it's not a GUI app, it does not appear in the "Open With" dialog box.

  • The answer given in askubuntu.com/questions/1087166/… almost works. It allows me to associate .p4r files with a shell script, but that only works in Nemo. In Nautilus, the association is kept, but double-clicking on a .p4r file does nothing.
    – lord_nimon
    Dec 10, 2018 at 20:33
  • You should probably create a .desktop file for the non-gui application. Then, with right-click - properties, the non-gui's app desktop file will appear among the choices.
    – vanadium
    Dec 11, 2018 at 8:44
  • That almost works. If I drag the .p4r file to the .desktop icon, it works. But if I double-click on the .p4r file, nothing happens.
    – lord_nimon
    Dec 13, 2018 at 20:26
  • Have you looked at the documentation for that application, it may already have a way to do this. Also you might be able to make a link to the application in ~/.local/share/applications which may appear in the open with menu. See here for more info and more options: askubuntu.com/a/1073863/308524 Mar 25, 2019 at 21:42


You must log in to answer this question.

Browse other questions tagged .