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.
It depends on what run level your systems is booting too, I'm guessing maybe 3.
who -r will tell which run level the system is running at.
If its only booting to run level 3, you can enable VNC to start on this level too.
chkconfig --level 35 vncserver on.
During system startup the runlevels dictate start up order.
So runlevel 1 is single user mode.
2 - adds a few more services such as network support.
3 - Multi usermode but without any GUI (Gnome or kde for example)
4 - Can't remember
5 - Mutli usermode with GUI (if installed)
6 - Reboot
0 - Power off.
chkconfig --list will show you all the services and runlevels.
I would possibly try running the following command
chkconfig --level 345 vncserver on
I suspect as users have not logged in, it isn't fully loading up everything related to run level 5 but as it should touch run level 3 first I suspect this would fix the issue.
As per /etc/inittab from Centos here are the run levels as I believe they are defined for all/most fedora based distros
0 - halt (Do NOT set initdefault to this)
1 - Single user mode
2 - Multiuser, without NFS (The same as 3, if you do not have networking)
3 - Full multiuser mode
4 - unused
5 - X11
6 - reboot (Do NOT set initdefault to this)
Last edited by r3sistance; 09-07-2009 at 05:37 PM.
ufmale, try r3sistance's suggestion that will set the vnc server to start on boot. In the mean time to start it without rebooting /etc/init.d/vncserver start will get you going.
It is RHEL. I tried turning the service on 345, but it still didn't work.
After reading on the Net. it is actually a known problem.
I got the same problem with my Ubuntu. I ssh to the machine to activate the service, but it didn't work. it complained about the graphic is not available.
Take a look in /etc/sysconfig/vncservers. You can use this to start VNC servers for certain users on startup.
Alternatively login as the user and then start the vncserver by hand.
For the best security consider using SSH Tunnels.
Im having the same issue here but im on Ubuntu 8.04. What is the equivalent to "chkconfig" that I can use to set my runlevel for vnc?
Right now when I bootup I can ssh in and run w who-r and I see "run-level 2" but i cant connect using VNC. I started X manually thinking that might help but it didnt and was a noobie stab in the dark.
Im actually not a total noob but have been away from linux for a while and am a little rusty.
TIA
Did you read my post at #8 and follow the link I gave there?
Welcome to LQ!
I did and that worked. thanks!
I do have a question though....
in the line you provided you have 1024x768 as the resolution...what if the native resolution that is set already is smaller?
In other words, If im sitting at home and log into this machine and I go to adjust my screen resolution it says 800x600. I happened to notice this after i was logged in from work already and had to install a driver in order to adjust the resolution, then i needed to reboot. Once i did that was when i had my vnc issues.
My question is...if your local settings are 800x600 and you specify 1024x768 when starting up vnc does the local setting stay the way it is (800x600) or should it change to the one specified in the line you provided?
sorry for the long explanation just to ask that question
You can set the vncserver resolution to whatever you like (within limits!). It is just the resolution that is generated by the vncserver, the physical screens on that PC can have different resolutions.
If the physical resolution is 800x600, you can use that for the vncserver as well. If the vncserver's resolution is larger than can be displayed on your remote PC, you'll get scroll-bars to scroll around it (this makes using it a PITA though). Just experiment with different settings until you find one you are comfortable with.
Quote:
thanks again though
Thank you for the thanks, but it's faster just to click the "Thumb-up" icon at the bottom of my post.
Have fun.
in the line you provided you have 1024x768 as the resolution...what if the native resolution that is set already is smaller?
In other words, If im sitting at home and log into this machine and I go to adjust my screen resolution it says 800x600. I happened to notice this after i was logged in from work already and had to install a driver in order to adjust the resolution, then i needed to reboot. Once i did that was when i had my vnc issues.
My question is...if your local settings are 800x600 and you specify 1024x768 when starting up vnc does the local setting stay the way it is (800x600) or should it change to the one specified in the line you provided?
sorry for the long explanation just to ask that question
thanks again though
snicklefritz: I tried, but it didn't work. did you do it on RHEL?
As noted, vnc has to be started by a user. As far as the resolution, look in the directory .vnc under the home directory of the user that started vnc. There should be an xstartup file (I believe that's the name). It contains the startup parameters including the resolution. As noted, your machines resolution and the vncserver resolution can be the same or different, it doesn't matter. Also note that you should stop the vnc server the individual user started before you reboot. If you don't, it's likely it won't start up again complaining about lock files. Just remove the lock files and start it again. I'm not familar with vnc on Linux, but I've seen a number of Unix distro where ssh can conflict with the default display of :10. Usually you just pick a different a different port or move ssh. Also, with vnc if you log off the vnc xterm, the screen will often disappear. In that case, stop and start the user vnc session. Note, vnc can be a big security hole. Always run it with a password.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.