Associating xfig with .fig images

One problem I’ve encountered using Mint (though it’s not actually a Mint issue) is that xfig doesn’t get associated with .fig files. This is compounded by the fact that GNOME 3 (the basis of Cinnamon) always knows better than you, so there is no way to set your own custom file associations—if the application isn’t on the “approved” list it can’t be set.

After some research, I found some useful information and here I’ll describe how to apply it to the xfig situation specifically.

  1. I will assume that xfig is already installed. If not then install it now (sudo apt-get install xfig).
  2. Check that a .desktop file exists to inform the system that xfig is available. To do this run sudo gedit /usr/share/applications/xfig.desktop and check that the file roughly matches the following. If it is empty then insert the following.
    [Desktop Entry]
    Name=Xfig
    Comment=Diagram editor
    Exec=xfig
    Icon=xfig
    Terminal=false
    Type=Application
    Categories=Graphics;
    MimeType=image/x-fig;
  3. Set xfig as the default application for .fig files. Run sudo gedit /usr/share/applications/defaults.list and insert the following anywhere (though locating it with the other “image/...” entries may be sensible).
    image/x-xfig=xfig.desktop
  4. While you’re at it, install gsfonts-x11 then log out and back in. This will avoid issues with Times, Helvetica, and so on in your images.
Facebooktwittergoogle_plusredditpinterestFacebooktwittergoogle_plusredditpinterest
Loading Facebook Comments ...

No Trackbacks.