标签:des blog http io os ar sp div on
[转]ubuntu 12.04添加launcher方法
http://www.cnblogs.com/Jerryshome/archive/2012/08/21/2649500.html
对ubuntu 12.04自定义launcher的方法做一记录,希望能对有需要的朋友有所帮助
以sublime text 2的launcher定义为例
(1) 添加简介命令来启动sublime
sudo ln -s /opt/softwares/Sublime_Text2/sublime_text /usr/bin/sublime
(2)在Unity创建一个launcher
sudo sublime /usr/share/applications/sublime.desktop
在sublime.desktop中添加如下内容
[Desktop Entry]
Name=Sublime Text 2
GenericName=Sublime Text 2 Editor
Type=Application
Exec=/opt/softwares/Sublime_Text2/sublime_text
Icon=/opt/softwares/Sublime_Text2/Icon/48x48/sublime_text.png
Categories=TextEditor;IDE;Development;
X-Ayatana-Desktop-Shortcuts=Runroot;Newwindow
[Runroot Shortcut Group]
Name=Run as root
Exec=gksudo -k -u root /opt/softwares/Sublime_Text2/sublime_text
TargetEnvironment=Unity
[Newwindow Shortcut Group]
Name=New Window
Exec=/opt/softwares/Sublime_Text2/sublime_text -n
TargetEnvironment=Unity
(3)如果此时sublime处于运行状态,则在ubuntu左侧launcher窗口应该出现一个sublime的图标,点击右键,并选择Lock to Launcher即可
注:sublime 的安装路径请自行根据实际情况进行调整
标签:des blog http io os ar sp div on
原文地址:http://www.cnblogs.com/wansui/p/4051266.html