I have two files, one being a desktop file, the other being a shell script. The desktop file is meant to open the shell script, and execute it in a xTerm GUI as root, without needing "sudo password."
I was told to remove
sudo completely from the shell script, leaving this. Since the program needed root access, I edited my /etc/sudoers to the following:
david ALL=(ALL) NOPASSWD:/home/david/upgrade.sh david ALL=(ALL) NOPASSWD:/home/david/Desktop/Upgrade.desktop
As I was instructed to, and from there, configured the desktop file. I started with the following:
xterm -e sudo sh -p /home/david/upgrade.sh
But when I ran the desktop file it still asked for my password. I thought that the
sudo in the desktop file could be the problem, but upon removing it, the xTerm window no longer opens. How can I execute this shell script from the desktop file without entering my password?