BlocNotes

Notepad of a tinker, maker, hacker or whatever you call it :)

Linux - Gnome - Associate an application with a filetype

I spend a bit of time figuring out how to associate ".stl" extensions with Slic3r. Gnome wrote a good documentation but it is not obvious to find.
I do not use the package manager for that because I use up to date AppImage.

The resume is:

  • Create /usr/share/mime/packages/slic3r.xml
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/octet-stream">
    <glob pattern="*.stl"/>
  </mime-type>
</mime-info>
  • Create /usr/share/applications/slic3r.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Slic3r
Icon=/opt/AppImages/icons/Slic3r.ico
Exec=Slic3r
Path=/opt/AppImages/
NoDisplay=false
Categories=3DGraphics;Utility;
StartupNotify=false
Terminal=false
MimeType=application/octet-stream