Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Kubuntu 11.04 I just installed gvim, which magically added an "open with gvim" for a bunch of text files. Great, but I would like to add another one in order to start gvim on the given file and change current working directory to the file location:

gvim -f %F -c "cd %d"

The command above works fine, but I have no idea how to make another "open with" to use the command. I don't want to make this the default, just an option. The file manager I'm using is dolphin, if that matters.

share|improve this question
up vote 5 down vote accepted

The KDE is using the desktop files to add the "open with" options. To add or edit the desktop files use the KDE Menu Editor.

The default application and the order of the applications is set with the File Associations. System Settings > File Associations.

share|improve this answer

(Comment: silly spam prevent system -> splitting the answer)

An image:

Another option is to use the context menus. With the KDE the context menus are called service menus /3/. Both the Konqueror and the Dolphin are using the same service menus.

share|improve this answer

i'm not usin kde, but maybe it does the job if you select the other file-FORMAT you want gvim to open automatically, and select "open with different application" [ or at least something that sounds similar ] then select gvim, aand, at least under nautilus and thunar it does, the next time you're klickin on it, it should provide you the gvim option.

hope to help you somehow!

share|improve this answer
Unless I'm mistaking, that would allow me to change the default open with action, which I specified that I do not want. – Adoring Gumdrop Oct 11 '11 at 9:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.