Associating .fzz files with Fritzing in Linux

On Linux (Ubuntu), I want to be able to click on an .fzz file and have it immediately open in Fritzing. I don’t seem to be able to do this. I found a fritzing.desktop file in ~/.local/share/applications, but the MIME type is empty.

Can this be done?

Thanks.

It’s possible. I’ve done it with Fedora. But that was years ago, and I do not remember the details. I had to do a bunch of research first. It still works, so I have not had to touch it again.

Yeah, I keep forgetting…Linux was made for developers, not office workers. :smiley:

Thank you for taking the time to reply.

I don’t know if it helps, but with Debian I’d use Dolphin, right click the file and “open with …”. You can select the application from the treeview and should activate the “assign all” checkbox at the bottom.

Nevertheless… It will open Fritzing with a click on an .fzz or .fzpz file as shown in the screenshot, but it won’t load the file itself. Just an empty breadboard is shown. (The part should be loaded into “own” parts section.)

So at least it might point you into the right direction.

Michael

Hallo,
ich habe das gleiche Problem mit Debian 12. Ich beschreibe mal die Schrittfolge [und bleibe mal in der Sprache Deutsch]

1. Erstellen der MIME Type Datei x-fritzing.xml für die Zuordnung eines neuen MIME Type

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
	<mime-type type="application/x-fritzing">
		<comment>Textfile with Fritzing</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>

2. Installieren des neuen MIME Type

xdg-mime install x-fritzing.xml

3. Icon installieren

Das Icon habe ich mir aus dem AppImage extrahiert.

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

4. fritzing.desktop-Datei als Starter einrichten

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

hier die Datei ~/.local/share/applications/fritzing.desktop

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

Bei Ubuntu 20.04 hat diese Vorgehensweise zum Erfolg geführt, bei Debian 12 leider nicht.

Welchen Fehler mache ich?
Ich wollte ein kleines bash-Script schreiben, welches dies Aufgabe dann erledigt.

Gruß Harald!

Ich habe die LÖSUNG gefunden. Die Icons müssen nach Adwaita verlinkt werden.

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

Das hat bei mir geholfen. Kann das jemand bestätigen?

Gruß Harald!