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!
The hdparm command can be put in your init scripts so that it executes during the boot sequence.
Why do you need to do a chmod before starting KDE?
could you amplify where hdparm should go on the startup scripts?
I have a related problem with a script I need to run to get my touchpad to work. If I try to get Gnome to execute it on login, I get a permission denied error. I need to put it somehwere where scripts are executed as root. Where would that be?
ok I found out
I made a link to it in /etc/rcS.d and I put S80 in front of the link name, since all the others followed that patter.
this is on debian
|All times are GMT -5. The time now is 02:43 AM.|