35

ubuntu桌面创建快捷方式

 5 years ago
source link: https://www.linuxprobe.com/ubuntu-fast.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在Ubuntu上装了一个Sublime Text 2,想给它创建一个快捷方式到桌面发现不行,要不然就是没有图标,非常的难看

于是乎,突然想起在删除文件的时候,经常看到xxx.desktop这样的文件。。。

#先打开终端

ctrl+alt+t
cd 桌面
touch Sublime_Text_2.desktop
vi Sublime_Text_2.desktop

#写入以下代码

[Desktop Entry]
Encoding=UTF-8
Name=Sublime Text
Comment=The Smarter Way to Code
exec=/home/zzs/ubuntu_soft/Sublime\ Text\ 2/sublime_text
Icon=/home/zzs/ubuntu_soft/Sublime Text 2/Icon/32x32/sublime_text.png
Categories=Application;Development;IDE
Version=1.0
type=Application
Terminal=0

#然后保存退出

shift zz

#给一个执行权限

chmod + Sublime_Text_2.desktop

#回到桌面看看是不是已经有一个图标了,点击就可以用了。还可以拖到别的地方(包括unity)
注意:zzs/ubuntu_soft/是我的文件存放目录,请酌情修改


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK