Joe Morris (NTM) wrote:
James Knott wrote:
Joe Morris (NTM) wrote:
Pieter Botha wrote:
I need to run a program which resets my LPT port on startup (LPT is connected to garden system and if any of the relays are open, then some stuff in the garden are turned on). I see that as soon as X is started, some relays are opened and I need to run a program to set them back off (closed). The software already works, the trick is to start it as soon as X start as well as when the PC reboots. Any hints?
/etc/init.d/skeleton as a base, and make a startup script which you can choose when you want it to start, i.e. runlevel 5 (X), etc. Also check the admin manual.
Why use skelton? That means that all users created after that, would run that app. It can be started from /etc/init.d/boot.local or ~/.kde/Autostart.
It looks to me like he has created a program to control his garden. I would assume that would run /be needed regardless of which user is logged in. /etc/init.d/boot.local executes before most other scripts, meaning if he needed some other program/process running for his to work, it may not work starting so early in the boot process. If he sometimes started in runlevel 3 he could also have his program run. If he only needed it to run whenever he logged in, in only his user, ~/.kde/Autostart would be fine. I just suspect his garden needed more control than that. ;-) If my logic didn't fit his need, he is quite welcome to hit the delete key and try the next. He was asking for hints.
<lol> great :-D