Ubuntu桌面配置环境

applications.desktop

  • /usr/share/applications
  • sudo cp xxx.desktop /usr/share/applications

命令执行

需要将程序放入环境变量

[Desktop Entry]
Categories=Development;
Comment=Clash Nyanpasu! (∠・ω< )⌒☆
Exec=clash-nyanpasu
Icon=clash-nyanpasu
Name=Clash Nyanpasu
Terminal=false
Type=Application

路径执行

mv sublime_text /opt/ # 默认放入opt目录
chmod + x /opt/sublime_text # 赋予执行路径可执行权限
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=new-window;new-file;

[Desktop Action new-window]
Name=New Window
Exec=/opt/sublime_text/sublime_text --launch-or-new-window
OnlyShowIn=Unity;

[Desktop Action new-file]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
posted @ 2024-11-16 11:31  NAGISB  阅读(5)  评论(0编辑  收藏  举报