个人工具

UbuntuHelp:VirtualNetworkConnection

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 14:29的版本 (新页面: {{From|https://help.ubuntu.com/community/VirtualNetworkConnection}} {{Languages|UbuntuHelp:VirtualNetworkConnection}} Virtual Network Connection (VNC) is a system that allows you comple...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


Virtual Network Connection (VNC) is a system that allows you complete graphical access to your (or, with permission, others) computers. This includes complete transfer of keystrokes & mouse input. The two main uses for this service are

        • remote technical support
        • remote access to personal/work computers -- especially "headless" servers that don't have their own display.

There are 2 parts to VNC:

        • Set up the "VNC server" program on the "remote" computer (the system you want to control remotely, which may not have its own display).
        • Set up the "VNC viewer" program on the "local" computer (the "local" system that has the display, keyboard, and mouse you want to use to view and control the "remote" system).

The VNC server and viewer software are installed by default on any standard Ubuntu installation, but they need to be activated before they can be used.

Activating the VNC server

To give some other computer complete graphical access to your Ubuntu box, the simplest method (using GNOME) is to choose

System > Preferences > Remote Desktop

You will want to 'check' the first two boxes to activate the service:

Allow other users to view your desktop (view only)

Allow other users to control your desktop (view & control).

Below you can set security. The two options are:

Ask you for confirmation (ie; someone at the machine must click OK to grant remote access. This will be a problem if you plan on accessing your home machine from work or visa versa, as no one may be there to grant you access.)

Require the user to enter this password: This will require a password from anyone trying to remotely connect to your machine. This is ALWAYS a good idea.

Close the "Remote Desktop Preferences" window. Now you can go to any other computer in the world and have complete graphical access to this Ubuntu box. (But before you leave this Ubuntu box, you may want to use "ifconfig" to find the IP address of this Ubuntu box).

Activating the VNC viewer

To control some other computer from this Ubuntu box, choose Applications > Internet > Terminal Server Client.

Enter the approriate information, and then choose "Open". A window should appear, displaying a screen identical to the screen on the remote machine.


troubleshooting

        • The VNC viewer program immediately says "Failed to connect to server!" -- it doesn't even let me type in my password.
          • That happens when I type in a IP address or hostname that doesn't exist. Are you sure you typed in the right IP address? I also get this message if some firewall between here and there is blocking things.
        • The VNC viewer program asks me for my password, then says "VNC authentication failed!"
          • This tells you that it found the machine at that IP address, but either it wants a different password, or the VNC server isn't set up properly. So what do I need to do to set it up properly?
        • The VNC viewer program asks me for my password, opens up a big display window ... but it is solid black.
          • That happens when the screensaver kicks in -- move the mouse around, click in some harmless location.
            • No dice. Still black.
              • This happened to me once, after I used "switch to a different user". It cleared up after I switched back to the original user. I wish I knew exactly what the problem was.

Once I have all that running, what other options might I consider ?

        • Remote Login via XDMCP has more tips on using VNC with Ubuntu at one end and OSX or Windows at the other end.

Alternatives to VNC:

        • KVM switch hardware. A dedicated box that has cables running out the back to all the machines you want to control, and a plug for your favorite keyboard, screen and mouse in the front. Advantage: KVM hardware is the only method that lets you fiddle with the BIOS settings at boot time, unlike these other software systems. Disadvantage: KVM hardware can't be used for machines more than a few hundred meters away. VNC can be used to control systems on the other side of the world.
        • XDMCP: Remote Login via XDMCP claims that "Unlike vncviewer that just duplicates the current screen on a remote system, XDMCP allows several different users to login and run different GNOME sessions at the same time." (Um... but I thought VNC screens :0 to :14 could allow different users to login and run different GNOME sessions at the same time ? Perhaps I misunderstood the documentation ?).

Related techniques:

        • SSH ... doing VNC over SSH gives more security. VNC over SSH uses only a single port (SSH 22), so it can get through firewalls that have only that one port open.

(Has all the information from the ubuntu forum, such as this thread, already been summarized into this wiki page?)

related pages

Possibly-relevant external links