▒ Linux
vnc server
잠꾸러기머프
2009. 2. 5. 10:49
# rpm -qa | grep vnc*
ltrace-0.5-7.45svn.el5
vnc-server-4.1.2-9.el5 (vnc 서버)
vnc-4.1.2-9.el5 (vnc 클라이언트)
서비스 구동
# service vncserver start
VNC 서버 (을)를 시작 중: no displays configured [ OK ]
vnc 서버의 패스워드 지정
# vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'server2.co.kr:1 (root)' desktop is server2.co.kr:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/server2.co.kr:1.log
# netstat -nat (5901포트가 열려있다)
# vncviewer (창이 하나뜬다)
10.10.33.3:5901 (접속하려는 호스트와 포트번호를 써주면 상대방 vnc 서버의 패스워드를 물어본다
상대방 vnc 서버의 패스워드를 입력하고 나면 x 콘솔창으로 접속된 모습을 볼 수 있다
참고 : vnc 패스워드 재지정 : /usr/bin/vncpasswd
# ls -l vnc*
-rwxr-xr-x 1 root root 96308 3월 15 2007 vncconfig
-rwxr-xr-x 1 root root 16356 3월 15 2007 vncpasswd
-rwxr-xr-x 1 root root 14027 3월 15 2007 vncserver
-rwxr-xr-x 1 root root 337072 3월 15 2007 vncviewer
# vncpasswd
Password:
Password must be at least 6 characters - try again
Password:
Verify:
----------------------------------------------------------------------------------------------------
참고 : 그놈 환경창으로 vnc로 접속하기
# cd /root/.vnc
# vi xstartup
#!/bin/sh
# 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
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &
# service vncserver restart
# vncviewer
이렇게 해도 안된다면
# vi /etc/sysconfig/vncservers
...
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600"
# service vncserver restasrt
# vncviewer
ltrace-0.5-7.45svn.el5
vnc-server-4.1.2-9.el5 (vnc 서버)
vnc-4.1.2-9.el5 (vnc 클라이언트)
서비스 구동
# service vncserver start
VNC 서버 (을)를 시작 중: no displays configured [ OK ]
vnc 서버의 패스워드 지정
# vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'server2.co.kr:1 (root)' desktop is server2.co.kr:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/server2.co.kr:1.log
# netstat -nat (5901포트가 열려있다)
# vncviewer (창이 하나뜬다)
10.10.33.3:5901 (접속하려는 호스트와 포트번호를 써주면 상대방 vnc 서버의 패스워드를 물어본다
상대방 vnc 서버의 패스워드를 입력하고 나면 x 콘솔창으로 접속된 모습을 볼 수 있다
참고 : vnc 패스워드 재지정 : /usr/bin/vncpasswd
# ls -l vnc*
-rwxr-xr-x 1 root root 96308 3월 15 2007 vncconfig
-rwxr-xr-x 1 root root 16356 3월 15 2007 vncpasswd
-rwxr-xr-x 1 root root 14027 3월 15 2007 vncserver
-rwxr-xr-x 1 root root 337072 3월 15 2007 vncviewer
# vncpasswd
Password:
Password must be at least 6 characters - try again
Password:
Verify:
----------------------------------------------------------------------------------------------------
참고 : 그놈 환경창으로 vnc로 접속하기
# cd /root/.vnc
# vi xstartup
#!/bin/sh
# 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
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &
# service vncserver restart
# vncviewer
이렇게 해도 안된다면
# vi /etc/sysconfig/vncservers
...
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600"
# service vncserver restasrt
# vncviewer