[3rd-Party Apps] gvim无法设置为打开txt的默认程序
Tofloor
poster avatar
widon1104
deepin
2021-04-21 06:09
Author
deepin安装gvim,默认没有desktop文件,我新建了一个desktop文件
[Desktop Entry]
Categories=Utility;TextEditor;
Comment=gvim
Encoding=UTF-8
Exec=/usr/bin/gvim %F
Icon=/usr/share/icons/hicolor/48x48/apps/gvim.png
MimeType=txt
Name=gvim
Terminal=false
Type=Application

但是右键打开txt文件,选择gvim,然后勾选设置为默认以后能够打开txt文件,然后诡异的事情出现了
我把gvim关闭,重新再一次打开txt,这时候又让我选择用什么软件打开文件,我不是已经把gvim设置为默认了吗?

Reply Favorite View the author
All Replies
lenke
deepin
2021-04-21 06:39
#1

尝试修改desktop文件

MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-patch;text/x-adasrc;text/x-chdr;text/x-csrc;text/css;application/x-desktop;text/x-patch;text/x-fortran;text/html;text/x-java;text/x-tex;text/x-makefile;text/x-objcsrc;text/x-pascal;application/x-perl;application/x-perl;application/x-php;text/vnd.wap.wml;text/x-python;application/x-ruby;text/sgml;application/xml;model/vrml;image/svg+xml;application/json;

Reply View the author
忘记、过去
deepin
2021-04-21 18:15
#2

mimetype不是这么用的,linux没有后缀名这个说法。

 

终端执行 mimetype xxxxxxxx 获取指定文件的文件类型。

Reply View the author
widon1104
deepin
2021-04-23 04:43
#3
忘记、过去

mimetype不是这么用的,linux没有后缀名这个说法。

 

终端执行 mimetype xxxxxxxx 获取指定文件的文件类型。

我把MimeType设置成text/plain也不行,

如果txt文件设置默认用gvim打开,打开txt文件的时候还是会弹出打开方式....

Reply View the author