LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 03-20-2008, 02:13 PM   #1
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Rep: Reputation: 0
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
 
Old 03-20-2008, 04:07 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
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
 
Old 03-21-2008, 10:06 AM   #3
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
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
 
Old 03-22-2008, 07:59 AM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
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
 
Old 03-22-2008, 09:18 AM   #5
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
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?

Thanks
Tony
 
Old 03-22-2008, 10:47 AM   #6
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
Is it not twm & in the xstartup file?
You have tw &

Brian

Last edited by Brian1; 03-22-2008 at 10:58 AM.
 
Old 03-22-2008, 01:21 PM   #7
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
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
 
Old 03-22-2008, 01:43 PM   #8
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
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
 
Old 03-23-2008, 08:13 AM   #9
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
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?
 
Old 03-23-2008, 09:33 AM   #10
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
Which runlevel is the RHEL machine in at time of starting the server?

Brian
 
Old 03-24-2008, 05:33 AM   #11
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
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
 
Old 03-25-2008, 04:56 PM   #12
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
But does it stop in runlevel 3 or 5 once booted?

Brian
 
Old 03-27-2008, 06:38 AM   #13
TonyOCL
LQ Newbie
 
Registered: Feb 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
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 0ff 1ff 2n 3n 4n 5n 6ff

Does that help?
 
Old 03-27-2008, 03:37 PM   #14
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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,700

Rep: Reputation: 61
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
 
Old 04-15-2008, 08:36 PM   #15
pratul
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
Smile 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rhel4 vnc problem, where to configure GUI vnc server? hocheetiong Linux - Newbie 1 10-24-2007 06:05 AM
windows vnc client and linux vnc server problem tungaw2001 Linux - Software 8 06-17-2006 12:06 AM
Display resolution configured incorrectly and the computer now displays nothing hishii Linux - Hardware 3 06-16-2006 08:31 AM
VNC and Displays drumltd Linux - Software 6 02-18-2005 07:59 PM
xstartup configured, Vnc still only loads grey screen on boot. DeTHZiT Linux - Software 8 09-05-2004 11:45 AM


All times are GMT -5. The time now is 10:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration