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.
You have a few possibilities. It would help very much to know what distro you are using. If it is something from Fedora/Redhat, you can use the sysconfig command as root, and set VNC to be started at boot. If you are on something else, it is just a question of a startup script. I think VNC has plenty of startup scripts that come with it, so you have to find one that works with your distro. I would also suggest using SSH, as it is usually running by default. If you need graphics then use VNC, but if you just need the box to run and have access, SSH is your friend.
Originally posted by JimBass You have a few possibilities. It would help very much to know what distro you are using. If it is something from Fedora/Redhat, you can use the sysconfig command as root, and set VNC to be started at boot. If you are on something else, it is just a question of a startup script. I think VNC has plenty of startup scripts that come with it, so you have to find one that works with your distro. I would also suggest using SSH, as it is usually running by default. If you need graphics then use VNC, but if you just need the box to run and have access, SSH is your friend.
As root at a shell prompt when I run sysconfig it says "bash: sysconfig: command not found"
Any ideas??? I would really like the graphics.
Sorry, it should be chkconfig instead of sysconfig. It has been a while since I was heavily into FC releases. In any case, regular su to root isn't enough, you need to do a
and give the root password, then chkconfig will work. Just do
and you'll see all the known services, and the runlevels they start in. If vncserver isn't in there, you add it and set its runlevels, then it will work from boot. To see how to add it, and what everything means, you should do man chkconfig.
Thanks for the quick reply. I used chkconfig as suggested and changed the runlevels for vncserver. After reboot I still had to telnet into the box and issue command vncserver which started it and I was able to vnc into it. Is there somewhere else I need to edit something so that all i have to do is start vnc and get right in without telnet session first???
Again thanks for helping me.
If vncserver is in your chkconfig list, and it isn't starting, there are 2 places to look. First check that it is actually set to on. Also, if your box boots into Xwindows, you probably use runlevel 5 when you boot up. I am not on a Red Hat box that I can check, but I think the command to get it to start would be like
chkconfig --add vncserver 345 on
Again, I'm not sure of the syntax of that command, but it should be very close to that. You can also search here and at real vnc, tight vnc, and google, as this is a common problem that has been posted many times.
I found where I needed to edit. /etc/sysconfg/vncservers
there is a line that tells it to start which user and what display to come up on. You were on the right track pointing me to sysconfig, just a different way to get there.
Again thanks for you help and patience. I am a true newbie eventhough I have been playing with fedora for about a year. Still so much to learn, so little time to play.
BTW I just rebooted to test and it works. THANKS!!!!!
For future reference, just doing the chkconfig <service name> <runlevels> on should work, I never had to manually edit the /etc/chkconfig/,,,,,, files, but in the case of VNC, that makes some sense. Linux (being super permissions conscious) wouldn't know how to start VNC if nobody is logged in. I'm glad you learning how to fix it on your own, that makes it seem very likely that you'll be able to accomplish everything you need on linux. Before too long you won't even need VNC, because you'll be able to do everything from the command line!
You're welcome for my efforts, it is the least I could do for all the people that helped me when I ask a question!
I have been using redhat 7.1 at work for a little over two years, using mostly the command line. Mostly writing bash scripts to acomplish certain tasks. Most of what I know I got from google. Your suggestions pointed me in the right direction to know what to search for. Having a linux box at home to play with has helped me at work a great deal. If I blow it up and have to reinstall so what. I can't do that on the production server at work.
The GUI is great, but it also allows you to do things that you don't understand. Having only the command line, you will usually have a better idea of what is going on. Plus with good CLI skills, you can go from any *nix box to another, and still accomplish things. If you depend on the GUI, and you know KDE well and are dumped on a Gnome box, you have small issues to begin with. Obviously the CLI isn't perfectly transferrable between distros - I didn't remember chkconfig, and I couldn't check it from my debian box that I was on when I first replied. But still, CLI transferrs nicely, and you can use CLI skills all over. I am one of the sysadmins for about 12 *nix servers at work, and not a single one of them have X windows installed. Seeing how much resources X can eat up, I would think the majority of production servers in the world don't use it, just for that reason.
By the way, if you have any control over that box at work, you may want to upgrade it, particularly if it is on the public net. Dump "kernel exploit redhat 7.1" into google, and you'll find plenty of hacks in various states of existance. If it is just a local server than you don't have to sweat it, but if it is on the net, look out!