X-Window 를 설치하였으면 이환경을 컨트롤 할수 있게 VNC-Server 가 설정이 되어있어야 한다.
이거역시 yum 으로 받으면 금방 설치가능한다.
[root@chonnom ~]# yum -y install vnc-server
[root@chonnom ~]# rpm -qa |grep vnc
vnc-server-4.1.2-20.fc7
vnc-4.1.2-19.fc7
gtk-vnc-0.3.2-2.fc7
gtk-vnc-python-0.3.2-2.fc7
vnc-libs-4.1.2-19.fc7
VNC 설정파일 확인 (/etc/sysconfig/vncservers)
- 가장아래쪽 주석처리 부분 제거
# 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.
VNCSERVERS="1:root"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
※ VNC 서비스 순서와 계정 (접속포트는 순서에 기본 5900 포트값을 더한값 ex: 1+5900=5901 포트로 접속)
VNC 서비스의 접속 해상도 설정
옵션
-nolisten tcp
TCP 통신을 통한 VNC 서버로의 연결을 차단합니다.
-nohttpd
웹기반 VNC 클라이언트의 연결을 차단합니다.
-localhost
secure tunnel을 통하지 않은 모든 원격 클라이언트의 접속을 차단합니다.
vnc 연결계정 패스워드 지정
[root@chonnom ~]# vncpasswd
Password:
Verify:
VNC 서버설정 완료.... VNC 서버데몬 올리고 접근!!
[root@chonnom ~]# /etc/init.d/vncserver start
앗......텍스트환경만 보인다...
먼가 빠진부분이 있다. /root/.vnc/xstartup 파일을 수정해야 되는데....내 시스템에서는 해당 파일이 보이지 않는다.. vnc데몬 시작하면 생성됨...
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER ==> 2개 라인 주석해제
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
이제 제대로 보인다...ㅋㅋㅋ