Ubuntu – File / Application association using a custom command is gone

11.10command linenautilusunity

In previous Ubuntus when you want to select/change an application to open a specific file (right-click/open with other application or properties) you were able to write a custom command to open the file. This was very useful, but now in 11.10 I can't find this option, it only shows me a list of applications and a button to look for applications in Internet.

Is there a way to restore the command line to write custom commands to open files?

Best Answer

As I found on http://blog.whatgeek.com.pt/?p=319 you can use mimeopen -d /path/to/file to configure a custom application on the cli. It will be used by gnome3 then.

$ mimeopen -d foo.matroska 
Please choose a default application for files of type application/x-matroska

    1) VLC media player  (vlc)
    2) Banshee  (banshee)
    3) Movie Player  (totem)
    4) Other...

use application #4
use command: mplayer
Opening "foo.matroska" with mplayer  (application/x-matroska)