Nixを使用してインストールされたパッケージの.desktopファイルが破損しています。

Nixを使用してインストールされたパッケージの.desktopファイルが破損しています。

私は最近、Nixを使用してKubuntu 22.10にFilezillaとKeepassをインストールし、これらのアプリケーションがアプリケーションメニューに表示されるようにシンボリックリンクを~/.nix-profile/share/applications接続しました。/usr/share/applications

アプリケーションメニューでこれらのアプリケーションのいずれかを実行しようとしたときに「ファイルが見つかりませんでした」というエラーが発生し、生成されたファイルを確認した結果、.desktopそのnix-envファイルが破損していることに気づきました。

[Desktop Entry]
Name=FileZilla
GenericName=FTP client
GenericName[da]=FTP-klient
GenericName[de]=FTP-Client
GenericName[fr]=Client FTP
Comment=Download and upload files via FTP, FTPS and SFTP
Comment[da]=Download og upload filer via FTP, FTPS og SFTP
Comment[de]=Dateien über FTP, FTPS und SFTP übertragen
Comment[fr]=Transférer des fichiers via FTP, FTPS et SFTP
Exec=filezilla
Terminal=false
Icon=filezilla
Type=Application
Categories=Network;FileTransfer;
Version=1.0

filezilla bash エイリアスが生成されなかったため、「Exec」行は明らかに機能しません。nix-env端末に「filezilla」と入力すると何も起こりません。

一方、奇妙な理由でファイルはうまくbrave-browser .desktop動作します。 Exec行はあなたが期待していたものとまったく同じです。

Exec=/nix/store/p432kx8jkqad2xiarjj08xp20a16n8lx-brave-1.49.120/bin/brave

更新:ls -lの出力は次のとおりです。

lrwxrwxrwx 1 root root 99 dez 31  1969 brave-browser.desktop -> /nix/store/p432kx8jkqad2xiarjj08xp20a16n8lx-brave-1.49.120/share/applications/brave-browser.desktop
lrwxrwxrwx 1 root root 97 dez 31  1969 filezilla.desktop -> /nix/store/wrv7nr1208cy4yx9sizmqcjg2r5r46f7-filezilla-3.63.1/share/applications/filezilla.desktop
lrwxrwxrwx 1 root root 93 dez 31  1969 keepass.desktop -> /nix/store/4brbbmi0swymm7987yd8l56yf1pgdvi2-keepass-2.53.1/share/applications/keepass.desktop

これは、これらの.desktopファイルが正しい.desktopファイルにリンクする必要があることを意味するので興味深いです。ただし、KDEはこれを期待どおりに解釈しません。

ベストアンサー1

おすすめ記事