japhyr
January 7th, 2011, 06:38 PM
Hello,
I am writing a bash script to automate the installation of packages when I configure a new computer. The script is working, but since many of the commands need root privileges, I have to run the script from the terminal, ie "sudo /home/username/Desktop/script.sh". If I double click the script icon on the Desktop, the program runs but fails quickly because it does not have root privileges.
Is there a way to gain root privileges after clicking the script icon?
I am writing a bash script to automate the installation of packages when I configure a new computer. The script is working, but since many of the commands need root privileges, I have to run the script from the terminal, ie "sudo /home/username/Desktop/script.sh". If I double click the script icon on the Desktop, the program runs but fails quickly because it does not have root privileges.
Is there a way to gain root privileges after clicking the script icon?