[problem help] 创建的 *.desktop 没有出现在启动器菜单中 Resolved
Tofloor
poster avatar
oldfeel
deepin
2023-09-14 19:55
Author

*.desktop 内容是

[Desktop Entry]
Name=Clash for Windows
Comment=Clash for Windows
Exec=/home/oldfeel/Clash\ for\ Windows-0.20.31-x64-linux/cfw
Icon=/home/oldfeel/Clash for Windows-0.20.31-x64-linux/Clash_Logo.png
Terminal=false
Type=Application
StartupNotify=true
Categories=Network;Internet;

放在 /home/oldfeel/.local/share/applications 或者 /usr/share/applications 都没有出现在启动器菜单中.

已解决: 目录不能用大写字母,改为全小写的 clash 就可以了.

Reply Favorite View the author
All Replies
liwl
deepin
2023-09-14 20:03
#1

注销,重新登录,生效

Reply View the author
oldfeel
deepin
2023-09-14 20:07
#2
liwl

注销,重新登录,生效

试过了,没有生效

Reply View the author
HelloWorld!
deepin
2023-09-14 20:27
#3

我在/usr/share/applications下面新建的idea-IU.desktop,是可以出现在启动器的,你要不检查一下文件名,内容再试试。

[Desktop Entry]
Name=idea-IU
Exec=/home/Deepin-MHC/Documents/ideaIU-2022.1.4/idea-IU-221.6008.13/bin/idea.sh
Icon=/home/Deepin-MHC/Documents/ideaIU-2022.1.4/idea-IU-221.6008.13/bin/idea.png
Terminal=false
StartupNotify=true
Type=Application
Encoding=UTF-8
Categories=Application;

Reply View the author
fax928
deepin
2023-09-14 20:27
#4

双击.desktop文件能打开程序吗?

Reply View the author
liwl
deepin
2023-09-14 20:30
#5
It has been deleted!
liwl
deepin
2023-09-14 20:31
#6
oldfeel

试过了,没有生效

我估计是Icon那个地方有空格导致的

你可以用双引号把这个路径括起来看看

Reply View the author
jjcui8595
deepin
2023-09-14 21:54
#7

重点检查以下语句

Exec=/home/oldfeel/Clash\ for\ Windows-0.20.31-x64-linux/cfw

Icon=/home/oldfeel/Clash for Windows-0.20.31-x64-linux/Clash_Logo.png

Reply View the author
神末shenmo
deepin
Spark-App
2023-09-14 22:01
#8
Reply View the author
花酒锄作田
deepin
2023-09-14 22:12
#9

图片.png

这是我的clash配置,可以参考下。可能是路径问题,比如有空格。或者权限有问题,没有可执行权限。

Reply View the author
李宁
deepin
2023-09-14 22:23
#10

将权限改成只读就行了

Reply View the author
Ziggy
deepin
2023-09-14 22:41
#11

路径不能有空格,空格要转义

Reply View the author
oldfeel
deepin
2023-09-15 22:09
#12
fax928

双击.desktop文件能打开程序吗?

可以的

Reply View the author
oldfeel
deepin
2023-09-15 22:10
#13
Ziggy

路径不能有空格,空格要转义

修改路径为没有空格后,还是没有出现在菜单中

Reply View the author
oldfeel
deepin
2023-09-15 22:20
#14
李宁

将权限改成只读就行了

没有效果

截图_dde-desktop_20230915142001.png

Reply View the author
oldfeel
deepin
2023-09-15 22:27
#15
花酒锄作田

图片.png

这是我的clash配置,可以参考下。可能是路径问题,比如有空格。或者权限有问题,没有可执行权限。

谢谢,我改名字为首字母大写的 Clash 无效,用首字母小写的 clash 就可以了

Reply View the author
fax928
deepin
2023-09-15 22:34
#16
oldfeel

谢谢,我改名字为首字母大写的 Clash 无效,用首字母小写的 clash 就可以了

挺奇怪的。😂😂😂

感谢分享。

Reply View the author
oldfeel
deepin
2023-09-15 22:37
#17
fax928

挺奇怪的。😂😂😂

感谢分享。

可能代码里匹配字符串是否相同时,一边转换全小写,一边没有转换吧.

Reply View the author
j***[email protected]
deepin
2024-04-04 17:03
#18
It has been deleted!
t***[email protected]
deepin
2024-06-15 15:24
#19
It has been deleted!