web-dev-qa-db-ja.com

KDEはMIMEタイプのファイルの関連付けを保存していません

私はArch LinuxとKDEを実行していて、自分のシステムでMIMEタイプがどのように動作しているか(そして正しく動作していないか)を調査しています。

このMIMEタイプのファイルの関連付けを検討してください。次のコンソール出力は、mime-type xml定義ファイルがあり、.pubファイルとmime-type application/vnd.ms-publisherの間に関連付けがあることを示しています。

$ xdg-mime query filetype ~/.ssh/id_rsa_test.pub
application/vnd.ms-publisher

$ less mimeapps.list
[Added Associations]
application/vnd.ms-publisher=org.kde.kate.desktop;

# find /usr -name vnd.ms-publisher.xml
/usr/share/mime/application/vnd.ms-publisher.xml

# less /usr/share/mime/application/vnd.ms-publisher.xml

<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/vnd.ms-publisher">
<!--Created automatically by update-mime-database. DO NOT EDIT!-->
<sub-class-of type="application/x-ole-storage"/>
<glob pattern="*.pub"/>
</mime-type>

(ms-publisherが私のLinuxシステムの公開鍵に関連付けられているという事実は好きではありませんが、それは別の質問のトピックです。)

上記から、すべてが順調であるように見えます。

次に、私は.pub公開鍵ファイルを処理するためにKate(テキストエディタ)の関連付けを追加することにしました。これは、KDEシステム設定>アプリケーション>ファイルの関連付けを使用して作成しました。

このスクリーンショットは私がしたことを示しています。 「適用」をクリックすると、進行状況ダイアログが短時間表示され、アクションは成功したようです。

Add File Association

ただし、同じダイアログに再度アクセスすると、追加したばかりのケイトの関連付けがなくなります。[アプリケーションの優先順位]の下のボックスは空です。

My Added Association Is Gone

私の質問は:このファイルの関連付けが保存されない原因は何ですか?どのように修正できますか?

journalctl -rの確認次のメッセージが(逆の順序で)見つかりました。すべての行はJan 31 17:24:18 laptop systemsettings5[20318]に似た接頭辞で始まりますが、スペースを節約するためにそれらのほとんどを削除しました。

Jan 31 17:24:19 laptop systemsettings5[20318]: Mimetype Comment Dirty: old= "Kindle book document" m_comment= "Amazon KF8 ebook format"
Jan 31 17:24:19 laptop systemsettings5[20318]: Mimetype Comment Dirty: old= "ODB database" m_comment= "OpenDocument Database"
Jan 31 17:24:19 laptop systemsettings5[20318]: kf5.kservice.services: KMimeTypeTrader: mimeType "application/vnd.ms-publisher" not found
Jan 31 17:24:19 laptop systemsettings5[20318]: kf5.kservice.services: KMimeTypeTrader: mimeType "application/vnd.ms-publisher" not found
Jan 31 17:24:19 laptop systemsettings5[20318]: ("services", "servicetypes", "xdgdata-mime", "apps")

...

