The use of VNC under Linux

Source: Internet
Author: User
Tags windows remote desktop

VNC is similar to Windows Remote Desktop, can be used for desktop sharing and Remote Assistance, etc.

Linux is installed by default Vncserver, this time need to install VNC software on the client (can be found online)

Running Vncserver on Linux

[Email protected] ~]# Vncserver

You'll require a password to access your desktops.


Password: Establish a connection password (client and server-side connection password)

Verify: Re-enter this password


New 'localhost.localdomain:1 (root)' desktop is Localhost.localdomain:1

This time there will be a : 1

Creating default startup Script/root/.vnc/xstartup

Starting applications specified In/root/.vnc/xstartup

Log file Is/root/.vnc/localhost.localdomain:1.log

The first time you enter Vncserver, you will be prompted to set a connection password (the server-side connection password to the client)

This time the server side is temporarily finished .....

Test:

Open the VNC software input 192.168.241.100:1 on the client, enter the password

At this time, the connection will find just a very simple picture (x Windown basic graphics function), the workaround:

There is an executable file in/root/.vnc/ xstartup

[[Email protected] ~]# CD. vnc/

[email protected]. vnc]# LL

Total 16

-rw-r--r--1 root root 397 Feb 07:18 Localhost.localdomain:1.log

-rw-r--r--1 root root 5 Feb 07:18 localhost.localdomain:1.pid

-RW-------1 root root 8 Feb 07:18 passwd

-rwxr-xr-x 1 root root 334 Feb 07:18 xstartup

This time you need to change xstartup this file

1 #!/bin/sh

2

3 # Uncomment the following-lines for normal desktop:

4 # unset Session_manager

5 # EXEC/ETC/X11/XINIT/XINITRC

6

7 [-x/etc/vnc/xstartup] && Exec/etc/vnc/xstartup

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

9 Xsetroot-solid Grey

Ten Vncconfig-iconic &

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

TWM &

Here only the fourth line and the 5th line before the # can be removed, at this time with the customer service in the login to try to find the screen and installed after the operating system is the same screen.

But.....................

It is not possible to perform similar operations such as desktop multiplayer sharing or Remote Assistance. Workaround:

Running the X0vncserver under Linux

[[email protected] ~]# X0vncserver after running out of the error (good headache)

X0vncserver:unable to open Display ""

~imagecleanup called

So how to solve the above situation. Here's how:

The above situation is actually the display this environment variable is caused by a null value, this time need to set the display variable and import into the system, and then the password file associated with it OK

[Email protected] ~]# echo $DISPLAY


[[email protected] ~]# display= ": 0"

[[email protected] ~]# echo $DISPLAY This time DISPLAY has value

: 0

[Email protected] ~]# export DISPLAY

[Email protected] ~]# X0vncserver--passwordfile=/root/.vnc/passwd

Tue Feb 10 07:01:18 2015

Main:xtest Extension present-version 2.2

Main:listening on port 5900

The above message indicates that the above problem has been successfully resolved. You can use the client to test it at this time.

Note: To use 192.168.241.100 when logging in here: 0 This port, the password, or the password you just started setting.

Mainly: 0

The use of VNC under Linux

Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.