On Ubuntu,run applications as sudo via Application Launcher
Posted on 2009-02-23 12:33 Fingki.li 閱讀(1316) 評論(0) 編輯 收藏 所屬分類: About linux1.Switch to root
#su root(and input your password)
2.edit the sudoers file
root#sudovi -f /etc/sudoers
add the below line after the last line in sudoers file:
#su root(and input your password)
2.edit the sudoers file
root#sudovi -f /etc/sudoers
add the below line after the last line in sudoers file:
liqingfeng ALL = (root) NOPASSWD: /usr/bin/vimMore userful infomation:https://help.ubuntu.com/community/Sudoers
(replace liqingfeng with your user name and replace /usr/bin/vim with your command).
save your change.
3.add sudo in Application Launcher
add 'sudo' in front of the command via editing the 'command' attribute of Application Launcher.
So far so good,you can run the application as sudo via clicking the Application Launcher.