วันจันทร์ที่ 25 มกราคม พ.ศ. 2553

vnc server

ติดตั้ง VNC Server

โหลด VNC ที่ http://www.realvnc.com/cgi-bin/download.cgi
1.ล็อกอินโดยรูท(root privledges)
2.ถ้ายังไม่ได้ติดตั้ง vnc server ให้ใช้คำสั่ง yum install vnc-server เพื่อใช้ในการติดตั้งแพคเก็จให้เรียบร้อย
3.ตรวจสอบ firewall ว่าเปิดพอร์ต tcp 5901 หรือยัง ถ้ายังให้เปิดให้เรียบร้อย
4.ไปที่ cd ~root/.vnc
5.แก้ไขไฟล์ vi xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop: **เอาcomment 2 อันข้างล่างออก**
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" &
startx &

***ถ้าต้องการใช้ KDE Desktop บรรทัดสุดท้ายให้เปลี่ยนเป็น startkde &

6.เมื่อทุกอย่างเรียบร้อย เรามา start VNC server กันเลย
vncserver
7.จะมีข้อความให้ใส่พาสเวิร์ดสำหรับคอนเน็คมาที่เซิร์ฟเวอร์

You will require a password to access your desktops.Password:********Verify:********New 'iLinux.iwit.co.th:1 (root)' desktop is iLinux.iwit.co.th:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/iLinux.iwit.co.th:1.logถ้าทุกอย่าเป็นตามนี้แสดงว่า VNC Server เริ่มทำงานเรียบร้อย (X-display = :1)
***ถ้าต้องการหยุดการทำงาน vncserver ให้ใช้คำสั่งดังนี้
vncserver -kill
เช่น vncserver -kill :1

VNC Client
หลังจากทำส่วนของ Server เรียบร้อยแล้วเรามาดูส่วนของ Client กันบ้าง
เราสามารถคอนเน็คได้สองวิธี คือ

1.ใช้โปรแกรม VNC Client หาดาวน์โหลดได้ทั่วไปจากอินเทอร์เน็ต
3.หลังจากนั้นทดลองคอนเน็คจาก vnc client เข้ามาที่เซิร์ฟเวอร์ ถ้าทุกอย่างถูกต้องก็จะสามารถคอนเน็คได้

ไม่มีความคิดเห็น:

แสดงความคิดเห็น