2

I can tell the file browser what application to open when I double-click a document, but can I also tell it what command line options to always use when opening that kind of document?

2
  • For example? What document, what application, what parameter?
    – jobin
    Jun 21, 2014 at 12:48
  • I want Gvim to open a file (actually, any kind of file) with the --remote-tab-silent option Jun 21, 2014 at 13:03

1 Answer 1

4

Yes, you can. By editing desktop application file (application/x-desktop) especially the Exec field.

You can start by choosing, for example, nautilus.desktop to be edited. Your desktop file usually located on /usr/share/applications/. Find the one you want to edit.

  1. Open terminal and type up :

    cp /usr/share/applications/nautilus.desktop ~/.local/share/applications/
    
  2. Open the file with gedit through terminal :

    gedit ~/.local/share/applications/nautilus.desktop
    
  3. Find Exec field and change the argument as you want. For example :

    ...
    Exec=nautilus --no-default-window --new-window %U
    ...
    
  4. Save it. Done.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .