애플리케이션을 지원되는 모든 MIME 유형과 어떻게 연결합니까?

애플리케이션을 지원되는 모든 MIME 유형과 어떻게 연결합니까?

xarchiver기본적으로 설치되어 있고 기본적으로 대부분의 아카이브 유형과 연결되어 있다고 가정해 보겠습니다 .

설치했고 engrampa이제 다양한 아카이브 유형과 연결하고 싶습니다. 각 MIME 연결을 개별적으로 변경하고 싶지 않습니다.

을(를) 제거하면 xarchiver다양한 아카이브 유형에 대한 연결이 자동으로 로 변경되었습니다 engrampa.

제거하지 않고 이를 수행할 수 있는 방법이 있습니까 xarchiver? "애플리케이션 X를 지원되는 모든 MIME 유형과 연결"과 같은 것입니까?


중요한 경우 Fedora 38 XFCE 스핀을 사용하고 있습니다.

답변1

기본 애플리케이션을 설정하려면 다음 명령을 사용하십시오(테스트되지 않음)(콘솔에 복사하여 붙여넣기).

xdg-mime default engrampa.desktop application/epub+zip; \ 
xdg-mime default engrampa.desktop application/x-7z-compressed; \ 
xdg-mime default engrampa.desktop application/x-7z-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-ace; \ 
xdg-mime default engrampa.desktop application/x-alz; \ 
xdg-mime default engrampa.desktop application/x-arc; \ 
xdg-mime default engrampa.desktop application/x-arj; \ 
xdg-mime default engrampa.desktop application/x-brotli; \ 
xdg-mime default engrampa.desktop application/x-brotli-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-bzip; \ 
xdg-mime default engrampa.desktop application/x-bzip2; \ 
xdg-mime default engrampa.desktop application/bzip2; \ 
xdg-mime default engrampa.desktop application/x-bzip-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-bzip1; \ 
xdg-mime default engrampa.desktop application/x-bzip1-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-cabinet; \ 
xdg-mime default engrampa.desktop application/x-cbr; \ 
xdg-mime default engrampa.desktop application/x-cbz; \ 
xdg-mime default engrampa.desktop application/x-cd-image; \ 
xdg-mime default engrampa.desktop application/x-compress; \ 
xdg-mime default engrampa.desktop application/x-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-cpio; \ 
xdg-mime default engrampa.desktop application/vnd.debian.binary-package; \ 
xdg-mime default engrampa.desktop application/x-ear; \ 
xdg-mime default engrampa.desktop application/x-ms-dos-executable; \ 
xdg-mime default engrampa.desktop application/x-gtar; \ 
xdg-mime default engrampa.desktop application/x-gzip; \ 
xdg-mime default engrampa.desktop application/gzip; \ 
xdg-mime default engrampa.desktop application/x-gzpostscript; \ 
xdg-mime default engrampa.desktop application/x-java-archive; \ 
xdg-mime default engrampa.desktop application/x-lha; \ 
xdg-mime default engrampa.desktop application/x-lzh-compressed; \ 
xdg-mime default engrampa.desktop application/x-lrzip; \ 
xdg-mime default engrampa.desktop application/x-lrzip-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-lzip; \ 
xdg-mime default engrampa.desktop application/x-lzip-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-lzma; \ 
xdg-mime default engrampa.desktop application/x-lzma-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-lzop; \ 
xdg-mime default engrampa.desktop application/x-lzop-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-ms-wim; \ 
xdg-mime default engrampa.desktop application/x-rar; \ 
xdg-mime default engrampa.desktop application/x-rar-compressed; \ 
xdg-mime default engrampa.desktop application/x-rpm; \ 
xdg-mime default engrampa.desktop application/x-source-rpm; \ 
xdg-mime default engrampa.desktop application/x-rzip; \ 
xdg-mime default engrampa.desktop application/x-tar; \ 
xdg-mime default engrampa.desktop application/x-tarz; \ 
xdg-mime default engrampa.desktop application/x-stuffit; \ 
xdg-mime default engrampa.desktop application/x-war; \ 
xdg-mime default engrampa.desktop application/x-xz; \ 
xdg-mime default engrampa.desktop application/x-xz-compressed-tar; \ 
xdg-mime default engrampa.desktop application/x-zip; \ 
xdg-mime default engrampa.desktop application/x-zip-compressed; \ 
xdg-mime default engrampa.desktop application/x-zoo; \ 
xdg-mime default engrampa.desktop application/zstd; \ 
xdg-mime default engrampa.desktop application/x-zstd; \ 
xdg-mime default engrampa.desktop application/x-zstd-compressed-tar; \ 
xdg-mime default engrampa.desktop application/zip; \ 
xdg-mime default engrampa.desktop application/x-archive; \ 
xdg-mime default engrampa.desktop application/vnd.ms-cab-compressed

산출:

cat engrampa.desktop | grep "MimeType" | cut -d"=" -f2 | tr ";" "\n" | xargs -n1 printf "xdg-mime default engrampa.desktop %s; \\ \n"

파일은 engrampa.desktop다음 위치에 있어야 합니다.

~/.local/share/applications

이렇게 생겼어

https://github.com/mate-desktop/engrampa/blob/master/data/engrampa.desktop.in.in

찾을 수 없으면 find다음 명령을 사용하십시오.

관련 정보