Ubuntu系統爲應用創建桌面快捷方式(以Pycharm爲例)

Ubuntu系統的快捷方式都放在/usr/share/applications,首先在該目錄下建立一個Pycharm.desktop。vim

cd /usr/share/applications/
sudo vim Pycharm.desktop

這裏必須得用root權限sudo才能寫入,而後在文件中寫入如下內容。app

[Desktop Entry]
Type = Application      
Name = Pycharm
GenericName = Pycharm
Comment = Pycharm:The Python IDE
Exec = "install_dir/pycharm-community-2016.3.2/bin/pycharm.sh" %f
Icon = install_dir/pycharm-community-2016.3.2/bin/pycharm.png
Terminal = pycharm
Categories = Pycharm;

其中Exec是程序啓動的路徑,Icon是程序圖標的位置,install_dir是安裝路徑,而後保存,再次啓動程序,而後將其鎖定到啓動器就能夠了。spa

cd install_dir/pycharm-community-2016.3.2/bin
./pycharm.sh
相關文章
相關標籤/搜索