19.10 中用于 Thunderbird 启动脚本的桌面启动器?

19.10 中用于 Thunderbird 启动脚本的桌面启动器?

我已经使用 Ubuntu 19.10 3 周了。我不得不手动安装 Thunderbird,因为从我的 Mac 迁移的配置文件是版本 68.4.2,比 Ubuntu 软件中可用的存储库早一个版本。手动安装后,Thunderbird 不会显示在应用程序网格中,必须从终端启动。我不想每次都输入,而是希望在 Dock 中有一个永久的图标/收藏夹或在桌面上有一个启动器。

我按照以下说明安装了 Thunderbird 68.4.2:

https://support.mozilla.org/en-US/kb/installing-thunderbird-linux

要启动 Thunderbird,现在我必须在终端中输入“~/thunderbird/thunderbird”来启动启动 Thunderbird 的脚本。因此,我开始按照指示在桌面上创建启动器,并了解到最近的 Ubuntu 版本确实没有让这变得容易。我已经安装了 Gnome Tweaks,然后在 Tweaks 中启用了桌面图标扩展并下载了一个 png 图标。我按照几个网页/论坛上的说明操作,但没有成功。这个在解释一些 Ubuntu 障碍方面非常有用,但它在我的计算机上仍然不起作用:

gnome-desktop-item-edit:在 Ubuntu 19.10 上找不到命令

我在 ~/local/share/applications/ 中创建并复制到 ~/Desktop 并在属性中标记为可执行文件的示例:

[Desktop Entry]
Name=Thunderbird
Exec=~/thunderbird/thunderbird
Type=Application
Terminal=false
Icon=~/.local/share/icons/thunderbird-icon-blue.png
NoDisplay=false
Comment=Why are shortcuts so obtuse when they are so useful

它作为通用文件显示在桌面上,但不起作用。重新启动后,不起作用。双击通用图标没有任何反应,自定义图标也不显示。

我的语法错了吗?我尝试了一些变体,比如 Exec 和 Icon 的完整路径,但没用。在 19.10 中,脚本启动器的基本功能是不可能实现的吗?

我看到的一种解决方法是激活 Mozilla 的 PPA,但当我想使用尚未进入主 Ubuntu 存储库的合法 Thunderbird 发行版本时,激活安装测试版似乎并不明智。如果我启用 Mozilla 的 PPA,我不知道我是否可以控制只更新 Thunderbird 一次,然后禁用 PPA。一旦图标正常工作,我就不打算再次更新 Thunderbird。

谢谢您,请帮我解释一下,以适应我对 Linux 的不太熟练。

答案1

当然,第一个条件是创建一个有效的桌面文件。将桌面文件放在.local/share/applications主文件夹中的隐藏文件夹中。几秒钟内,您应该能够在应用程序概述中自动找到它或通过搜索找到它。如果您可以从那里启动应用程序,则桌面文件没有问题。

然后,您也可以将其放在桌面上。为此,请将其复制到主文件夹中的“桌面”文件夹中。它现在应该出现在您的桌​​面上,但带有一个通用图标。右键单击该图标并选择“允许启动”,将其变成桌面上可用的应用程序启动器。

答案2

仅供参考,如果你直接从网站下载并解压 Thunderbird 78+,图标现在存储在your_thunderbird_folder/chrome/icons/default/default256.png而不是your_thunderbird_folder/icons/thunderbird-desktop.png

我的~/.local/share/applications/thunderbird.desktop文件是:

[Desktop Entry]
Type=Application
Name=Thunderbird
GenericName=Thunderbird
Comment=Email, contacts, calendar, tasks, feed rss reader, chat, and groupware app.
Exec=/home/username/thunderbird/thunderbird
Icon=/home/username/thunderbird/chrome/icons/default/default256.png
Terminal=false
Categories=Office

答案3

解决了!我回到了原始问题中第二个链接中的帮助文件,并使用 安装了 alacarte sudo apt install alacarte,它将主菜单应用程序置于概览中。我使用主菜单 GUI 创建了一个带图标的工作快捷方式。然后,我将使用主菜单生成的 .desktop 文件与失败的 artisan 文件进行了比较。

由于~/thunderbird/thunderbird启动了脚本,显然必须设置Terminal=true。主菜单生成的 .desktop 也没有包含值NoDisplay

以下是在 Ubuntu 19.10 中手动安装 Thunderbird 的 .desktop 文件的工作语法:

[Desktop Entry] Name=Thunderbird Exec=/home/username/thunderbird/thunderbird Comment=Made with Main Menu sheesh Terminal=true Icon=/home/username/thunderbird/icons/thunderbird-desktop.png Type=Application

为了在 Dock 中放置一个永久的 Thunderbird 启动图标,我在“应用程序概览”中搜索它,右键单击并选择“添加到收藏夹”。现在单击 Dock 图标会启动脚本,该脚本会将一个临时的 Thunderbird 图标放置在 Dock 的最远端,直到我退出该应用程序。作为一名长期的 Mac 用户,我习惯于在 Dock 中排列应用程序以反映使用频率,所以我很高兴终于在 Dock 的开头附近有一个永久的 Thunderbird 图标。

谢谢您的帮助,我希望这个帖子将来能够帮助到其他人。

答案4

对于我来说,18.04 LTS 上的 Thunderbird 91 的工作方式如下:

在 .local/share/apllications 中添加 Thunderbird.desktop,Thunderbird.desktop 语法是:

[Desktop Entry]
Name=Thunderbird.desktop
Exec=/home/youruser/thunderbird-91.1.1/thunderbird/thunderbird
Terminal=false
Icon=/usr/share/icons/your icon name.png
Type=Application

将您喜欢的下载图标复制到 中/usr/share/icons

而且它可以立即运行,无需关机。

相关内容