Mandriva Linux: Install and Use VNC Server (vncserver)

To install vnserver:

[root@MYSERVER /]# urpmi --media main vnc
[root@MYSERVER /]# urpmi --media main vnc-server
Please insert the medium named "Main media"
rpm -ivh vnc-4_1_3-x86_linux.rpm
error: Failed dependencies:
        libstdc++-libc6.2-2.so.3 is needed by vnc-4.1.3-1.i386

SOLUTION:

with MANDRIVA 2010.1 in the drive do the following:
---------------------------------------------------

# VNC VIEWER:
-------------

[root@MYSERVER bin]# urpmi -a vnc

===================================================

# VNC SERVER:
-------------

[root@MYSERVER bin]# urpmi -a vnc-server

installing vnc-server-4.1.2-2mdv2008.1.i586.rpm from /media/cdrom/i586/media/contrib
Preparing...                     #############################################
      1/1: vnc-server            #############################################

====================================================

[root@MYSERVER bin]# vncserver
vncserver: couldn't find "Xvnc" on your PATH.
[root@MYSERVER bin]# urpmi Xvnc
No package named Xvnc
The following packages contain Xvnc: linuxvnc, x11-server-xvnc
You should use "-a" to use all of them

====================================================

# VNC PROTOCOL X11:
-------------------

[root@MYSERVER bin]# urpmi x11-server-xvnc
installing x11-server-xvnc-1.6.5-1mdv2010.0.i586.rpm from /media/cdrom/i586/media/main
Preparing...                     #############################################
      1/1: x11-server-xvnc       #############################################

=====================================================

#SETUP VNC:
-----------

[root@MYSERVER bin]# vncserver

You will require a password to access your desktops.

Password: kookoo
Verify: kookoo
xauth:  creating new authority file /root/.Xauthority

New 'MYSERVER:1 (nista)' desktop is MYSERVER:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/MYSERVER:1.log

(to change password use vncpasswd command)

======================================================

#CHANGE PORT:
-------------

vi /usr/bin/vncserver

#CHANGE THE LINE:
$vncPort = 1820 + $displayNumber;
(It was 5900, but I have the port 1821 open)

#STARTING:
----------

vncserver :1
(starts vncserver on port 1820+1=1821)

#STOPPING:
----------

vncserver -kill :1

[root@MYSERVER X11]# telnet localhost 1821
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
RFB 003.007

=======================================================

#TROUBLESHOOTING:
-----------------


TightVNC "Failed to connect to server"
NOTE: I have changed the script of vnc [vi /usr/bin/vncserver] so the process must start using vncserver :4080,
because in the script it is 1820 + x and my client should listen to 5900 (there is a bug, it does not listen to
other port than this, even though you can change the setting on tight vnc client)

Leave a Reply