Results 1 to 7 of 7

Thread: Associate files with applications

  1. #1
    Join Date
    Jul 2005
    Location
    Potenza, Italy
    Beans
    122

    Associate files with applications

    Hi there! I'm writing this HOWTO because when I first approached Linux I had no idea how to associate my preferred apps with file formats. I was told that you were supposed to know all the gibberish about MIME types but I found a easier way to do that.

    Let's immagine you want to change the default video player for .avi files. Well, that's what you have to do (yes, just to easy steps ):

    1) Right click on any avi file and go to Properties;
    2) Then go to the "Open with" tab and just select the application you want to use for opening that type of file (i.e. avi).



    That's all. From now on, every .avi file will be opened using the application you chose.

    #NOTE:
    I don't know if this matter has already been dealt with, if that's the case I'm sorry for repeating it.

    Bye,
    Donato
    Italy
    Whatever you can do or dream you can do, start doing it! In audacity, there is genius, power and magic.

    Linux User #394997

  2. #2
    Join Date
    Mar 2005
    Location
    Austin
    Beans
    97
    Distro
    Dapper Drake Testing/

    Re: Associate files with applications

    Good howto, it took me a while to find this myself. This would have helped.

    I would also add that this is the place to add file associations for programs you don't always use. For instance, I installed mplayer to my system for movies. Normally when you right click a file, it lists applications to choose from. But mplayer didn't get added to that list, so I always had to type it in. So going through this menu can fix that and you can add programs by hand that you might want to use to open files.
    I used to feel like I understood computers. Thank you Linux for putting me back in my place.

  3. #3
    Join Date
    Jul 2005
    Location
    Potenza, Italy
    Beans
    122

    Re: Associate files with applications

    Normally when you right click a file, it lists applications to choose from. But mplayer didn't get added to that list, so I always had to type it in. So going through this menu can fix that and you can add programs by hand that you might want to use to open files.
    Oh yes, this is good ^_^
    And, I like your signature too
    Whatever you can do or dream you can do, start doing it! In audacity, there is genius, power and magic.

    Linux User #394997

  4. #4
    Join Date
    Jul 2005
    Location
    Riga, Latvia
    Beans
    38

    Re: Associate files with applications

    Yeah, that works! Earlier I have found that there's /usr/share/applications/defaults.list You can edit it as you like.

  5. #5
    Join Date
    May 2005
    Location
    WizardsTower in the Quiet
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Associate files with applications

    scorpio2002, I assume that this tip uses Nautilus? You should really include that bit of information for not everybody does use it. The editing of /usr/share/applications/defaults.list, as fresco notes, is more universal.
    But yours is /way/ easier.

  6. #6
    Join Date
    Dec 2004
    Location
    New York
    Beans
    13
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Associate files with applications

    A better IMHO way is editing files in your home directory so that changes stay consistent if you switch systems or reinstall but keep your home dir intact.

    to set the default "open with" app
    $HOME/.local/share/applications/defaults.list

    or to add an app to the list of "open with" apps for a certain mime-type
    $HOME/.local/share/applications/mimeinfo.cache

    Both files have the same syntax:
    mime/type=app.desktop

    ex: text/xml=gvim.desktop

  7. #7
    Join Date
    Jun 2012
    Beans
    1

    Re: Associate files with applications

    on ubuntu 12.04, the file to edit is /home/user_name/.local/share/applications/mimeapps.list

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •