Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a way I can set some commands/programs to start at startup? For example: When the computer starts up, automatically begin running my http server.
Another question actually, every time I start up my computer in linux I have to type in chmod 666 /dev/hdd (That's my DVD drive... go figure) before I can play music CDs on it. How can I set it so that it doesn't keep going back to default every time I start up. I have a similar problem with alsamixer. Every time I reboot the settings all go back to 0 and I have to reset everything.
I'm using Fedora Core 3, and using GRUB if that affects anything.
your http server = apache? well yes of course. you should already have it.. /etc/init.d/httpd if so just use "chkconfig --level 35 httpd on" to make it run for both X and non-X boots.
for the cdrom... you'd need to look at your udev permissions... /etc/udev/permissions.d/
Yeah, sorry it's apache. I was just using that as an example. There are a few other programs that I'd just like to start up each time. Is there a way to do it with them?
Yes, learn how SysV style init scripts work. Basically you put an init script that can handle start/stop/restart as an argument in /etc/rc.d/init.d. Then you create the approprate SNN<name> or KNN<name> (NN being the priority number) in the correct runlevel(s) (/etc/rc0.d through /etc/rc6.d for runlevels 0-6) to start and stop the script automatically. This is a bit hard to visualize/wrap your head around if you're not used to it, so check out those directories and see how the current scripts are set up. If you installed Apache via RPM the init script should've been created for you and you can just use chkconfig to activate it. Chkconfig is just a front-end for this which creates/removes the symlinks as requested.
[edited to add]: you can also just add startup commands to the /etc/rc.local file if you don't feel like mucking with the full init script setup.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.