> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/ubuntu-zhuo-mian/wang-lu-gong-ju/x11vnc-yu-novnc.md).

# X11vnc 與 novnc

### 第一部分：安裝VNC Server

```
 sudo apt-get install x11vnc
```

接著我們需要為VNC Server設定一個密碼檔

```
 x11vnc --storepasswd  
預設位置會存在 ~/.vnc/passwd
```

啟動VNC Server

```
x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth ~/.vnc/passwd -rfbport 5900 -shared
```

### 第二部分：安裝NoVNC&#x20;

再開啟一個終端機(總共有兩個終端機在執行)&#x20;

先安裝git

```
sudo apt install git
```

下載novnc

```
git clone https://github.com/novnc/noVNC.git
```

```
$cd noVNC
$./utils/launch.sh --vnc localhost:5900  
//port：5900要和VNC Server設定的port一致
//NoVNC預設port為6080 

用另一台電腦開啟瀏覽器網址輸入
http://遠端主機IP:6080/vnc.html
會看到NoVNC登入畫面
Password欄位輸入第一部分安裝VNC Server所設定的密碼

```
