KDE Autorun
i have a small bash script, that i would like to be runned everytime a user start his computer, and everytime before he shuts down
i thought of placing it in rc5.d and rc0.d i made Code:
ln -s ../scripname.sh S80script but for some weird reason, it didnt work, and it worked, when i placed the same under .kde/Autorun under each users directory.... what am i missing here? also, is there anyother way to run it in shutdown else than rc0.d ? as i might use Autorun in .kde if i can find somehow to run before shutdown regards, Achraf El Kashef |
I think your skirpt needs a start (and a stop) method. something like:
Code:
case $1 in |
thanks,,
that worked fine... but my script turned out to be a complete failuer.... as its being executed before anyone log in, and my script depend on the command "whoami" a lot... so i think it will be better if i use with the Autorun folder in ~/.kde/ but i need to run it again at logout or before shutdown.... where can i add such action? thanks |
If your script follows System V arquitecture it can be called/stopped in rc* dirs. Check other scripts that may already be there and follow their structure.
However, it seems to me that the correct place to invoque your script might me from /etc/.bashrc or similar (system wide init scripts, wich are executed at login) |
thanks for help...
i found out that if i create a directory called shutdown under ~/.kde/ it will execute anything in this dir. so am now using ~/.kde/Autostart/ to execute at login and ~/.kde/shutdown/ to execute when logout and it's working fine now thanks alot |
Yes, assuming that you want to run/cleanup your script actions _only_ when your users use KDE.
I would go for ~/.bashrc , because it is independent of whether you use KDE, GNOME or other desktop manager. (but I cannot help you on the shutdown issue, regarding your whoami dependance) regards |
All times are GMT -5. The time now is 10:00 PM. |