[Others] 默认软件问题
Tofloor
poster avatar
锵锵枪ᯤ
deepin
2025-04-23 11:22
Author

文本文档设置了默认已文本编辑器打开

但是有的还是以vi打开

Reply Favorite View the author
All Replies
deepin
2025-04-23 15:19
#1
 15:13:59  xiali ~  xdg-mime --help
xdg-mime - command line tool for querying information about file type handling
and adding descriptions for new file types

Synopsis

xdg-mime query { filetype | default } ...

xdg-mime default application mimetype(s)

xdg-mime install [--mode mode] [--novendor] mimetypes-file

xdg-mime uninstall [--mode mode] mimetypes-file

xdg-mime { --help | --manual | --version }

Use 'man xdg-mime' or 'xdg-mime --manual' for additional info.

 15:14:03  xiali ~  xdg-mime query filetype Desktop/qq.desktop 
application/x-desktop

 15:16:15  xiali ~  xdg-mime query default application/x-desktop
deepin-editor.desktop

query filetype查看文件类型,然后用query default文件类型去查看默认程序,默认程序是可以xdg-mime default去设置的。还是用vi打开说明那个文件类型还是有些特殊的。

Reply View the author
deepin
2025-04-23 15:22
#2
Reply View the author
Cryolitia
deepin
2025-04-23 15:48
#3

打开终端,输入 echo $EDITOR 看看是什么

Reply View the author
锵锵枪ᯤ
deepin
2025-04-24 09:31
#4
Cryolitia

打开终端,输入 echo $EDITOR 看看是什么

Reply View the author
Cryolitia
deepin
2025-04-24 17:09
#5
锵锵枪ᯤ

那就是这个问题了,打开 ~/.bashrc 在最后加一行 export EDITOR=gedit或者换成任何你喜欢的编辑器

Reply View the author