Hi all
I have a script containing lots of commands that need root rights. Instead of running all these command with sudo inside the script I prefer to run the whole script with sudo. This is also more comfortable to put it in the sudoers file.
sudo ./script.sh
However, I'd like to show the progress with a kdialog progress bar, which does not work. The message box containing the bar shows up but when trying to update the progress there is an error message "object not accessible".
dcopRef=`kdialog --progressbar "Initialising..." 5` # works
dcop $dcopRef setProgress 1 # error object not accessible
I'm pretty sure it has to do with user rights, since the progress bar code works then calling the script without sudo, but I have no idea where to start. Does anyone know how to fix this and still calling the script with sudo?
I'm using openSUSE 10.3 with KDE 3.5.7
Thanks, Chris