linux eclipse add desktop shortcut with root permission

gedit ~/.local/share/applications/opt_eclipse.desktop

sudo apt-get install gksu
[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=** something like /opt/eclipse/icon.xpm **
Exec= gksudo -k -u root ** something like /opt/eclipse/eclipse **
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse

change permission of opt_eclipse.desktop to executable

http://askubuntu.com/questions/80013/how-to-pin-eclipse-to-the-unity-launcher
http://stackoverflow.com/questions/21130914/how-can-i-run-eclipse-always-as-root-in-ubuntu-12-04
 
posted @ 2017-01-28 22:39  juejiang  阅读(324)  评论(0编辑  收藏  举报