I'm using (X)dialog for a script that a normal runs, but it needs root privileges for some commands. The script runs from a .desktop file, thus the user sees no terminal. For example here
#!/bin/bash Xdialog --msgbox "Welcome" 0 0 touch /root/testfile Xdialog --msgbox "All OK" 0 0
touch command does not execute. One solution would be to use
kdesu touch /root/testfile
but this approach has two problems: the user has to provide the password for every command and the window of kdesu does not follow the same theme as the rest of the windows.
Note that I want the user to provide the root password and not being a sudoer.
I have found a similar script here, but I cannot apply it on my script, as the actual command cannot accept the password as the