1. rpm이나 소스로 vnc를 설치한다.(자세한 내용은 생략)
2. /etc/sysconfig/vncserver의 내용을 수정한다.
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
3. vncpasswd로 사용자 비밀번호를 설정한다. 물론 확인을 위해 두번 입력 해야 한다. 이 부분을 하지 않고 vncserver를 구동시키면, 아무런 에러 없이 FAILED 만 출력된다.
$ vncpasswd
Password:
Verify:
4. 기본으로 설정되는 윈도우 매니저는 twm으로, gdm에 익숙해진 일반유저로서는 교체해주는 것이 좋다.
위의 설정에 해준 아이디의 홈디렉토리에서 .vnc/ 디렉토리에 xstartup이라는 스크립트를 교체 해준다. xstatup 파일은 /etc/X11/xinit/xinitrc을 xstartup으로 이름 바꾸어 복사해주면 된다.
# more xstartup.bak
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
# more xstartup
#!/bin/sh
# Copyright (C) 1999 - 2005 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Authors:
# Mike A. Harris <mharris@redhat.com>
# Mandatorily source xinitrc-common, which is common code shared between the
# Xsession and xinitrc scripts which has been factored out to avoid duplication
. /etc/X11/xinit/xinitrc-common
# The user may have their own clients they want to run. If they don't,
# fall back to system defaults.
if [ -f $HOME/.Xclients ]; then
exec $SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients || \
exec $SSH_AGENT $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
exec $SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients || \
exec $SSH_AGENT /etc/X11/xinit/Xclients
else
# Failsafe settings. Although we should never get here
# (we provide fallbacks in Xclients as well) it can't hurt.
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
[ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
[ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
[ -x /usr/bin/twm ] && /usr/bin/twm
fi
5. 방화벽을 해제하거나, 포트를 풀어준다.(자세한 내용은 생략) 포트는 5900번이 기본으로 디스플레이 포트를 더해준다.
예를들어 3번 display 번호를 사용하면 5900 + 3 = 5903 번의 포트를 열어주어야 한다.
6. vnc 서버를 구동한다.(자세한 내용은 생략) service vncserver start
service vncserver restart
일단 둘다 동일한 VNC이긴하다.
tightVNC는 realVNC 기반의 GPL 라이센스를 따르고 있고
realVNC는 free버전이 존재한다.
오늘 잠시 VNC 서버에 tightVNC로 접속해본 느낌은, real VNC free 버전에 비해서 화면 갱신이 매우 빠르다는 점이다.
자세한 내용은 tightVNC 서버를 설치 후 테스트를 해봐야 알 수 있을것 같다.
일단 tightVNC는 GPL 라이센스이므로 모든 기능을 100% 지원/공개 하기 때문에
real VNC 공개버전과 비교를 하자면, 파일 전송이 가능하다는 장점이 있다.
TightVNC Features
Here is a brief list of TightVNC features absent in the standard VNC.
File transfers in versions for Windows. You can updload files from your local
machine to the TightVNC Server, and download files from the server to your computer.
Support for video mirror driver (Windows 2000 and above). TightVNC Server can use
DFMirage mirror driver to detect screen updates and grab pixel data in a very efficient
way, saving processor cycles for other applications.
Scaling of the remote desktop (viewer for Windows and Java viewer). You can view
the remote desktop in whole on a screen of smaller size, or you can zoom in the picture to
see the remote screen in more details.
Efficient "Tight" encoding with optional JPEG compression. New Tight
encoding is optimized for slow and medium-speed connections and thus generates much less
traffic as compared to traditional VNC encodings. Unlike other encodings, Tight encoding is
configurable via compression levels and JPEG image quality setting.
Enhanced Web browser access. TightVNC includes a greatly improved Java viewer
with full support for Tight encoding, 24-bit color mode, and more. The Java viewer applet
can be accessed via built-in HTTP server like in the standard VNC.
Support for two passwords, full-control and read-only. The server allows or
disallows remote keyboard and mouse events depending on which password was used for
authentication.
Automatic SSH tunneling on Unix. The Unix version of TightVNC Viewer can
tunnel connections via SSH automatically using local SSH/OpenSSH client installation.
And more. TightVNC includes a number of other improvements, performance
optimizations and bugfixes, see change logs for more
information.
50% 축소해서 본 tightVNC의 remote화면
간추린요약 - tightVNC가 나은 점
1. tightVNC가 realVNC에 비해서 접속속도 및 화면갱신속도가 상당히 빠르다
(테스트 조건 realVNC 서버/윈도우 realVNC 서버)
2. 화면 scaling을 지원한다
3. 파일 전송을 지원한다고 한다(VNC free edition 대비, 테스트 해보지 못했음)
리눅스 서버로의 접속은 실질적인 화면갱신속도 차이는 거의 없지만, tightVNC 쪽이 접속속도가 빨랐다.