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.
I have set VNC up on Redhat EL5 once and it worked. Now I am doing it again and the only difference this is 64bit. I have setup
1) $home/.vnc/xstartup with correct info
2) vncpasswd for user
3) /etc/sysconfig/vncservers with entry for user
but when I come to do
service vncserver start
it starts but says no displays to configur.
I don't think it is a networking problem as I can sign onto the user and do a straight
vncserver
and it works fine and I can access it.
Its just that it isn't starting automatically
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
You might post the contents of those files. Might see a syntax error or something. Also which kernel version, vnc version, and gui interface you are using and which one you want the vnc session to use.
You might post the contents of those files. Might see a syntax error or something. Also which kernel version, vnc version, and gui interface you are using and which one you want the vnc session to use.
Brian
Here is the $HOME/.vnc/xstartup
========== Start of xstartup ===========
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
here is the bottom of the vncservers file from /etc/sysconfig
=========== bottom part of vncservers (top is all comments ==
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERRVERS="1:toreilly"
VNCSERVERARGS[1]="-geometry 800x600"
=========== end of vncservers ===============================
NOTE: when is signon as toreilly and do a "vncserver" it starts correctly and I can use vnc.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
So it works correctly for the user assigned to the vncserver session. Then that is correct.
If you are wanting other users to connect to the same vncserver session then I would say that is not smart. the vncserver session is attached to the user. So if another logged in then they full control of that users data and anything they can do. I recommend a seperate session per user. Example of the line for addition sessions.
VNCSERVERS="1:jdimpson 2hred 3:sysadmin"
So it works correctly for the user assigned to the vncserver session. Then that is correct.
If you are wanting other users to connect to the same vncserver session then I would say that is not smart. the vncserver session is attached to the user. So if another logged in then they full control of that users data and anything they can do. I recommend a seperate session per user. Example of the line for addition sessions.
VNCSERVERS="1:jdimpson 2hred 3:sysadmin"
Brian
No what I am saying is if I start the system normally the user "toreilly" should be able to get in with VNC. But this does not work. But if I sign on as toreilly using putty or telnet and then issue the command "vncserver" then after that that user can get in.
If on a clean reboot I issue the command "service vncserver start" it responds that there are no displays to start.
Which would usually mean that there was nothing in /etc/sysconfig/vncservers
but as you can see I have configured this.
So VNC capibility is not automatically starting..
any suggestions?
Is it not twm & in the xstartup file?
You have tw &
Brian
Just corrected this but it has made no difference. it is as if it isn't seeing the /etc/sysconfig/vncservers config file.
Maybe I should report this to redhat.
Is there a system log somewhere I can see if there is an error?
Thanks
Brian not sure I understand your question, but here is the results of the chkconfig command
[root@yanntest ~]# chkconfig --list vncserver
vncserver 0ff 1ff 2n 3n 4n 5n 6ff
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
What I was wondering is if the server starts up in runlevel 3 which is networking, multiuser, and no X server. In runlevel 5 you have networking, multiuser, and X server. look in your /etc/inittab file to understand the meaning of each runlevel. the above output says the vnc server will run in runlevels 2,3,4,5.
How to enable VNC on RHEL 5 using its own X server
This is to setup VNC to provide access to the local default X console as if you are sitting on the physical console. (These instructions are not for providing level 5 display for individual users):
CONFIGURING VNC FOR RHEL 5 SERVERS
Pratul – 04/14/2008
To set up VNC to control the native X server, follow these steps:
****STEP1. On the system you want to control with VNC, run the program vncpasswd as root to set a VNC password. You will use this password when connecting with vncviewer or another VNC remote control program.
****STEP2. Edit the file /etc/X11/xorg.conf on RHEL 5
[A] Create the section called Module in the end of the file and add following lines:
Section "Module"
Load "glx"
Load "dbe"
Load "extmod"
Load "freetype"
Load "type1"
Load "dri"
Load "vnc"
EndSection
Make sure this is on a new line before EndSection.
[B] In section called Screen, add this line:
Option "passwordFile" "/root/.vnc/passwd"
Make sure this is on a new line before EndSection.
****STEP3 – Allow the ports in Firewall
1. SSH to the server and Run the following tool:
2. # system-config-securitylevel
3. In the "Other ports", please add a range as in below example. Note that those will be TCP ports as below:
5900-5904:tcp
4. Save and close the tool then restart firewall:
# service iptables restart
****STEP4: Make sure using chkconfig that vncserver is enabled for level 2,3,4,5. Then RESTART the machine.
Note: If you suspect the firewall blocking, then disable the firewall altogether and test VNC if it works. I use tightVNC to test.
VNC will typically use port 59xx, where "xx" is the console number. Use the command netstat -na | less to see the ports that are open on the system. Look in the 5xxx range for VNC.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.