LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VNC server no displays configured (https://www.linuxquestions.org/questions/linux-newbie-8/vnc-server-no-displays-configured-629501/)

TonyOCL 03-20-2008 02:13 PM

VNC server no displays configured
 
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

Any clues?
Thanks in advance

Brian1 03-20-2008 04:07 PM

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

TonyOCL 03-21-2008 10:06 AM

Quote:

Originally Posted by Brian1 (Post 3095302)
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

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
tw &
========== End of xstartup =============

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.

Hope that helps
Thanks
Tony

Brian1 03-22-2008 07:59 AM

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 2:phred 3:sysadmin"

Brian

TonyOCL 03-22-2008 09:18 AM

Quote:

Originally Posted by Brian1 (Post 3096822)
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 2:phred 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?

Thanks
Tony

Brian1 03-22-2008 10:47 AM

Is it not twm & in the xstartup file?
You have tw &

Brian

TonyOCL 03-22-2008 01:21 PM

Quote:

Originally Posted by Brian1 (Post 3096952)
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

Brian1 03-22-2008 01:43 PM

if you login the way to get it up does the vncserver use the twm window maker or is some other gui interface coming up?

Brian

TonyOCL 03-23-2008 08:13 AM

Quote:

Originally Posted by Brian1 (Post 3097122)
if you login the way to get it up does the vncserver use the twm window maker or is some other gui interface coming up?

Brian

When I initiate it from the users I get the full redhat gnome x desktop.
I dont know what tvm is?

Brian1 03-23-2008 09:33 AM

Which runlevel is the RHEL machine in at time of starting the server?

Brian

TonyOCL 03-24-2008 05:33 AM

Quote:

Originally Posted by Brian1 (Post 3097779)
Which runlevel is the RHEL machine in at time of starting the server?

Brian

RHEL starts the server on bootup (ie I can see it starting it as the messages go up the screen). This is before any user gets on

Brian1 03-25-2008 04:56 PM

But does it stop in runlevel 3 or 5 once booted?

Brian

TonyOCL 03-27-2008 06:38 AM

Quote:

Originally Posted by Brian1 (Post 3100291)
But does it stop in runlevel 3 or 5 once booted?

Brian

Brian not sure I understand your question, but here is the results of the chkconfig command
[root@yanntest ~]# chkconfig --list vncserver
vncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Does that help?

Brian1 03-27-2008 03:37 PM

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.

Brian

pratul 04-15-2008 08:36 PM

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.

kewlemer 09-12-2008 08:44 PM

The problem is that vncserver needs the .vnc config files under the username you are trying to create the vncserver. I fixed it by doing "vncserver" as the user (which creates the config files in the user's home directory).


All times are GMT -5. The time now is 07:08 PM.