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!
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.
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.
Peace,
JimBass
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
Code:
su -
and give the root password, then chkconfig will work. Just do
Code:
chkconfig --list
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
Code:
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!
I don't have that much control. LOL It is for our inventory/sales software only. It is behind a good hardware firewall, with nothing on it avaliable to the public. Thanks for the tip though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.