Ubuntu自定义Applications

用户自己的软件都放在 ~/.local/share/applications/ 目录下面,所以,要想添加软件到menu,只要把写好的desktop文件放到里面就可以了。desktop文件的基本格式如下:

[Desktop Entry]
Name=Your Application
Exec=The application exec path(.sh/exe/.py/etc.)
Icon=The application's icon path.
Type=Application
Categories=GTK;GNOME;Utility;

放入目录中后在menu中就可以找到你的软件了。

要是想在整个系统中都可以运行你的程序(让所有的用户都可以运行),只需要把desktop文件放到/usr/share/applications/目录中即可。(or ~/.local/share/applications)

See: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en

comments powered by Disqus