Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i wanted to start some services after a user logged in using the rc.local file (Fedora Core 4), some of the entries i put into the rc.local do work others not.
starting the apache for example works:
entry in rc.local:
works fine, wether i put the line in the rc.local or paste it in the shell
/usr/bin/x11vnc -shared -forever
doesnt work when i put it in the rc.local and restart the computer, i.e. the server doesnt start....
the thing i dont understand is if i paste the line into the shell, the server starts without errors.....
su mysql -c "/etc/rc.d/init.d/mysql start"
doesnt start the server after i rebooted, but if i paste the line into the shell after loggin in, the server starts without errors.....
how can that be?
how can an entry in the rc.local not work in the rc.local itself, but if i paste it into the shell it works? and why then works the apache-entry in the rc.local?
i am absolutely clueless, thx for any help..........
Someone clever than me will be able to help you better, but basically the problem is that x11vnc needs X to be running, and when you call it from rc.local, X is not yet running. You may find a message to this effect in /var/log/messages.
When you call x11vnc from an Xterm, then X is running and it will work.
Of course apache does not need X, so you have no trouble starting that from rc.local.
So, you need to put your call to start x11vnc somewhere else - but I do not know where (as I think you want x11vnc running before you have even logged in) so you could man startx and man xinit or hope someone else reads this!
You should know that you do not need the su bit if yuo are putting the command in rc.local as this already runs as root. Did you look in /var/log/messages for errors when you tried starting mysql-server from rc.local? Does mysql-server need environment variables setting up (PATH etc?)
Did you look in /var/log/messages for errors when you tried starting mysql-server from rc.local?
yes, nothing significant in there........
the funny thing is, if i have that mysql-line in the rc.local the computer wont even boot the OS in runlevel 5, it hangs after echoing "checking swapspace".......
i had to boot into single user mode and to comment the mysql-entry in the rc.local out to get the computer booting in runlevel 5 again.......
Does mysql-server need environment variables setting up (PATH etc?)
I don't think that mysql-server must be run under mysql user. It starts as root and once up uses the mysql user (same as apache and other daemons do). So remove the "su mysql -c" part and try again.
but if i try to start the server as root i get an error message that this isnt possible........
sudo -u mysql /usr/sbin/mysqld --skip-grant
did the job, but only at the bash, if i paste it into the rc.local and reboot the computer hangs again and wont boot into runlevel 5......:-(
add an & at the end?? just a guess, but this will run the program in the background, allowing the system to continue booting, otherwise your boot sequence is going to be waiting for SQL server to end before it can continue.