系统:Ubuntu Mate 21.04
我希望在编辑 .desktop 文件的上下文菜单中有默认选择是pluma
. 但是MATE拒绝兑现我的愿望!我怎么能把它屈从于我的意志?
这显示了 Libreoffice 的默认选择
我选择“使用其他应用程序打开”并选择pluma
. 勾选“记住此应用程序”框。
但是下次我这样做时,Libreoffice 仍然是默认设置。
如何制作pluma
用于编辑 .desktop 文件的默认上下文菜单项?
根据要求,这里是~/.config/mimeapps.list
:
[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
text/html=firefox.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/mailto=thunderbird.desktop
application/x-extension-eml=thunderbird.desktop
message/rfc822=thunderbird.desktop
inode/directory=caja-folder-handler.desktop
text/plain=pluma.desktop
audio/mpeg=rhythmbox.desktop
audio/x-mpegurl=rhythmbox.desktop
audio/x-scpls=rhythmbox.desktop
audio/x-vorbis+ogg=rhythmbox.desktop
audio/x-wav=rhythmbox.desktop
video/mp4=io.github.celluloid_player.Celluloid.desktop
video/mpeg=io.github.celluloid_player.Celluloid.desktop
video/mp2t=io.github.celluloid_player.Celluloid.desktop
video/msvideo=io.github.celluloid_player.Celluloid.desktop
video/quicktime=io.github.celluloid_player.Celluloid.desktop
video/webm=io.github.celluloid_player.Celluloid.desktop
video/x-avi=io.github.celluloid_player.Celluloid.desktop
video/x-flv=io.github.celluloid_player.Celluloid.desktop
video/x-matroska=io.github.celluloid_player.Celluloid.desktop
video/x-mpeg=io.github.celluloid_player.Celluloid.desktop
video/x-ogm+ogg=io.github.celluloid_player.Celluloid.desktop
image/bmp=eom.desktop
image/gif=eom.desktop
image/jpeg=eom.desktop
image/png=eom.desktop
image/tiff=eom.desktop
application/pdf=atril.desktop
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop
application/msword=libreoffice-writer.desktop
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop
application/vnd.oasis.opendocument.spreadsheet=libreoffice-calc.desktop
application/vnd.ms-excel=libreoffice-calc.desktop
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop
application/x-desktop=pluma.desktop
application/rtf=libreoffice-writer.desktop
application/x-shellscript=pluma.desktop
[Added Associations]
audio/mpeg=vlc.desktop;rhythmbox.desktop;
audio/x-mpegurl=vlc.desktop;rhythmbox.desktop;
audio/x-scpls=vlc.desktop;rhythmbox.desktop;
audio/x-vorbis+ogg=vlc.desktop;rhythmbox.desktop;
audio/x-wav=vlc.desktop;rhythmbox.desktop;
video/mp4=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/mpeg=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/mp2t=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/msvideo=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/quicktime=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/webm=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/x-avi=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/x-flv=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/x-matroska=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/x-mpeg=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
video/x-ogm+ogg=vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
application/rtf=libreoffice-writer.desktop;
@nobody 在评论中建议我尝试上下文菜单中的属性条目。这就是真正变得奇怪的地方。一开始,它看起来像这样。
我以为胜利就在我的掌握之中!我删除了 Libreoffice 并选中了 Pluma 旁边的框。那肯定行得通!但是不,拒绝,现在上下文菜单没有默认值,它只显示 Open With Other Application 此时我开始认为有人不希望我用 Pluma 打开这些!
好的,我让它工作了,但是确实发生了一些我不明白的事情。有关详细信息,请参阅问题。
为了让它工作,我点击了这里
并输入
pluma
自定义命令。现在它起作用了!注意:输入自定义命令时不能在左侧选择pluma,否则不起作用
这很奇怪。
感谢帮助我解决问题的评论者。