1

In Ubuntu, when we right-click a icon and use "open with", there is an option to remember that application for that file's type.

For some reason, my system is no more memorizing the application (I think it was aftare some update).

And, even when I have already used the "open with" command, the application is not showing in the "open with" list, so I have, everytime, to go to "open with"->"Other Application".

The system used to ask me what to do with the file type (Display, Run..), but now it is doing nothing to my file type "ppf". I want it to open with GEdit. Is there any command line to associate my extension with GEdit?

4 Answers 4

3

Right-click the document icon in nautilus, then choose Properties | Open With. This will allow you to choose the default application to launch it with, as well as modify the applications that show by default in the context menu of documents of that type.

2
  • it is already marked GEdit, but when I click (or press enter) it just don't react... nothing happens. And I think this started after one of the Ubuntu updates, but I don't know what was updated... any other idea? Commented Jun 15, 2010 at 13:03
  • found, after unmark "Allow executing file as a program" it worked.. I don't know why this box was marked anyway.. Commented Jun 15, 2010 at 13:07
2

Mine never did remember settings when set via the Nautilus "open with" dialog. (I was trying to make VLC my default player for various video filetypes -- AVI, etc -- and it never stuck.)

I eventually got the setting to stick using Ubuntu Tweak's File Type Manager.

sudo add-apt-repository ppa:tualatrix/ppa

sudo aptitude update

sudo aptitude install ubuntu-tweak

Afterwards, Ubuntu Tweak should be available in your Gnome menu: Applications > System Tools > Ubuntu Tweak. Select File Type Manager in the left-hand column, select a filetype category, select a filetype, click the Edit button. There you can select from your system's known choices, or use Add to add a new choice or custom command.


See Adding MIME Types in the Ubuntu Help pages. To make a new MIME type, you can simply add the type to /etc/mime.types and the icon to /usr/share/icons/gnome/*/mimetypes (put SVGs in ...gnome/scalable/mimetypes, and PNGs in the size directories).

There seems to be a way to make this slightly more automatic via XDG. You can use the xdg-mime command to query what your system knows about MIME types and add new ones. See man xdg-mime; install the xdg-utils package if you don't have this command.

If your PPF files are just plain text, you might be able to get away with adding "ppf" to the existing text/plain definition in /etc/mime.types:

text/plain                  asc txt text pot brf ppf
8
  • An error has occurred: Error reading launchpad.net/api/1.0/~tualatrix/+archive/paa: HTTP Error 404: Not Found Commented Jun 14, 2010 at 17:02
  • The above error occurred on the first line Commented Jun 14, 2010 at 17:09
  • @Tom: watch out for typos; that should be ppa on the end not paa: launchpad.net/api/1.0/~tualatrix/+archive/ppa .. in case it's not obvious, your system will need an internet connection to run those commands. i've just double-checked; these commands are working on my system. Commented Jun 14, 2010 at 17:12
  • Thanks! But, now installed, there are just options to edit known file types, even when unmarking "Only show filetypes with associated applications". I need to register a new file type, "ppf", to open with gedit, is there a way? Commented Jun 14, 2010 at 17:58
  • @tom: sorry, i'm a little lost there myself. ... hang on, updating the answer here. Commented Jun 14, 2010 at 18:35
1

I was having this trouble until I noticed that my boot partition was full and cleared some space. It was interesting - I released a few tens of megabytes and that freed up the system enough to work and then it somehow released more than a gigabyte on that partition that it was holding for some reason or another. Whew.

0

Found, after unmark "Allow executing file as a program" it worked.. I don't know why this box was marked anyway..

You must log in to answer this question.

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