Jan 31 17:24:18 laptop systemsettings5[20318]: "application/vnd.ms-publisher" hasDefinitionFile: false
kf5.kservice.sycoca: Service type not found: "audio/x-xm"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.presentation-template"
kf5.kservice.sycoca: Service type not found: "text/x-rst"
kf5.kservice.sycoca: Service type not found: "application/pdf"
kf5.kservice.sycoca: Service type not found: "application/x-bzip"
kf5.kservice.sycoca: Service type not found: "application/x-cue"
kf5.kservice.sycoca: Service type not found: "image/x-rgb"
kf5.kservice.sycoca: Service type not found: "application/x-gzpdf"
kf5.kservice.sycoca: Service type not found: "application/x-cmakecache"
kf5.kservice.sycoca: Service type not found: "image/x-sigma-x3f"
kf5.kservice.sycoca: Service type not found: "application/x-tellico"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.spreadsheet-flat-xml"
kf5.kservice.sycoca: Service type not found: "application/x-mswrite"
kf5.kservice.sycoca: Service type not found: "application/x-t602"
kf5.kservice.sycoca: Service type not found: "image/x-nikon-nef"
kf5.kservice.sycoca: Service type not found: "video/x-flic"
kf5.kservice.sycoca: Service type not found: "x-content/video-vcd"
kf5.kservice.sycoca: Service type not found: "audio/flac"
kf5.kservice.sycoca: Service type not found: "application/xspf+xml"
kf5.kservice.sycoca: Service type not found: "image/svg+xml"
kf5.kservice.sycoca: Service type not found: "application/x-tar"
kf5.kservice.sycoca: Service type not found: "image/x-xpixmap"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.calc"
kf5.kservice.sycoca: Service type not found: "application/gzip"
kf5.kservice.sycoca: Service type not found: "application/x-Zip-compressed-fb2"
kf5.kservice.sycoca: Service type not found: "application/x-compressed-tar"
kf5.kservice.sycoca: Service type not found: "audio/x-wavpack"
kf5.kservice.sycoca: Service type not found: "video/vnd.rn-realvideo"
kf5.kservice.sycoca: Service type not found: "image/x-pic"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.draw"
kf5.kservice.sycoca: Service type not found: "audio/x-pn-realaudio-plugin"
kf5.kservice.sycoca: Service type not found: "application/x-kexi-connectiondata"
kf5.kservice.sycoca: Service type not found: "application/x-mobipocket-ebook"
kf5.kservice.sycoca: Service type not found: "audio/ac3"
kf5.kservice.sycoca: Service type not found: "application/vnd.openofficeorg.extension"
kf5.kservice.sycoca: Service type not found: "image/x-win-bitmap"
kf5.kservice.sycoca: Service type not found: "application/vnd.kde.okular-archive"
kf5.kservice.sycoca: Service type not found: "application/x-zstd-compressed-tar"
kf5.kservice.sycoca: Service type not found: "audio/mpeg"
kf5.kservice.sycoca: Service type not found: "video/mlt-playlist"
kf5.kservice.sycoca: Service type not found: "image/x-kde-raw"
kf5.kservice.sycoca: Service type not found: "application/x-7z-compressed"
kf5.kservice.sycoca: Service type not found: "audio/vnd.rn-realaudio"
kf5.kservice.sycoca: Service type not found: "image/x-panasonic-rw"
kf5.kservice.sycoca: Service type not found: "text/x-patch"
kf5.kservice.sycoca: Service type not found: "application/x-kdenlivetitle"
kf5.kservice.sycoca: Service type not found: "application/vnd.Lotus-1-2-3"
kf5.kservice.sycoca: Service type not found: "x-content/blank-cd"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-asf"
kf5.kservice.sycoca: Service type not found: "video/quicktime"
kf5.kservice.sycoca: Service type not found: "image/vnd.djvu"
kf5.kservice.sycoca: Service type not found: "video/x-anim"
kf5.kservice.sycoca: Service type not found: "text/plain"
kf5.kservice.sycoca: Service type not found: "application/x-Java-keystore"
kf5.kservice.sycoca: Service type not found: "application/x-archive"
kf5.kservice.sycoca: Service type not found: "application/x-sv4crc"
kf5.kservice.sycoca: Service type not found: "application/vnd.appimage"
kf5.kservice.sycoca: Service type not found: "application/vnd.visio"
kf5.kservice.sycoca: Service type not found: "image/x-tga"
kf5.kservice.sycoca: Service type not found: "application/x-zoom"
kf5.kservice.sycoca: Service type not found: "image/heif"
kf5.kservice.sycoca: Service type not found: "image/rle"
kf5.kservice.sycoca: Service type not found: "text/csv"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-cab-compressed"
kf5.kservice.sycoca: Service type not found: "application/vnd.Lotus-wordpro"
kf5.kservice.sycoca: Service type not found: "application/x-xar"
kf5.kservice.sycoca: Service type not found: "audio/aac"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.presentationml.template"
kf5.kservice.sycoca: Service type not found: "image/x-icns"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.presentation"
kf5.kservice.sycoca: Service type not found: "audio/x-tta"
kf5.kservice.sycoca: Service type not found: "application/x-cbt"
kf5.kservice.sycoca: Service type not found: "image/tiff"
kf5.kservice.sycoca: Service type not found: "application/ogg"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-wpl"
kf5.kservice.sycoca: Service type not found: "image/x-pentax-pef"
kf5.kservice.sycoca: Service type not found: "image/x-Olympus-orf"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-Excel"
kf5.kservice.sycoca: Service type not found: "application/pgp-keys"
kf5.kservice.sycoca: Service type not found: "image/x-jng"
kf5.kservice.sycoca: Service type not found: "application/x-lz4-compressed-tar"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.text-master"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.impress.template"
kf5.kservice.sycoca: Service type not found: "application/x-font-pcf"
kf5.kservice.sycoca: Service type not found: "application/xhtml+xml"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.text"
kf5.kservice.sycoca: Service type not found: "application/x-Java"
kf5.kservice.sycoca: Service type not found: "image/x-sgi"
kf5.kservice.sycoca: Service type not found: "audio/basic"
kf5.kservice.sycoca: Service type not found: "application/x-executable"
kf5.kservice.sycoca: Service type not found: "text/spreadsheet"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.spreadsheet-template"
kf5.kservice.sycoca: Service type not found: "audio/x-ms-wma"
kf5.kservice.sycoca: Service type not found: "image/x-fuji-raf"
kf5.kservice.sycoca: Service type not found: "application/x-compress"
kf5.kservice.sycoca: Service type not found: "audio/vnd.dts"
kf5.kservice.sycoca: Service type not found: "image/fits"
kf5.kservice.sycoca: Service type not found: "application/x-xz"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.formula-template"
kf5.kservice.sycoca: Service type not found: "image/gif"
kf5.kservice.sycoca: Service type not found: "audio/x-ms-asx"
kf5.kservice.sycoca: Service type not found: "video/x-mng"
kf5.kservice.sycoca: Service type not found: "image/x-gimp-gbr"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.chart-template"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
kf5.kservice.sycoca: Service type not found: "application/x-bzpdf"
kf5.kservice.sycoca: Service type not found: "image/png"
kf5.kservice.sycoca: Service type not found: "application/x-gzdvi"
kf5.kservice.sycoca: Service type not found: "application/mxf"
kf5.kservice.sycoca: Service type not found: "application/x-wpg"
kf5.kservice.sycoca: Service type not found: "image/x-xwindowdump"
kf5.kservice.sycoca: Service type not found: "image/x-dcraw"
kf5.kservice.sycoca: Service type not found: "audio/x-mpegurl"
kf5.kservice.sycoca: Service type not found: "x-content/audio-player"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.text-web"
kf5.kservice.sycoca: Service type not found: "x-content/blank-dvd"
kf5.kservice.sycoca: Service type not found: "image/cgm"
kf5.kservice.sycoca: Service type not found: "application/x-fictionbook+xml"
kf5.kservice.sycoca: Service type not found: "application/vnd.Palm"
kf5.kservice.sycoca: Service type not found: "video/webm"
kf5.kservice.sycoca: Service type not found: "image/wmf"
kf5.kservice.sycoca: Service type not found: "text/tab-separated-values"
kf5.kservice.sycoca: Service type not found: "application/x-pagemaker"
kf5.kservice.sycoca: Service type not found: "application/vnd.comicbook-rar"
kf5.kservice.sycoca: Service type not found: "image/openraster"
kf5.kservice.sycoca: Service type not found: "application/illustrator"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-publisher"
kf5.kservice.sycoca: Service type not found: "application/msword"
kf5.kservice.sycoca: Service type not found: "application/x-krita"
kf5.kservice.sycoca: Service type not found: "application/x-dvi"
kf5.kservice.sycoca: Service type not found: "image/x-portable-bitmap"
kf5.kservice.sycoca: Service type not found: "audio/AMR"
kf5.kservice.sycoca: Service type not found: "application/x-cpio"
kf5.kservice.sycoca: Service type not found: "image/webp"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.writer"
kf5.kservice.sycoca: Service type not found: "text/css"
kf5.kservice.sycoca: Service type not found: "image/x-Adobe-dng"
kf5.kservice.sycoca: Service type not found: "image/x-eps"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.draw.template"
kf5.kservice.sycoca: Service type not found: "image/x-compressed-xcf"
kf5.kservice.sycoca: Service type not found: "application/x-bzip-compressed-tar"
kf5.kservice.sycoca: Service type not found: "application/x-quattropro"
kf5.kservice.sycoca: Service type not found: "application/x-ms-dos-executable"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-access"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-PowerPoint"
kf5.kservice.sycoca: Service type not found: "application/x-sv4cpio"
kf5.kservice.sycoca: Service type not found: "audio/mp4"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.chart"
kf5.kservice.sycoca: Service type not found: "application/x-lrzip-compressed-tar"
kf5.kservice.sycoca: Service type not found: "application/vnd.comicbook+Zip"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.writer.global"
kf5.kservice.sycoca: Service type not found: "application/vnd.Apple.mpegurl"
kf5.kservice.sycoca: Service type not found: "application/x-xojpp"
kf5.kservice.sycoca: Service type not found: "application/x-bzdvi"
kf5.kservice.sycoca: Service type not found: "image/x-gimp-pat"
kf5.kservice.sycoca: Service type not found: "image/x-gimp-gih"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.math"
kf5.kservice.sycoca: Service type not found: "image/vnd.zbrush.pcx"
kf5.kservice.sycoca: Service type not found: "video/x-flv"
kf5.kservice.sycoca: Service type not found: "x-content/audio-cdda"
kf5.kservice.sycoca: Service type not found: "image/jpeg"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.calc.template"
kf5.kservice.sycoca: Service type not found: "image/x-sony-arw"
kf5.kservice.sycoca: Service type not found: "image/emf"
kf5.kservice.sycoca: Service type not found: "image/x-sony-srf"
kf5.kservice.sycoca: Service type not found: "image/x-panasonic-rw2"
kf5.kservice.sycoca: Service type not found: "application/prs.plucker"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.graphics-flat-xml"
kf5.kservice.sycoca: Service type not found: "video/dv"
kf5.kservice.sycoca: Service type not found: "application/x-trash"
kf5.kservice.sycoca: Service type not found: "application/pgp-encrypted"
kf5.kservice.sycoca: Service type not found: "image/x-dds"
kf5.kservice.sycoca: Service type not found: "image/x-xcursor"
kf5.kservice.sycoca: Service type not found: "audio/midi"
kf5.kservice.sycoca: Service type not found: "image/x-Kodak-dcr"
kf5.kservice.sycoca: Service type not found: "application/vnd.rn-realmedia"
kf5.kservice.sycoca: Service type not found: "application/smil+xml"
kf5.kservice.sycoca: Service type not found: "application/x-font-bdf"
kf5.kservice.sycoca: Service type not found: "application/octet-stream"
kf5.kservice.sycoca: Service type not found: "application/x-k3b"
kf5.kservice.sycoca: Service type not found: "audio/x-it"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
kf5.kservice.sycoca: Service type not found: "application/x-bzpostscript"
kf5.kservice.sycoca: Service type not found: "application/vnd.Amazon.mobi8-ebook"
kf5.kservice.sycoca: Service type not found: "application/vnd.rar"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.impress"
kf5.kservice.sycoca: Service type not found: "audio/x-musepack"
kf5.kservice.sycoca: Service type not found: "image/x-Sun-raster"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.graphics-template"
kf5.kservice.sycoca: Service type not found: "application/pgp-signature"
kf5.kservice.sycoca: Service type not found: "application/Zip"
kf5.kservice.sycoca: Service type not found: "application/x-cd-image"
kf5.kservice.sycoca: Service type not found: "application/x-rpm"
kf5.kservice.sycoca: Service type not found: "application/mathml+xml"
kf5.kservice.sycoca: Service type not found: "image/x-xcf"
kf5.kservice.sycoca: Service type not found: "video/x-nsv"
kf5.kservice.sycoca: Service type not found: "audio/x-scpls"
kf5.kservice.sycoca: Service type not found: "audio/x-speex"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.presentation-flat-xml"
kf5.kservice.sycoca: Service type not found: "application/x-shorten"
kf5.kservice.sycoca: Service type not found: "audio/x-wav"
kf5.kservice.sycoca: Service type not found: "image/x-Canon-cr2"
kf5.kservice.sycoca: Service type not found: "application/epub+Zip"
kf5.kservice.sycoca: Service type not found: "image/x-photo-cd"
kf5.kservice.sycoca: Service type not found: "audio/x-adpcm"
kf5.kservice.sycoca: Service type not found: "font/ttf"
kf5.kservice.sycoca: Service type not found: "application/vnd.stardivision.writer"
kf5.kservice.sycoca: Service type not found: "image/jp2"
kf5.kservice.sycoca: Service type not found: "x-content/video-svcd"
kf5.kservice.sycoca: Service type not found: "application/javascript"
kf5.kservice.sycoca: Service type not found: "image/bmp"
kf5.kservice.sycoca: Service type not found: "image/x-portable-anymap"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.text-master-template"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-htmlhelp"
kf5.kservice.sycoca: Service type not found: "audio/x-gsm"
kf5.kservice.sycoca: Service type not found: "video/mp4"
kf5.kservice.sycoca: Service type not found: "application/sdp"
kf5.kservice.sycoca: Service type not found: "image/x-xbitmap"
kf5.kservice.sycoca: Service type not found: "application/xml"
kf5.kservice.sycoca: Service type not found: "image/x-bzeps"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.text-template"
kf5.kservice.sycoca: Service type not found: "video/x-msvideo"
kf5.kservice.sycoca: Service type not found: "application/x-xpinstall"
kf5.kservice.sycoca: Service type not found: "image/svg+xml-compressed"
kf5.kservice.sycoca: Service type not found: "application/x-iWork-keynote-sffkey"
kf5.kservice.sycoca: Service type not found: "application/vnd.debian.binary-package"
kf5.kservice.sycoca: Service type not found: "application/x-matroska"
kf5.kservice.sycoca: Service type not found: "audio/x-s3m"
kf5.kservice.sycoca: Service type not found: "application/x-ksysguard"
kf5.kservice.sycoca: Service type not found: "application/x-keepass2"
kf5.kservice.sycoca: Service type not found: "audio/mp2"
kf5.kservice.sycoca: Service type not found: "image/x-Kodak-k25"
kf5.kservice.sycoca: Service type not found: "x-content/blank-hddvd"
kf5.kservice.sycoca: Service type not found: "text/x-google-video-pointer"
kf5.kservice.sycoca: Service type not found: "application/vnd.Sun.xml.writer.template"
kf5.kservice.sycoca: Service type not found: "x-content/blank-bd"
kf5.kservice.sycoca: Service type not found: "text/html"
kf5.kservice.sycoca: Service type not found: "application/vnd.ms-works"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.presentationml.slide"
kf5.kservice.sycoca: Service type not found: "audio/x-flac+ogg"
kf5.kservice.sycoca: Service type not found: "application/x-gzpostscript"
kf5.kservice.sycoca: Service type not found: "text/vcard"
kf5.kservice.sycoca: Service type not found: "image/x-sony-sr2"
kf5.kservice.sycoca: Service type not found: "inode/directory"
kf5.kservice.sycoca: Service type not found: "application/x-xopp"
kf5.kservice.sycoca: Service type not found: "application/x-kdenlive"
kf5.kservice.sycoca: Service type not found: "application/vnd.corel-draw"
kf5.kservice.sycoca: Service type not found: "application/vnd.wordperfect"
kf5.kservice.sycoca: Service type not found: "image/x-minolta-mrw"
kf5.kservice.sycoca: Service type not found: "application/vnd.sqlite3"
kf5.kservice.sycoca: Service type not found: "image/x-portable-pixmap"
kf5.kservice.sycoca: Service type not found: "text/vnd.qt.linguist"
kf5.kservice.sycoca: Service type not found: "image/x-Canon-crw"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.presentationml.slideshow"
kf5.kservice.sycoca: Service type not found: "x-content/video-dvd"
kf5.kservice.sycoca: Service type not found: "application/vnd.kde.fontspackage"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
kf5.kservice.sycoca: Service type not found: "application/oxps"
kf5.kservice.sycoca: Service type not found: "application/x-khtml-adaptor"
kf5.kservice.sycoca: Service type not found: "video/mp2t"
kf5.kservice.sycoca: Service type not found: "application/vnd.Adobe.flash.movie"
kf5.kservice.sycoca: Service type not found: "audio/x-mod"
kf5.kservice.sycoca: Service type not found: "image/vnd.rn-realpix"
kf5.kservice.sycoca: Service type not found: "application/postscript"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.spreadsheetml.template"
kf5.kservice.sycoca: Service type not found: "image/vnd.Adobe.photoshop"
kf5.kservice.sycoca: Service type not found: "application/x-lzma"
kf5.kservice.sycoca: Service type not found: "audio/AMR-WB"
kf5.kservice.sycoca: Service type not found: "audio/x-aiff"
kf5.kservice.sycoca: Service type not found: "image/x-portable-graymap"
kf5.kservice.sycoca: Service type not found: "text/markdown"
kf5.kservice.sycoca: Service type not found: "application/x-bcpio"
kf5.kservice.sycoca: Service type not found: "application/x-lzip-compressed-tar"
kf5.kservice.sycoca: Service type not found: "video/x-matroska"
kf5.kservice.sycoca: Service type not found: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
kf5.kservice.sycoca: Service type not found: "audio/x-stm"
kf5.kservice.sycoca: Service type not found: "audio/prs.sid"
kf5.kservice.sycoca: Service type not found: "audio/x-ape"
kf5.kservice.sycoca: Service type not found: "application/x-designer"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.graphics"
kf5.kservice.sycoca: Service type not found: "image/vnd.Microsoft.icon"
kf5.kservice.sycoca: Service type not found: "text/x-ldif"
kf5.kservice.sycoca: Service type not found: "application/x-kexiproject-shortcut"
kf5.kservice.sycoca: Service type not found: "application/x-font-type1"
kf5.kservice.sycoca: Service type not found: "image/x-exr"
kf5.kservice.sycoca: Service type not found: "image/x-Kodak-kdc"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.formula"
kf5.kservice.sycoca: Service type not found: "application/x-cb7"
kf5.kservice.sycoca: Service type not found: "image/x-gzeps"
kf5.kservice.sycoca: Service type not found: "application/x-xopt"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.text-flat-xml"
kf5.kservice.sycoca: Service type not found: "image/x-hdr"
kf5.kservice.sycoca: Service type not found: "multipart/x-mixed-replace"
kf5.kservice.sycoca: Service type not found: "application/x-iso9660-appimage"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.spreadsheet"
kf5.kservice.sycoca: Service type not found: "application/x-Java-applet"
kf5.kservice.sycoca: Service type not found: "application/x-sony-bbeb"
kf5.kservice.sycoca: Service type not found: "application/x-kwallet"
kf5.kservice.sycoca: Service type not found: "application/x-tzo"
kf5.kservice.sycoca: Service type not found: "application/vnd.oasis.opendocument.database"
kf5.kservice.sycoca: Service type not found: "video/vnd.mpegurl"
kf5.kservice.sycoca: Service type not found: "application/x-dbf"
kf5.kservice.sycoca: Service type not found: "application/x-hwp"
kf5.kservice.sycoca: Service type not found: "application/x-navi-animation"
kf5.kservice.sycoca: Service type not found: "application/x-font-afm"
kf5.kservice.sycoca: Service type not found: "audio/x-opus+ogg"
kf5.kservice.sycoca: Service type not found: "application/ram"
kf5.kservice.sycoca: Service type not found: "multipart/mixed"
kf5.kservice.sycoca: Service type not found: "image/fax-g3"

