如何将应用程序添加到消息菜单?

Ted*_*uld 17 indicator menu application-development

我想让一个应用程序出现在默认情况下没有安装在那里的消息传递菜单中,有没有办法在每个用户的基础上做到这一点?

Ted*_*uld 15

消息菜单中的每个应用程序在以下系统目录中都有一个文件:

/usr/share/indicators/messages/applications/
Run Code Online (Sandbox Code Playgroud)

该目录包含具有这些应用程序桌面文件路径的文件。您还可以使用以下路径在主目录中包含其中之一:

~/.config/indicators/messages/applications/
Run Code Online (Sandbox Code Playgroud)

假设我想将 Thunderbird 添加到我的消息传递菜单中。我会做这样的事情:

$ mkdir -p ~/.config/indicators/messages/applications/
$ echo /usr/share/applications/thunderbird.desktop > ~/.config/indicators/messages/applications/thunderbird
Run Code Online (Sandbox Code Playgroud)

第一次创建应用程序目录时,您需要重新启动会话(注销并重新登录)。

这是一个来自 python 应用程序的使用示例

  • 只需重新启动面板`killall gnome-panel` 即可,您无需注销。 (3认同)