LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-16-2007, 05:57 PM   #1
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Rep: Reputation: 15
How do I make vnc work in CentOS 5?


anybody knows? I am a real dummy in Linux. There's no GUI that i can find to configure and start.
 
Old 08-16-2007, 07:03 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Follow: http://fedoranews.org/tchung/vnc/
 
Old 08-16-2007, 07:34 PM   #3
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
I find out I have to type in 192.168.x.x:1 on my Windows VNC client.

however, after it connects, there's nothing on the screen. No GUI.

Keep in mind, I do not have firewall on either the Linux host or the Windows client.

Quote:
Originally Posted by Lenard View Post

Last edited by TheStupid; 08-16-2007 at 07:36 PM.
 
Old 08-17-2007, 09:02 AM   #4
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
Help, anybody?
 
Old 08-17-2007, 09:35 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Follow the link I provided, yes it is somewhat old and yes it is for Fedora but it does apply. It is a step by step guide also.
 
Old 08-17-2007, 10:40 AM   #6
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
I did that, but doesn't work. It connects and only shows me a terminal window, not desktop.

On the server, it says:

Starting VNC server: no displays configured [OK]

whatever that means.

Quote:
Originally Posted by Lenard View Post
Follow the link I provided, yes it is somewhat old and yes it is for Fedora but it does apply. It is a step by step guide also.

Last edited by TheStupid; 08-17-2007 at 12:39 PM.
 
Old 08-17-2007, 02:19 PM   #7
kool_kid
Member
 
Registered: Sep 2004
Location: Dubai, UAE
Distribution: RHL
Posts: 350

Rep: Reputation: 30
from ur linux box open vnc type rdp:/<ip of windows>

check these things

is ur client computer connected to ur computer try pingin to that computer, also check the settings are u keeping too high or too low graphic settings
 
Old 08-17-2007, 03:10 PM   #8
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
You lost me right there.

I am trying to connect to Linux host using a Windows VNC client.

it connects fine, but no GUI. Only a terminal would show up in VNC.

Quote:
Originally Posted by kool_kid View Post
from ur linux box open vnc type rdp:/<ip of windows>

check these things

is ur client computer connected to ur computer try pingin to that computer, also check the settings are u keeping too high or too low graphic settings
 
Old 08-17-2007, 06:01 PM   #9
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Follow the instructions below:

On VNC Server machine with vnc-server installed... <--(Your GNU/Linux box)

1)Type vncserver -geometry 800x600 (or whatever resolution you prefer)

2) There will be a session number displayed. This will create a .vnc directory in your home directory. (/home/yourself/.vnc)

3) Type cd /home/yourself/.vnc

4)Type ls -alc (You should see a script called xstartup)

5)Type vi xstartup or use whatever text editor you prefer

--- This is where we will setup your vnc session to use your window manager of choice ---

Find the section where it says twm & and replace it with your choice, (don't include what I have in the parenthesis)

startkde & (used for the KDE window manager)
exec gnome-session & (used for the Gnome window manager)
startxfce4 & (used for the XFCE4 window manager, my favorite choice)

(I know there are more, but these seem to be the most popular ones)

6)Now type vncserver -kill:1 (1 is our session number). This stops the VNC Server so that the xstartup script we just edited can be re-read when we restart the server.

7)Type vncserver (to start the session back up)

8)Type ps ax | grep vnc (check if your session is up and running)

--- Let's connect to the VNC Server! ---

From a Windows Box with TightVnc or RealVnc client installed
1)Start your VNC client and type the VNC Server hostname or IP address:1 (1 meaning whatever session number you chose)

or

From a Java Enabled Browser on any platform (not the best but it works)
1)Type http://IP address of VNC Server:580x (x will indicate session number)
ex..http://192.168.1.6:5801 ( for session 1)
ex..http://192.168.1.6:5802 ( for session 2)

A simple search of this forum would have yielded these instructions!!
 
Old 08-17-2007, 07:47 PM   #10
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
Unfortunately, it doesn't work

vncserver -kill:session number does not work. I used "service vncserver stop/start/restart"


Here's my xstartup line by line:

**********
#!/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" &
startkde &
 
Old 08-17-2007, 09:01 PM   #11
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
This is how your xstartup should look:

#!/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" &
startkde &


My advice is to start again from scratch and use the instructions I've given you. They work. Kill all Xvnc sessions that you have running and I suggest you also remove your .vnc folder a new one will be created.
 
Old 08-18-2007, 12:30 AM   #12
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
Perfect!!!

Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!


It's the xstartup file giving me the problem. Once you corrected it, it works!!!

Thank you so much.
 
Old 08-18-2007, 12:30 AM   #13
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
now I have to get the pcanywhere working. :-(
 
Old 08-18-2007, 06:51 AM   #14
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by TheStupid View Post
now I have to get the pcanywhere working. :-(
Start a new thread and maybe you can get this one resolved
 
Old 08-19-2007, 01:02 PM   #15
TheStupid
Member
 
Registered: Aug 2007
Posts: 80

Original Poster
Rep: Reputation: 15
How do I make this start automatically whenever server starts?
 
  


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
VNC Server on CentOS - Viewer on XP pdelassus Linux - Software 12 05-28-2011 05:45 AM
make centos 4.3 work with my computers internal speaker MrSako Linux - Newbie 7 10-24-2006 05:30 PM
VNC on :0 Hangs Centos on connect mr_r Linux - Software 0 06-19-2006 08:15 AM
how to make linux(centOS) use more than 1 partitions lnthai2002 Linux - General 4 02-08-2006 06:52 PM
How to make KDE my default on CentOS kencl Linux - Newbie 4 11-13-2005 11:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:38 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration