2011年5月15日 星期日

vnc server

參考資料:
#安裝
http://gaznjang.blogspot.com/2010/03/vnc-configuration-in-debian.html
#圖形介面設定
http://blogold.chinaunix.net/u2/70049/showart_1274087.html
#參考資料之二
http://tsmhome.homeip.net/bbs/viewthread.php?action=printable&tid=27
#參考資料之三
http://tsmhome.homeip.net/bbs/viewthread.php?tid=27&extra&ordertype=1

#安裝
 apt-get update
 apt-get install vnc4server

#安裝後畫面
using /usr/bin/vnc4server to provide /usr/bin/vncserver (vncserver) in auto mode.
using /usr/bin/Xvnc4 to provide /usr/bin/Xvnc (Xvnc) in auto mode.
using /usr/bin/x0vnc4server to provide /usr/bin/x0vncserver (x0vncserver) in auto mode.
using /usr/bin/vnc4passwd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode.
using /usr/bin/vnc4config to provide /usr/bin/vncconfig (vncconfig) in auto mode.

#啟動
 vnc4server -geometry 1024x768 -depth 24

#啟動後畫面
You will require a password to access your desktops.

Password:
Verify:
Password too long - only the first 8 characters will be used
xauth:  creating new authority file /root/.Xauthority
 New 'debian:1 (root)' desktop is debian:1
 Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/debian:1.log


#未來若要再建立其他的 vncserver 只需要再執行即可
root@debian:~# vnc4server

#執行後畫面
New 'debian:2 (root)' desktop is debian:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/debian:2.log

#結束 vncserver
vnc4server -kill :#

 vnc4server -kill :2

-------------------------------------
#vncserver 啟動gnome桌面設定
#在/home/<span>username</span>/.vnc/xstartup最後面加上gnome-session &
#如下:

vim ~/.vnc/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 &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
gnome-session &

vim安裝

apt-get update
sudo apt-get install vim

ssh安裝

#安裝
apt-get update
apt-cache search ssh
apt-get install openssh-server

#連線工具
putty


入門教學
http://www.ascc.sinica.edu.tw/putty

#設定檔
/etc/ssh/sshd_config
#改port
# What ports, IPs and protocols we listen for
Port 22

#root是否可登入
PermitRootLogin yes

#重新啟動
/etc/init.d/ssh  restart