Install VNC under Linux

Source: Internet
Author: User
Tags gz file mkdir root directory

Today installed VNC, solve a lot of problems, write a teaching post, to see the novice, if you encounter the same problem, you can quickly solve, without headaches or even give up.

System environment

vm+rhel5.1

[Root@localhost. vnc]# uname-r

2.6.18-53.el5xen

Local XP system installation Vncview to control RHEL5.1 in VM

Install the Vncserver on Linux below

1, go to http://www.realvnc.com/to download the free version for x86 Linux

2, download is a tar.gz file, after decompression into the folder, there is a readme, please note that this piece do not download the RPM package, rely on the issue and the security of the signature of Baotou will make you very depressed.

3, decompression, enter the folder, according to the readme requirements to perform 4 steps

%./vncinstall/usr/local/bin

%./vncinstall/usr/local/bin/usr/local/man

% mkdir-p/usr/local/vnc/classes

% CP java/*/usr/local/vnc/classes

4, Start Vncserver, enter the connection password

5, you may be prompted linux1x:error while loading shared libraries:libstdc++-libc6.2-2.so.3:cannot open shared object File:no such fi Le or directory

To download libstdc++-libc6.2-2.so.3, put it in the/usr/lib, (this I met, by downloading this so file solved)

The following method is not available in this version, I have tried, it is invalid

On my system The result of the LS command is libstdc++.so.5.0.7 libstdc++.so.6.0.8

libstdc++.so.6.0.8 is what we're looking for, make a link to it.

Code:

$ sudo ln-s libstdc++.so.6.0.8 libstdc++-libc6.2-2.so.3

The following error occurs:

Vncpasswd:symbol lookup error:vncpasswd:undefined Symbol: __builtin_vec_new

See the wrong feeling is that the two libraries are not the same result of characters undefined

6, continue to start vncserver, there may be errors, as follows

VNCEXT:VNC extension running!

Vncext:listening for VNC connections on port 5901

Vncext:listening for HTTP connections on port 5801

vncext:created VNC Server for screen 0

Error opening security Policy File/usr/x11r6/lib/x11/xserver/securitypolicy

Could not init font path element/usr/x11r6/lib/x11/fonts/misc/, removing from list!

Could not init font path element/usr/x11r6/lib/x11/fonts/speedo/, removing from list!

Could not init font path element/usr/x11r6/lib/x11/fonts/type1/, removing from list!

Could not init font path Element/usr/x11r6/lib/x11/fonts/cid/, removing from list!

Could not init font path element/usr/x11r6/lib/x11/fonts/75dpi/, removing from list!

Could not init font path element/usr/x11r6/lib/x11/fonts/100dpi/, removing from list!

Fatal Server Error:

Could not open default font ' fixed '

Xsetroot:unable to open display ' localhost.localdomain:1 '

Vncconfig:unable to open display "Localhost.localdomain:1"

Warning:this is a suid-root program or are being run by the root user.

The full text of the error or warning message cannot is safely formatted

In this environment. You'll get a more descriptive message by running the

Program as a non-root user or by removing the suid bit on the executable.

Xterm Xt Error:can ' t open display:%s

Reason: Vncserver default looking for the X system font path under/usr/x11r6/lib/x11/fonts/, but RHEL5 is under/usr/share/x11/fonts/

Solution: Mkdir/usr/x11r6/lib

Cd/usr/x11r6/lib

Ln-s/usr/share/x11 X11

7, on the XP to enable Vncview, note that this is filled in the IP address plus desktop number, is generally 1, but if more than one person to log on to the desktop may not be 1, you need to ask the administrator, the following format: 192.168.1.102:1

[Root@localhost ~]# Netstat-an |grep 01

TCP 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN

TCP 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN

TCP 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN

8, after the successful VNC connection, found only TWM interface, not the legendary desktop, modify the following

Remove the # number in front of the two lines below to let VNC load the default graphical interface program

# unset Session_manager

# EXEC/ETC/X11/XINIT/XINITRC

These two lines may not be in some files, need to be manually added, no can not display the desktop

Modify the following.

Change the last line of twm& into------->gonme-session &

Attached: my profile

#!/bin/sh

[-R $HOME/. Xresources] && Xrdb $HOME/. Xresources

Unset Session_manager

Exec/etc/x11/xinit/xinitrc

Xsetroot-solid Grey

Vncconfig-iconic &

Xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &

Gnome-session &

~

9, error in the log file

Log file location in the root directory of the hidden file/root/.vnc/localhost.localdomain:1.log or 2.log, the difference between 1 and 2 is the desktop number, different desktop number corresponding to the different log files

Error opening security Policy File/usr/x11r6/lib/x11/xserver/securitypolicy

Could not init font path element/usr/x11r6/lib/x11/fonts/speedo/, removing from list!

Could not init font path Element/usr/x11r6/lib/x11/fonts/cid/, removing from list!

This error persists, but VNC is not being found to be working properly. Please advise the heroes.

BTW: General Desktop number start is 1, you can control the vncserver:10 by command so that the desktop number becomes 10, when the login is xx.xx.xx.xx:10 OK

10, the VNC to join the service, each start automatically open

This is needless to say, chkconfig add can.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.