...

Jan 31 17:24:18 laptop systemsettings5[20318]: kf5.kservice.services: KMimeTypeTrader: mimeType "application/vnd.ms-publisher" not found
Jan 31 17:24:18 laptop systemsettings5[20318]: kf5.kservice.services: KMimeTypeTrader: mimeType "application/vnd.ms-publisher" not found
Jan 31 17:24:18 laptop systemsettings5[20318]: Entry  "application/vnd.ms-publisher"  is dirty. Saving.
Jan 31 17:21:57 laptop systemsettings5[20318]: kf5.kservice.services: KMimeTypeTrader: mimeType "application/vnd.ms-publisher" not found
Jan 31 17:21:57 laptop systemsettings5[20318]: kf5.kservice.services: KMimeTypeTrader: mimeType "application/vnd.ms-publisher" not found
Jan 31 17:21:57 laptop systemsettings5[20318]: "application/vnd.ms-publisher" hasDefinitionFile: false

上記のいくつかの注目すべきメッセージは次のとおりです。

kf5.kservice.sycoca: Service type not found: "application/vnd.ms-publisher"
kf5.kservice.sycoca: Service type not found: "application/illustrator"

MIMEタイプapplication/vnd.ms-publisherが存在し、定義されていることはすでに示しました。それで私はさらにいくつかランダムにチェックしました。これはapplication/illustratorです(スペースを節約するためにコメントは削除されています)。

