How can I Integrate Fritzing AppImage into GNOME on Ubuntu/Debian

Hi everyone,

I always had issues properly integrating the Fritzing AppImage into my desktop environment on Ubuntu 24.04 and Debian 12. The icon for the Fritzing files is not displayed in nautilus.

Here is my workaround.:


1. Create the MIME Type File (x-fritzing.xml)

This file defines a new MIME type for Fritzing-related file formats:

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
    <mime-type type="application/x-fritzing">
        <comment>Fritzing project file</comment>
        <glob pattern="*.fz"/>
        <glob pattern="*.fzz"/>
        <glob pattern="*.fzpz"/>
        <glob pattern="*.fzb"/>
        <glob pattern="*.fzbz"/>
        <icon name="application-x-fritzing"/>
    </mime-type>
</mime-info>

This configuration ensures that .fz, .fzz, .fzpz, .fzb, and .fzbz files are recognized as Fritzing project files.


2. Install the New MIME Type

Run the following command to install the MIME type:

xdg-mime install x-fritzing.xml

3. Install the Icon

I extracted the icon from the Fritzing AppImage and installed it with:

xdg-icon-resource install --context mimetypes --size 64 fritzing_64.png application-x-fritzing
xdg-icon-resource install --context mimetypes --size 128 fritzing_128.png application-x-fritzing
xdg-icon-resource install --context mimetypes --size 256 fritzing_256.png application-x-fritzing

This registers the icon in different sizes for better appearance across the system.


4. Create the fritzing.desktop Launcher

First, associate Fritzing as the default application for its file type:

xdg-mime default fritzing.desktop application/x-fritzing

Then, create the file ~/.local/share/applications/fritzing.desktop with the following content:

[Desktop Entry]
Version=1.1
Type=Application
Name=Fritzing
Comment=Fritzing
Icon=/home/user/Software/AppImage/fritzing/fritzing.svg
Exec=/home/user/Software/AppImage/fritzing/fritzing.AppImage
Actions=
MimeType=application/x-fritzing;
Categories=Development;
StartupNotify=true

The icon is still not displayed correctly until I perform the following additional step.


Link Icons to Adwaita (Critical Step???)

GNOME might not display the correct icons unless they are linked to the Adwaita icon theme:

sudo ln -s ~/.local/share/icons/hicolor/64x64/mimetypes/application-x-fritzing.png /usr/share/icons/Adwaita/64x64/mimetypes/application-x-fritzing.png

sudo ln -s ~/.local/share/icons/hicolor/256x256/mimetypes/application-x-fritzing.png /usr/share/icons/Adwaita/256x256/mimetypes/application-x-fritzing.png

sudo gtk-update-icon-cache /usr/share/icons/Adwaita

Is this the right Way?

Best regards,
Harald

1 Like

Hello Harald,

It’s probably not something you did wrong, but you’re just running into this issue: Wrong icon shown for application specific files (#3341) · Issues · GNOME / Files · GitLab

You can verify by using other file managers.

I tried Thunar. For Python code with the extension .py or .pyc, it didn’t help. Only when I created the resource locally and linked the icon to Adwaita was the file icon displayed correctly.

xdg-icon-resource install --context mimetypes --size 64 python_byte_64.png application-x-python-bytecode

sudo ln -s ~/.local/share/icons/hicolor/64x64/mimetypes/application-x-python-bytecode.png /usr/share/icons/Adwaita/64x64/mimetypes/application-x-python-bytecode.png

Apparently, it always looks for the icon in the Adwaita theme.

Thank You!
Harald!

This should be fixed in nautilus 47.4 and 48.0