How to execute root-privilege programs in KDE autostart?
How can I execute privileged operations (I want to run chmod and hdparm) whenever KDE starts up? I have tried putting a script in the ~/.kde/AutoStart directory, but since KDE runs as a normal user, the operations chmod and hdparm are to execute seem to fail. (This can also be because maybe KDE is not executing the script - see below).
1. Is this the correct way to use KDE's autostart? I. e. by placing executables or scripts into ~/.kde/AutoStart? Or do I need to somehow create a file that has the autostart "format", like
where "Exec=sh -f myscript.sh" and "Type=Script" and the file is called, say, startup.desktop?? So far, neither seem to work - just dropping the script in /Autostart, and creating such a "desktop format" file...
2. How can I run chmod and hdparm with root privs, without being root, if I can get autostart to execute my script as in (1) above?
Thanks - any help appreciated!