ubuntu 20.04 不能鼠标双击打开 .desktop (桌面快捷方式图标)文件(双击变为使用文本编辑器打开)的解决办法

您所在的位置:网站首页 ubuntu2004没有启动管理器 ubuntu 20.04 不能鼠标双击打开 .desktop (桌面快捷方式图标)文件(双击变为使用文本编辑器打开)的解决办法

ubuntu 20.04 不能鼠标双击打开 .desktop (桌面快捷方式图标)文件(双击变为使用文本编辑器打开)的解决办法

2023-07-14 03:57| 来源: 网络整理| 查看: 265

经测试ubuntu 18.04 可以双击打开 .desktop文件

然而ubuntu 20.04中,在文件管理中 双击.desktop文件 变为了 使用文本编辑器打开,而不是打开.desktop对应的应用程序。

假如现在有一个桌面快捷方式文件 xxxxxx.desktop,在终端中通过命令 ./xxxxxx.desktop 能打开该应用程序,但是直接鼠标双击变为了使用文本编辑器打开,这不是我们想要的结果。

解决方法 方法一:

在ubuntu 20.04中要想双击打开只能建立桌面图标。

把.desktop 文件复制到桌面,然后鼠标右键,选择 允许启动 。现在 图标就显示正常了,而且可以双击打开了。

但是这种方法 桌面图标不能添加到dock中的收藏夹。

参考:

gnome - .desktop files not executing via double click, only from terminal - Ask Ubuntu

Nautilus no longer allows the launching of .desktop files thru it. (nautilus)

The only way to double click > launch is to have the .desktop file on your Desktop. Even then you'll need to set it to allow launching, likely thru the right click context menu.

Other file managers such as nemo aren't encumbered in this regard.

方法二:

复制.desktop 文件到自己主目录下的 ~/.local/share/applications 这样 在应用程序中就能找到该 应用程序图标了,就能鼠标点击打开了。

而且该应用程序能添加到dock的收藏夹。

参考:

Cannot launch .desktop files (opens with Text Editor instead) - Ask Ubuntu

Add the .desktop file inside the ~/.local/share/applications and then it will appear in the App launcher, so you can add it to the Dock (add to favorites) and copy to the Desktop folder to add to Desktop.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3