Protocol Handler in Firefox anlegen

FatManStanding

Lt. Junior Grade
Registriert
Aug. 2021
Beiträge
385
Hallo,

ich versuche gerade diese ganze "Protocol Handler"-Sache im Firefox zu verstehen. Hier http://kb.mozillazine.org/Register_protocol#Linux ist das beschrieben. Angenommen ich will Bilder im PNG-Format nicht im Browser sondern in einem Bildprogramm öffnen. Ich habe also mit

Code:
gconftool-2 -s /desktop/gnome/url-handlers/png/command '/usr/bin/gwenview %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/png/enabled --type Boolean true

im System (Xubuntu 22.04) den Protocol Handler "png" angelegt. In Firefix / about:config dann

Code:
network.protocol-handler.expose.png

angelegt mit "boolean" und "false".

Ein PH ist aber vmtl. nicht das gleiche wie ein MimeType auf dem Desktop, wird also nicht durch die Dateierweierung "bestimmt". Der PH "mailto" (network.protocol-handler.expose.mailto) wird vermutlich angesprochen wenn ein Link geöffnet wird der mit "mailto:" beginnt (nicht endet wie bei der Dateierweiterung).

Was müsste ich in meinem Fall noch machen damit PNG mit Gwenview statt dem Firefox geöffnet wird? Ich vermute der PH für die URL zu einer PNG wäre http oder https, weil die URL damit beginnt?
 
Lies dir bitte aus deinem Link nochmal direkt den ersten Satz durch, was ein Protokoll überhaupt ist. Denn PNG ist ein Dateiformat, keine Methode zur Datenübertragung.

Ich fürchte dein Wunsch ist gar nicht möglich ( https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file ):
Note: Firefox treats links to some types of media files, such as .mp3 files, the same way it treats .txt and .html links, by handling them internally. The file will not be downloaded and the Downloads panel will not open. Instead, the file will open and play in Firefox, with a control bar displayed to manage playback (see this article for details). Firefox only uses Applications settings to determine what action is taken when a file is treated as a download (see below).
 
Zurück
Oben