Jump to content

How Do I make things start on Startup..


caddyman379
 Share

Recommended Posts

It really depends on when you need them to startup. Are they programs that depend on the X environment? If so, then you can just make a little script and place it in the ~/.kde/Autostart directory. (In case you are a real newbie, this ~ means your user's home directory, like for me, it is /home/steve/.kde/Autostart) Here's an example of a script to start gaim when KDE starts:

#!/bin/sh

/usr/bin/gaim &

 

That would work for programs that didn't need X, too, unless you *needed* them to start before X does, in which case, that gets a little more complicated. If you want further explanation on that process, just say the word.

Link to comment
Share on other sites

If you want to start/stop a server/daemon process that is already installed, you can use Mandrake Control Center. On the System panel there is DrakeXServies which will allow you to start and stop installed services and daemons. These will start when the computer is booted up, even if no one logs on.

 

If you want to create your own new daemon or service, then services are started and stopped by scripts in the /etc/init.d directory. You wil have to add your new script in this directory. This script needs to be called with the start or stop and most support restart, reload and status too. You need to use the 'daemon' function defined in the functions script in this directory to actually start the process. Look at the other scripts in this directory. Test it till the following work correctly as root. (<name> is the name of your script.)

 

/etc/init.d/<name> start

/etc/init.d/<name> stop

 

Note that the actual daemon process will have to fork itself so the start script terminates. Most applications intended to be run as a daemon do this automatically by calling the daemon() function, but I suppose you could do it from the script.

 

To get your daemon automatically started at boot up, do the following as root:

 

chkconfig --add <name>

chkconfig --level 345 <name> on

chkconfig --list <name>

 

This will auto-start your service/daemon at run levels 3, 4 and 5. I have not actually tried this on Mandrake 9.2, but it works on Redhat, and the man pages say it will work on Mandrake.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...