less /usr/share/mime/application/illustrator.xml

<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/illustrator">
<!--Created automatically by update-mime-database. DO NOT EDIT!-->
<generic-icon name="image-x-generic"/>
<glob pattern="*.ai"/>
<alias type="application/vnd.Adobe.illustrator"/>
</mime-type>

すべてのMIMEタイプ定義は、ls /usr/share/mime/application/のリストに従って存在するようです(ここにディレクトリリスト全体を投稿するための十分なスペースがありません。)

システムに存在するMIMEタイプのログメッセージに「サービスタイプが見つかりません」と表示される理由がわかりません。しかし、もっと重要なのは、上記のようにMIMEタイプを処理するアプリケーションを追加できないのはなぜですか?

Nathaniel M. Beaverによるコメントへの応答

$ ktraderclient5 --mimetype application/vnd.ms-publisher
mimetype is : application/vnd.ms-publisher
got 1 offers.
---- Offer 0 ----
Invalid property Actions
StartupNotify : 'TRUE'
StartupWMClass : 'libreoffice-draw'
Invalid property UntranslatedGenericName
Invalid property X-GIO-NoFuse
X-KDE-Protocols : 'file - http - ftp - webdav - webdavs'
Type : 'Application'
Name : 'LibreOffice Draw'
Comment : 'Create and edit drawings, flow charts, and logos by using Draw.'
GenericName : 'Drawing Program'
Icon : 'libreoffice-draw'
Exec : 'libreoffice --draw %U'
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'application/vnd.oasis.opendocument.graphics - application/vnd.oasis.opendocument.graphics-flat-xml - application/vnd.oasis.opendocument.graphics-template - application/vnd.Sun.xml.draw - application/vnd.Sun.xml.draw.template - application/vnd.visio - application/x-wpg - application/vnd.corel-draw - application/vnd.ms-publisher - image/x-freehand - application/clarisworks - application/x-pagemaker - application/pdf - application/x-stardraw - image/x-emf - image/x-wmf - Application'
AllowAsDefault : 'TRUE'
InitialPreference : '5'
Invalid property Library
DesktopEntryPath : '/usr/share/applications/libreoffice-draw.desktop'
DesktopEntryName : 'libreoffice-draw'
Keywords : 'Vector - Schema - Diagram - Layout - OpenDocument Graphics - Microsoft Publisher - Microsoft Visio - Corel Draw - cdr - odg - svg - pdf - vsd'
FormFactors : ''
Categories : 'Office - FlowChart - Graphics - 2DGraphics - VectorGraphics - X-Red-Hat-Base - X-MandrivaLinux-Office-Drawing'

