LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-12-2010, 03:16 PM   #1
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Rep: Reputation: 0
VNC Server Start Failure on CentOS


I'm trying to get a VNC server started on a computer but when I try to start it, it fails.

Code:
[root@localhost .vnc]# service vncserver start
Starting VNC server: 1:andrew                              [FAILED]
So I know I have it installed because of:

Code:
[root@localhost /]# rpm -q vnc-server
vnc-server-4.1.2-9.el5
vnc-server-4.1.2-14.el5_3.1
[root@localhost /]#
I have added a new user and password to the computer and VNC as shown below

Code:
[root@localhost ~]# useradd andrew
[root@localhost ~]# passwd andrew
Changing password for user andrew.
New UNIX password: 
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.
[root@localhost ~]# vncpasswd
Password:
Verify:
I have edited /etc/sysconfig/vncservers to include
Code:
VNCSERVERS="1:andrew"
VNCSERVERARGS[1]="-geometry 800x600"
According to the How-To I'm following at http://wiki.centos.org I should be able to start and stop it at this point.

Does anybody have any ideas as to what is going wrong? If you need more info please say so and I will do my best to get you what you need.

Thanks,
Andrew
 
Old 01-12-2010, 08:07 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
I think there's a bugzilla open for RHEL, the problem was related to selinux... is selinux set to 'enforcing' mode ? ( command: getenforce )

cheers
 
0 members found this post helpful.
Old 01-12-2010, 09:51 PM   #3
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
I have selinux set to permissive mode and I didn't think that would cause problems but I guess it might be.

Thanks for the help so far
Andrew
 
Old 01-13-2010, 04:56 AM   #4
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
Ok Let start from scratch:

1. Login with user which will will be using the vncserver go to /etc/sysconfig/ and file vncservers open to edit and add following lines :
VNCSERVERS="1:username "
VNCSERVERARGS[1]="-geometry 1024x768"
2.From command line vncpasswd you will be prompted to set password for user.
3.Type vncserver to start server.
4. Go to directory vi ~/.vns/startup to edit it and delete # from lines:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
and last line replace with this startkde & or startx & for Gnome Desktop.
5. Restart server by service vncserver restart
6. Open vnc viewer and type IP xxx.xxx.xxx.xx:1 <----- the one this is monitor and for which user.
 
Old 01-13-2010, 12:00 PM   #5
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by volga629 View Post
Ok Let start from scratch:

4. Go to directory vi ~/.vns/startup to edit it and delete # from lines:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
and last line replace with this startkde & or startx & for Gnome Desktop.
5. Restart server by service vncserver restart
6. Open vnc viewer and type IP xxx.xxx.xxx.xx:1 <----- the one this is monitor and for which user.
I understood everything and got positive results up till step 4. I'm not sure what I'm supposed to replace on that one. here is what my xstartup file contains.

Code:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
thanks very much
Andrew
 
Old 01-13-2010, 12:26 PM   #6
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
Excellent,
Everything looks fine except twm & replace with you Desktop session KDE or Gnome to
------> startkde & for KDE
------> startx & for Gnome
restart vncserver and try to connect.
 
Old 01-13-2010, 07:12 PM   #7
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
I forgot missioner about firewall need open port tcp 5901
 
Old 01-13-2010, 07:12 PM   #8
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
hmmm seems that we have undone something and i'm not sure how.

my xstartup file now contains

Code:
#!/bin/sh

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startx &
but now I get

Code:
[root@localhost .vnc]# service vncserver start
vncserver: unrecognized service
Any ideas?

Thanks for the help
Andrew
 
Old 01-13-2010, 07:13 PM   #9
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
try /etc/init.d/vncserver start
 
Old 01-13-2010, 10:27 PM   #10
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
it says no such file or directory
 
Old 01-14-2010, 12:00 AM   #11
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
yum install vnc vncserver
 
Old 01-14-2010, 12:00 PM   #12
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
this is what I get when trying that yum command

Code:
yum install vnc vncserver
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: pubmirrors.reflected.net
 * base: mirror.steadfast.net
 * centosplus: mirrors.cat.pdx.edu
 * contrib: mirror.web-ster.com
 * extras: dist1.800hosting.com
 * updates: linux.mirrors.es.net
Setting up Install Process
Package matching vnc-4.1.2-14.el5_3.1.i386 already installed. Checking for update.
No package vncserver available.
Nothing to do
[root@localhost ~]#
Once again thank you so much for helping me out
Andrew
 
Old 01-14-2010, 09:30 PM   #13
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
No problem try to check "yum install vnc-server".
And check directory /etc/init.d/ if you have init script to start vnc server.
 
Old 01-15-2010, 07:10 PM   #14
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
when running that command I get:

Code:
[root@localhost ~]# yum install vnc-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: pubmirrors.reflected.net
 * base: mirror.anl.gov
 * centosplus: mirrors.cat.pdx.edu
 * contrib: mirror.web-ster.com
 * extras: dist1.800hosting.com
 * updates: mirrors.tummy.com
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package vnc-server.i386 0:4.1.2-14.el5_3.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch         Version                     Repository    Size
================================================================================
Installing:
 vnc-server         i386         4.1.2-14.el5_3.1            base         2.0 M

Transaction Summary
================================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total size: 2.0 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /usr/bin/Xvnc from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/bin/vncconfig from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/bin/vncpasswd from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/bin/vncserver from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/bin/x0vncserver from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/share/man/man1/Xvnc.1.gz from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/share/man/man1/vncconfig.1.gz from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/share/man/man1/vncpasswd.1.gz from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/share/man/man1/vncserver.1.gz from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/share/man/man1/x0vncserver.1.gz from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386
  file /usr/share/vnc/classes/vncviewer.jar from install of vnc-server-4.1.2-14.el5_3.1.i386 conflicts with file from package vnc-4.1.3-1.i386

Error Summary
-------------

[root@localhost ~]# service vncserver start
vncserver: unrecognized service
[root@localhost ~]#
there is also nothing im my /etc/init.d/ that seems to corespond with VNC. I assumed that the above errors were what is causing part of my issue so i uninstalled the other vncserver stuff through the add/remove software menu. I then ran "yum install vnc-server" again and it installed and it worked.

Thank you so much for all the help I really appreciate it.
Andrew
 
Old 01-15-2010, 07:50 PM   #15
volga629
Member
 
Registered: Dec 2009
Posts: 67

Rep: Reputation: 21
You welcome!
Right on.
 
  


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
I'm stuck installing VNC on my centos 5 dedi server Bennehh Linux - Server 4 06-12-2011 05:40 AM
VNC Server on CentOS - Viewer on XP pdelassus Linux - Software 12 05-28-2011 05:45 AM
setting up vnc server on centos 5 sandeepthug Linux - Newbie 2 01-14-2009 04:49 AM
Trying to install a GUI & VNC on a CentOS 5.1 server cdn415 Linux - Software 2 08-17-2008 10:16 PM
how to install real vnc in centos 5 server? melvinong Linux - Server 1 11-15-2007 08:33 PM


All times are GMT -5. The time now is 11:05 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration