Wie kann man "File Roller" (alias File Manager) für ALLE unterstützten Typen in Gnome und Cinnamon als Standard festlegen?

923
Marc.2377

Seit meiner Installation p7zip-guihat es mein System entführt, indem es sich selbst als Standardanwendung für alle Mime-Typen festgelegt hat, die es öffnen kann (insgesamt 31 Typen).

Cinnamon bietet ein Werkzeug namens Preferred Applications an, es gibt jedoch keine "komprimierte / archivierte" Gruppierung:

Wie kann man

Wie kann man wiederherstellen, dass File Roller standardmäßig alle unterstützten Typen öffnet, während die Möglichkeit bleibt, sie mit p7zip-gui zu öffnen?

0

2 Antworten auf die Frage

1
theJack

Sie können Mime-Typ-Zuordnungen mit dem xdg-mimeBefehl bearbeiten .

Alles, was Sie tun müssen, ist den Namen der .desktop - Datei für Datei - Roller finden, dann den Befehl eingeben xdg-mime default program.desktop compressed/archives, Ersetzen program.desktopmit dem Namen der aktuellen Datei, natürlich. Dies funktioniert auch mit Platzhaltern. Wenn Sie also festlegen möchten, dass beispielsweise alle komprimierten Dateien geöffnet werden, können Sie dies angeben compressed/*.

[in eine Antwort umgewandelt] Fühlen Sie sich frei, meine Antwort in Ihre zu integrieren, wenn Sie möchten, dass ich sie annehme, und lassen Sie es mich wissen. Vielen Dank. Marc.2377 vor 6 Jahren 0
1
Marc.2377

This is a complement to the previous answer by theJack.

In order to accomplish my goal, I had to:

  1. open the file /usr/share/applications/Archive Manager (actually named /usr/share/applications/org.gnome.FileRoller.desktop if listed from the command line, for example) in a text editor

  2. copy everything directly after MimeType=

  3. replace every semicolon by a space using a text editor with "Search and Replace"

  4. input the resulting string as a parameter to xdg-mime. From the manual: "An application can be made the default for several file types by specifying multiple mimetypes."

The resulting command:

xdg-mime default "org.gnome.FileRoller.desktop" application/x-7z-compressed application/x-7z-compressed-tar application/x-ace application/x-alz application/x-ar application/x-arj application/x-bzip application/x-bzip-compressed-tar application/x-bzip1 application/x-bzip1-compressed-tar application/x-cabinet application/x-cd-image application/x-compress application/x-compressed-tar application/x-cpio application/x-deb application/x-ear application/x-ms-dos-executable application/x-gtar application/x-gzip application/x-gzpostscript application/x-java-archive application/x-lha application/x-lhz application/x-lrzip application/x-lrzip-compressed-tar application/x-lz4 application/x-lzip application/x-lzip-compressed-tar application/x-lzma application/x-lzma-compressed-tar application/x-lzop application/x-lz4-compressed-tar application/x-lzop-compressed-tar application/x-ms-wim application/x-rar application/x-rar-compressed application/x-rpm application/x-source-rpm application/x-rzip application/x-rzip-compressed-tar application/x-tar application/x-tarz application/x-stuffit application/x-war application/x-xz application/x-xz-compressed-tar application/x-zip application/x-zip-compressed application/x-zoo application/zip application/x-archive application/vnd.ms-cab-compressed application/vnd.debian.binary-package application/gzip