몰디브를 꿈꾸며...

페도라 10에서 vnc 서버 설정. 본문

리눅스

페도라 10에서 vnc 서버 설정.

노란채송화 2009. 6. 17. 13:31

.vnc 서버를 인스톨한다.

[user@localhost ~]$ yum list installed | grep vnc

vnc-server라는 패키지가 없다면

[user@localhost ~]$ yum install vnc-server.i386

을 실행하면 된다

vnc서버 데몬을 구동할려면

[user@localhost ~]$ ntsysv

메뉴에서 vnc server를 체크해주고 리부팅한다.

.vncservers 파일 편집

[user@localhost ~]$ vi /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:user"
# VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
# VNCSERVERS="1:user2:root"
VNCSERVERS="2:user"
# VNCSERVERARGS[1]="-geometry 1280x800 -nolisten tcp -nohttpd"
VNCSERVERARGS[2]="-geometry 1280x800 -nolisten tcp -nohttpd"

.사용자 home 디렉토리로 이동하고 홈디렉토리 아래 .vnc를 생성

[user@localhost ~]$cd
[user@localhost ~]$ mkdir .vnc

[user@localhost ~]$ cd .vnc

. vnc용 password를 생성. 이후에 vnc 클라이언트를 이용해서 접속할경우 이 암호를 사용해야함.

[user@localhost ~]$vncpasswd

password:

verify:

. vnc 접속시 화면 설정

[user@localhost ~]$ vi .vnc/xstartup

vncconfig -iconic &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

. 클라이언트에서 접속시 "localhost:2"라고 접속하면됨



Comments