Easy file execution with mouse click

Asked by Ajay Srinivasan

say for example , I need to run a command in the terminal as super user .

1. I open the terminal and enter the command with the prefix 'sudo'
2. It requests for my password and waits
3.I have to input my password then only the command will execute.

I just want to make some script just enabling the following behavior
 double clicking it should run the command in the terminal with the sudo mode.
 it should not wait for me to input password.

Any suggestions please?
Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ubuntu-meta Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

run:

gedit ~/Desktop/launcher.desktop

add the below text:

[Desktop Entry]
Type=Application
Exec=gksudo /usr/bin/gnome-terminal -x /path/to/command
Icon=gnome-terminal
Name=Some Name here

Save the new file and close gedit, the command will now run ok. Obviously you can change the icon and Name as you wish, you will obviously need to change /path/to/command to the actual script you run.

Can you help with this problem?

Provide an answer of your own, or ask Ajay Srinivasan for more information if necessary.

To post a message you must log in.