VNC, X-Windows - 윈디하나의 솔라나라

목차

개요

VNC 서버 설치

  1. 솔라리스 10의 최신 업데이트를 사용하고 있다면 아래와 같이 설치되어있는 것을 확인할 수 있다.
    root@wl ~ # pkginfo | grep vnc
    system      SUNWvncviewer                    VNC viewer client
    system      SUNWxvnc                         X11/VNC server
    root@wl ~ # svcs xvnc-inetd
    STATE          STIME    FMRI
    disabled       15:16:30 svc:/application/x11/xvnc-inetd:default
    root@wl ~ # svcs -a | grep login 1)
    disabled       14:20:42 svc:/application/gdm2-login:default
    online         14:22:00 svc:/system/console-login:default
    online         14:22:14 svc:/application/graphical-login/cde-login:default
    root@wl ~ #
    
    1) 솔라리스에서 사용할 수 있는 로그인 화면은 두가지다. 여기서는 cde-login 기준으로 설명한다.
  2. xvnc-inetd 서비스를 enable 하기 전에 /etc/services 에 VNC 포트(5900)를 등록해야 한다. 1)
    root@wl ~ # vi /etc/services
    ...
    vnc-server      5900/tcp                        # VNC Server Default port
    root@wl ~ # svccfg -s cde-login
    svc:/application/graphical-login/cde-login> setprop dtlogin/args=""
    svc:/application/graphical-login/cde-login> exit
    root@wl ~ # svcadm restart cde-login
    root@wl ~ # svcadm enable xvnc-inetd
    root@wl ~ # svcs xvnc-inetd
    STATE          STIME    FMRI
    online         15:16:48 svc:/application/x11/xvnc-inetd:default
    root@wl ~ #
    
    1) 포트를 등록하지 않은 채 xvnc-inetd를 시작했다면 아래와 같이 오류가 난다. 솔리리스의 SMF는 maintenance 상태로 된 경우, clear 해야 enable 시킬 수 있으므로, 미리 clear 해 놓는다.
    root@wl ~ # svcs -xv xvnc-inetd
    svc:/application/x11/xvnc-inetd:default (X server that displays to VNC viewers)
     State: maintenance since Fri Sep 18 15:42:47 2009
    Reason: Restarter svc:/network/inetd:default gave no explanation.
       See: http://sun.com/msg/SMF-8000-9C
       See: man -M /usr/X11/share/man -s 1 Xvnc
    Impact: This service is not running.
    root@wl ~ # svcadm clear xvnc-inetd
    
  3. 만약 cde-login 이 아닌 gdm2-login 을 사용하고 있다면 /etc/X11/gdm/gdm.conf 파일을 수정해야 한다.
    root@wl ~ # vi /etc/X11/gdm/gdm.conf
    [xdmcp]
    ...
    Enable=true
    
  4. 만약 세션을 공유하려면 아래와 같이 한다. 기본 설정대로 공유시키면 하면 보안에 문제가 있기 때문에 패스워드도 같이 걸어놓는다.
    root@wl ~ # inetadm -l xvnc-inetd
    SCOPE    NAME=VALUE
             name="vnc-server"
             endpoint_type="stream"
             proto="tcp"
             isrpc=FALSE
             wait=FALSE
             exec="/usr/X11/bin/Xvnc -inetd -query localhost -once securitytypes=none"
             user="noaccess"
    default  bind_addr=""
    default  bind_fail_max=-1
    default  bind_fail_interval=-1
    default  max_con_rate=-1
    default  max_copies=-1
    default  con_rate_offline=-1
    default  failrate_cnt=40
    default  failrate_interval=60
    default  inherit_env=TRUE
    default  tcp_trace=FALSE
    default  tcp_wrappers=FALSE
    default  connection_backlog=10
    root@wl ~ # inetadm -m xvnc-inetd wait=TRUE exec="/usr/X11/bin/Xvnc -inetd -query localhost -once passwordFile=/var/vnc/.vnc/passwd -alwaysshared"
    root@wl ~ # mkdir /etc/vnc
    root@wl ~ # HOME=/etc/vnc vncpasswd
    Password:
    Verify:
    root@wl ~ # ls -al /etc/vnc/.vnc/passwd
    -rw-------   1 root     root           8  9월 18일  16:00 /etc/vnc/.vnc/passwd
    root@wl ~ #
    

접속

  1. CDE나 JDE에서 /usr/bin/vncviewer 를 실행한다.
    root@wl ~ # /usr/bin/vncviewer
    
    VNC Viewer Free Edition 4.1.2 for X - built Nov 20 2007 10:26:07
    Copyright (C) 2002-2005 RealVNC Ltd.
    See http://www.realvnc.com for information on VNC.
    
    Fri Sep 18 15:55:30 2009
     CConn:       connected to host xxx.xxx.xxx.xxx port 5900
    
    Fri Sep 18 15:55:31 2009
     CConnection: Server supports RFB protocol version 3.8
     CConnection: Using RFB protocol version 3.8
     TXImage:     Using default colormap and visual, TrueColor, depth 24.
     CConn:       Using pixel format depth 6 (8bpp) rgb222
     CConn:       Using ZRLE encoding
    
    Fri Sep 18 15:55:36 2009
     CConn:       Throughput 20000 kbit/s - changing to hextile encoding
     CConn:       Throughput 20000 kbit/s - changing to full colour
     CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
     CConn:       Using hextile encoding
    
    root@wl ~ # 
    

  2. vncviewer를 실행하면 아래와 같은 창이 나온다. 호스트 주소를 입력한다.

  3. 세션을 공유하도록 설정하지 않았다면 아래와 같이 cde의 로그인 창이 뜰것이다.

X윈도의 TCP 접속 활성화

솔라리스 10에서 X윈도의 TCP LISTEN 은, 설치시 네트워크 Remote Services를 no 로 했다면 비활성화 되어있다.
root@wl ~ # netstat -na | grep 6000
1 root@wl ~ # svcprop  svc:/application/x11/x11-server | grep options/tcp_listen
options/tcp_listen boolean false
아래와 같이 해서 외부에서 접속 가능하도록 할 수 있다.
root@wl ~ # svccfg -s svc:/application/x11/x11-server setprop "options/tcp_listen = true"
root@wl ~ # reboot
재시작 후에는 6000번 포트가 열려있는 것을 확인할 수 있다.
RSS ATOM XHTML 5 CSS3