特殊:Badtitle/NS100:VNC
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/VNC }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/af | • {{#if: UbuntuHelp:VNC|Afrikaans| [[::VNC/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ar | • {{#if: UbuntuHelp:VNC|العربية| [[::VNC/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/az | • {{#if: UbuntuHelp:VNC|azərbaycanca| [[::VNC/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/bcc | • {{#if: UbuntuHelp:VNC|جهلسری بلوچی| [[::VNC/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/bg | • {{#if: UbuntuHelp:VNC|български| [[::VNC/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/br | • {{#if: UbuntuHelp:VNC|brezhoneg| [[::VNC/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ca | • {{#if: UbuntuHelp:VNC|català| [[::VNC/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/cs | • {{#if: UbuntuHelp:VNC|čeština| [[::VNC/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/de | • {{#if: UbuntuHelp:VNC|Deutsch| [[::VNC/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/el | • {{#if: UbuntuHelp:VNC|Ελληνικά| [[::VNC/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/es | • {{#if: UbuntuHelp:VNC|español| [[::VNC/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/fa | • {{#if: UbuntuHelp:VNC|فارسی| [[::VNC/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/fi | • {{#if: UbuntuHelp:VNC|suomi| [[::VNC/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/fr | • {{#if: UbuntuHelp:VNC|français| [[::VNC/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/gu | • {{#if: UbuntuHelp:VNC|ગુજરાતી| [[::VNC/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/he | • {{#if: UbuntuHelp:VNC|עברית| [[::VNC/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/hu | • {{#if: UbuntuHelp:VNC|magyar| [[::VNC/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/id | • {{#if: UbuntuHelp:VNC|Bahasa Indonesia| [[::VNC/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/it | • {{#if: UbuntuHelp:VNC|italiano| [[::VNC/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ja | • {{#if: UbuntuHelp:VNC|日本語| [[::VNC/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ko | • {{#if: UbuntuHelp:VNC|한국어| [[::VNC/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ksh | • {{#if: UbuntuHelp:VNC|Ripoarisch| [[::VNC/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/mr | • {{#if: UbuntuHelp:VNC|मराठी| [[::VNC/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ms | • {{#if: UbuntuHelp:VNC|Bahasa Melayu| [[::VNC/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/nl | • {{#if: UbuntuHelp:VNC|Nederlands| [[::VNC/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/no | • {{#if: UbuntuHelp:VNC|norsk| [[::VNC/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/oc | • {{#if: UbuntuHelp:VNC|occitan| [[::VNC/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/pl | • {{#if: UbuntuHelp:VNC|polski| [[::VNC/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/pt | • {{#if: UbuntuHelp:VNC|português| [[::VNC/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ro | • {{#if: UbuntuHelp:VNC|română| [[::VNC/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/ru | • {{#if: UbuntuHelp:VNC|русский| [[::VNC/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/si | • {{#if: UbuntuHelp:VNC|සිංහල| [[::VNC/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/sq | • {{#if: UbuntuHelp:VNC|shqip| [[::VNC/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/sr | • {{#if: UbuntuHelp:VNC|српски / srpski| [[::VNC/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/sv | • {{#if: UbuntuHelp:VNC|svenska| [[::VNC/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/th | • {{#if: UbuntuHelp:VNC|ไทย| [[::VNC/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/tr | • {{#if: UbuntuHelp:VNC|Türkçe| [[::VNC/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/vi | • {{#if: UbuntuHelp:VNC|Tiếng Việt| [[::VNC/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/yue | • {{#if: UbuntuHelp:VNC|粵語| [[::VNC/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/zh | • {{#if: UbuntuHelp:VNC|中文| [[::VNC/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/zh-hans | • {{#if: UbuntuHelp:VNC|中文(简体)| [[::VNC/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:VNC | UbuntuHelp:VNC | {{#if: | :}}VNC}}/zh-hant | • {{#if: UbuntuHelp:VNC|中文(繁體)| [[::VNC/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:VNC|:VNC|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :VNC/zh | | {{#ifexist: VNC/zh | | {{#ifeq: {{#titleparts:VNC|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:VNC|1|-1|}} | zh | | }}
Virtual Network Computing (VNC) allows a computer to be seen and accessed remotely from other computers, who can see the screen and control the system using the keyboard and mouse.
VNC is useful for remote technical support or remote access to personal/work computers.
tip: If you need to access a Mac remotely, read Apple Remote Desktop instead.
Enabling other Computers to Connect to your desktop
To allow other computers to access your desktop sessions, when your logged in, perform the following steps. Note: This is like MS Remote Assistance and only works when your are logged into the computer sharing that instance of your Xserv. See below for creating Xservs on the fly and allowing multiple loggings and XDM/GDM.
using GNOME / Ubuntu
System > Preferences > Remote Desktop
'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.
using KDE / Kubuntu
System Settings > Sharing > Desktop Sharing > Create & Manage Invitations ...
Choose 'New Personal Invitation...' (you give the invitation by whichever means you prefer (Email, Instant Messaging, Written-Down Note) or 'New Email Invitation...'. The newly created invitation will last a default of 1 hour.
Enabling other computers to Connect to XDM/GDM and start sessions.
Unlike the method listed above you when connecting this way you get a login prompt and begin a new session. This also works when no user is logged in and allows multiple parallel loggings.
Step 1
Append the following line to /etc/services
$> gksudo gedit /etc/services vnc 5901/tcp # VNC with GDM
Step 2
Create the following file /etc/xinetd.d/vnc
$> sudo pico /etc/xinetd.d/vnc service vnc { disable = no socket_type = stream protocol = tcp wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd :1 -query localhost -broadcast -once -fp /usr/share/X11/fonts/misc/ -securitytypes=none -desktop=vnc://MyDesktop/ }
- Note: In 6.10 the default fount's were not found. The -fp /usr/share/X11/fonts/misc/ line should resolve this error.
- Note: -desktop=vnc://MyDesktop/ is the title that appears to the user when connecting.
- Note: -query localhost is optional, it may fix a problem when clients get "connection unexpectedly closed"
Step 3
Enable XDMCP in your login configuration to allow remote logins to GDM (the gnome login screen).
Edit /etc/gdm/gdm.conf
$> sudo pico /etc/gdm.conf
find the section [xdmcp] and set the enable to true:
[xdmcp] .... Enable=true
uncomment this line:
RemoteGreeter=/usr/lib/gdm/gdmlogin
Step 4
Stop and restart Xinetd
$> sudo /etc/init.d/xinetd restart
Problems
- If you cant connect check your router/port forwarding, firewall, or try running the following to start a session without Xinetd to verify Xvnc is working.
$> Xvnc :1 -fp /usr/share/fonts/X11/misc/
- Make sure you connect to the proper port, in this case vnc://localhost:5901. In some clients this is set by choosing display 1.
Accessing Another Computer Remotely
You can access other computers using VNC by clicking:
Applications > Internet > Terminal Server client.
The menu can be accessed by hitting F8. The menu contains an option for sending CTRL-ALT-DEL.
To login to a remote machine using the terminal:
vncviewer [ip address]
tip: if you are connecting through a router you'll need to forward port 5900 to the machine you need to connect to. (VNC can use other ports as well. If you have multiple machines you would like to connect to you can forward 5900 to the first, 5901 to the second, 5902 to the third, etc.) If you are using a non-standard port (ie; other than 5900) you will need to specify the port in the connection command.
example:
vncviewer [ip address]:[port]