これを削除するための推奨される方法は何ですか?

3
MountainX

まったく別のシステムでも同じです。これを通常のユーザーとして実行します。

update-mime-database $HOME/.local/share/mime

完全なリセットが必要な場合は、次のようにします。

cd $HOME/.local/share/
mv mime mime2
mkdir -p mime/packages
update-mime-database $HOME/.local/share/mime

これにより、mimeの破損した設定がすべてリセットされますが、機能します。現在、KDEは変更後にデータベースを更新するように要求しません。

2
Pilot Brother

MIMEタイプの関連付けの問題をデバッグするための段階的なアプローチを次に示します。

  1. ファイルのMIMEタイプを判別します。

    $ xdg-mime query filetype ~/.ssh/id_rsa.pub
    application/vnd.ms-publisher
    
  2. Mimetypeのデフォルトのハンドラーを決定します。

    $ xdg-mime query default application/vnd.ms-publisher
    libreoffice-writer.desktop
    

    詳細については、XDG_UTILS_DEBUG_LEVEL=2環境変数を追加してください。

    $ XDG_UTILS_DEBUG_LEVEL=2 xdg-mime query default application/vnd.ms-publisher
    Running KDE trader query "application/vnd.ms-publisher" mimetype and "Application" servicetype
    libreoffice-writer.desktop
    
  3. デフォルトの関連付けを変更するには、xdg-mimeを使用します。

    $ XDG_UTILS_DEBUG_LEVEL=2 xdg-mime default org.kde.kate.desktop application/vnd.ms-publisher
    make_default_kde: No kde runtime detected
    make_default_generic org.kde.kate.desktop application/vnd.ms-publisher
    Updating /home/nathaniel/.config/mimeapps.list
    

    これは、Dolphinなどのグラフィカルプログラムでも実行できます。後で説明するように、結果は常に同じではありません。

  4. それがデフォルトのハンドラーを変更したかどうかを確認します。

    xdg-mimeが成功した場合、次のようになります。

    $ xdg-mime query default application/vnd.ms-publisher
    org.kde.kate.desktop
    

    うまくいかなかった場合は、これが再び表示されます。

    $ xdg-mime query default application/vnd.ms-publisher
    libreoffice-writer.desktop
    
  5. xdg-mimeが機能しない場合は、デバッグ時間です。最初にこのファイルを確認してください:

    ~/.config/mimeapps.list

    次のセクションがあります:[Added Associations][Default Applications]、および[Removed Associations]

    何が起こっているのかを簡単にgrepで見てみましょう。

    $ grep 'application/vnd.ms-publisher' ~/.config/mimeapps.list
    application/vnd.ms-publisher=libreoffice-writer.desktop;libreoffice-draw.desktop;
    application/vnd.ms-publisher=org.kde.kate.desktop;
    

    うーん、それは正しくありません。さらにファイルを調べると、xdg-mime[Default Applications]の下にケイトを追加しているのに、[Added Associations]は追加していないことがわかります。 Dolphin/keditfiletype5 application/vnd.ms-publisherを使用してMIMEタイプを変更した場合、org.kde.kate.desktop;の前にlibreoffice-writer.desktop;[Added Associations]の下に追加されていることがわかりました。

    https://cgit.kde.org/kde-cli-tools.git/tree/keditfiletype/mimetypedata.cpp?id=5d1c3d77798949c21958b60cf78d36fb49c57ea2#n367

    FreeDesktop spec を使用すると、問題はありません。 [Default Applications]に記載されていない場合でも、[Added Associations]の下はすべてデフォルトにする必要があります。

    [デフォルトのアプリケーション]グループは、特定のMIMEタイプに使用されるデフォルトのアプリケーションを示します。これは、たとえば、ファイルマネージャでファイルをダブルクリックしたときに起動されるものです。アプリケーションがインストールされなくなった場合は、リストの次のアプリケーションが試行されます。

    したがって、これはおそらくKDEのバグであり、上流で修正されているようです:

    Mimeapps.listの「デフォルトアプリケーション」を優先アプリケーションにする

    https://phabricator.kde.org/D2669

    これは おそらくバグでもありますxdg-mimeの-​​ 巨大なシェルスクリプトです 先端的な作業を行う必要があるため、十分な注意を引くことができません。

    とにかく、その行を修正して、代わりに次のようにします。

    application/vnd.ms-publisher=org.kde.kate.desktop;libreoffice-writer.desktop;libreoffice-draw.desktop;
    

    それが役に立ったかどうか見てみましょう。

    $ xdg-mime query default application/vnd.ms-publisher
    libreoffice-writer.desktop
    

    うーん、なぜうまくいかなかったのですか。

    これは、xdg-mimeが独自にチェックするのではなく、デスクトップが使用するツールを呼び出すためです。 KDEでは、これはkmimetypefinder5ktraderclient5kbuildsycoca5などです。 KDEがMIMEタイプの関連付けキャッシュを構築する方法であるため、最後の1つは重要です。

    これは~/.local/share/applications/mimeinfo.cacheのキャッシュではないことに注意してください。ただし、その場所は 「互換性のため、最新の仕様では非推奨」 としてリストされているためです。

    KDEのMIMEタイプを再構築する適切な方法は次のとおりです。

    $ kbuildsycoca5
    

    代わりに削除することもできます:

    $ rm ~/.cache/ksycoca5_*
    

    そしてさらに試みる:

    $ xdg-mime query default application/vnd.ms-publisher
    org.kde.kate.desktop
    

    それは有望に見えます。次に、実際のファイルを開いてみましょう。

    $ xdg-open ~/.ssh/id_rsa.pub
    

    KDEでは、これは 基本的に同じ です。

    $ kde-open5 ~/.ssh/id_rsa.pub
    

    これは、Kateテキストエディタで開きます。成功!

  6. それでも機能しない場合はどうなりますか?

    KDEプラズマ5では、xdg-mime query defaultktraderclient5 --mimetypeを呼び出すだけです。したがって、ktraderclient5 --mimetype application/vnd.ms-publisherは有用な情報を提供しますが、出力は膨大になる可能性があります。

    XDG_UTILS_DEBUG_LEVEL=2xdg-*コマンドに追加すると、デバッグ出力が向上する場合があります。

    KDEでログを有効にしてqDebug出力を取得することも有効です。

    $ if ! test -f ~/.config/QtProject/qtlogging.ini; then printf '[Rules]\n*.debug=true\nqt.*.debug=false\n' > ~/.config/QtProject/qtlogging.ini; else printf 'Error: ~/.config/QtProject/qtlogging.ini already exists.\n'; fi;
    

    また、アプリケーションが使用しているファイルを確認してください。 xdg-openkde-open5を使用しますが、アプリケーションの動作が異なる場合があります。たとえば、古い非推奨のMIMEタイプの関連付けファイルの場所を調べている可能性があります。

    • ~/.local/share/applications/mimeapps.list

    またはおそらくさらに古い場所:

    • ~/.local/share/applications/defaults.list

    アプリケーションが実際に使用しているファイルを特定するには、ソースコードを掘り下げるか、straceを使用する必要がある場合があります。

    カスタムMIMEタイプまたはカスタムデスクトップファイルを使用している場合、状況はさらに複雑になります。

1