247 | | }}} |
248 | | * 設定 VNC server 使用者密碼. |
249 | | {{{ |
250 | | $ vncpasswd |
251 | | }}} |
252 | | * 啟動 VNC server. |
253 | | {{{ |
254 | | $ vncserver |
255 | | }}} |
256 | | {{{ |
257 | | #!sh |
258 | | xauth: creating new authority file /root/.Xauthority |
259 | | |
260 | | New 'X' desktop is guest:1 |
261 | | |
262 | | Creating default startup script /root/.vnc/xstartup |
263 | | Starting applications specified in /root/.vnc/xstartup |
264 | | Log file is /root/.vnc/vg01:1.log |
265 | | }}} |
266 | | * 關閉 VNC server. |
267 | | {{{ |
268 | | $ vncserver -kill :1 |
269 | | }}} |
270 | | * 設定 VNC server 啟動參數. |
271 | | {{{ |
272 | | $ vim .vnc/xstartup |
273 | | }}} |
274 | | {{{ |
275 | | #!sh |
276 | | # xrdb $HOME/.Xresources |
277 | | }}} |
278 | | * 開啟 DomU 上的第一台VNC Server,並指定解析度為 1024 x 768. |
279 | | {{{ |
280 | | $ vncserver -geometry 1024x768 -depth 24 :1 |
281 | | }}} |
282 | | * 檢查 VNCserver 有無開啟對應之 port(5901開始). |
283 | | {{{ |
284 | | $ netstat -tunlp |
285 | | }}} |
286 | | {{{ |
287 | | #!sh |
288 | | (Not all processes could be identified, non-owned process info |
289 | | will not be shown, you would have to be root to see it all.) |
290 | | Active Internet connections (only servers) |
291 | | Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name |
292 | | tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 10652/Xtightvnc ---> guest:1 |
293 | | tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 10630/Xtightvnc |
294 | | tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 10652/Xtightvnc ---> guest:2 |
295 | | tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 10630/Xtightvnc |
296 | | tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN - |
297 | | tcp6 0 0 :::22 :::* LISTEN - |
298 | | tcp6 0 0 ::1:6010 :::* LISTEN - |
299 | | }}} |
300 | | |
301 | | * 將 VNC Server:1 export 出來. |
302 | | {{{ |
303 | | $ export DISPLAY=:1 |