GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntuにvncサーバーとクライアントをインストールします

VNCは、Virtual Network Computingの略で、簡単に言うと「リモートデスクトップ」の略です。これにより、システムは別のシステムのデスクトップにアクセスできます。それでは、ubuntuでvncを実行する方法を見てみましょう。

パッケージのインストール

$ sudo apt-get install vnc4server xvnc4viewer

1.vnc4server-これはvncサーバーアプリケーションです。リモートで表示されるシステムで実行されます。
2。 xvnc4viewer-これはクライアントアプリケーションです。リモートvncシステムに接続します。

vncパスワードを設定する

このvncサーバーに接続するvncクライアントは、パスワードを使用する必要があります。したがって、最初にパスワードを設定する必要があります。これは、vncpasswdコマンドを使用して実行できます。パスワードファイルは〜/ .vnc / passwd

にあることに注意してください。
$ vncpasswd ~/.vnc/passwd
Password:
Verify:

または、vncpasswdコマンドのみを実行することもできます

$ vncpasswd
Password:
Verify:

vncサーバーを起動します

desktop:~$ vncserver :12 -geometry 1024x768
New 'enlightened-desktop:12 (enlightened)' desktop is enlightened-desktop:12
Starting applications specified in /home/enlightened/.vnc/xstartup
Log file is /home/enlightened/.vnc/enlightened-desktop:12.log

:12は表示番号です。任意の番号にすることができ、その番号でvncserverを開きます。複数のvncserverを実行することができます。初めてvncserverコマンドを実行すると、パスワードの入力を求められます。

VNCクライアントを使用して接続

vncserverが実行されたら、vncクライアントを実行します。

$ vncviewer localhost:12
VNC Viewer Free Edition 4.1.1 for X - built Feb  5 2012 20:01:21
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Aug  7 18:27:59 2012
 CConn:       connected to host localhost port 5912
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
Password:

最初にサーバーを要求します。 localhost:12と入力します。形式はipaddress:display_number
になります。次に、パスワードの入力を求められます。前の手順で設定したパスワードを使用してください。

これで、VNCウィンドウが開き、ターミナルが表示されます。

xvnc4viewerのマニュアルページには次のように書かれています:

vncviewer is a viewer (client) for Virtual Network Computing. This manual page documents version 4 for the X win-dow system.

If you run the viewer with no arguments it will prompt you for a VNC server to connect to. Alternatively, specify the VNC server as an argument, e.g. : 

vncviewer snoopy:2

where  'snoopy'  is  the  name  of  the  machine, and '2' is the display number of the VNC server on that machine. Either the machine name or display number can be omitted.  So for example ":1" means display number 1 on the  same machine, and "snoopy" means "snoopy:0" i.e. display 0 on machine "snoopy".

If  the  VNC  server  is  successfully contacted, you will be prompted for a password to authenticate you.  If the password is correct, a window will appear showing the desktop of the VNC server.

終了後にサーバーを閉じる

vncセッションが完了すると、vncサーバーはディスプレイを閉じる必要があります。

$ vncserver -kill :12
Killing Xvnc4 process ID 23664

制限

vnc接続を確立する上記のアプローチには、特定の制限があります。サーバーマシンには、パブリックにアクセス可能なIPアドレスがあるか、vncクライアントが正しいポート番号でそれに到達できるように必要なポート転送設定が必要です。

リバースVNC

リバースvncでは、vncサーバーはvncクライアントに接続します。これは、サーバーにパブリックIPがなく、ポート転送もできない場合に実行されます。ただし、クライアントはパブリックIPを持っているか、必要なポート転送を実行できる必要があります。

リソース

1. https://help.ubuntu.com/community/VNC
2。 https://help.ubuntu.com/community/VNC/Clients
3。 https://help.ubuntu.com/community/VNC/Servers
4。 https://help.ubuntu.com/community/VNC/Reverse


Ubuntu
  1. Ubuntu20.04にNFSクライアントとサーバーをインストールする方法

  2. Ubuntu 13.04 /Ubuntu12.10にVNCサーバーをインストールします

  3. Ubuntu20.04にUrBackupサーバーとクライアントをインストールする-その方法は?

  1. Ubuntu20.04にVNCをインストールして構成する方法

  2. Ubuntu18.04にVNCをインストールして構成する方法

  3. Ubuntu14.04にVNCサーバーをインストールする方法

  1. Ubuntu20.04にUrBackupサーバーとクライアントをインストールする方法

  2. Ubuntu16.04にVNCサーバーをインストールして構成する

  3. Ubuntu20.04にVNCをインストールして構成する