Slackware 13.37 - tightvnc (with epkg) ========================== Public domain ******************************************************************************** ### tightvnc install cd /usr/src wget -c "http://pmoghadam.com/homepage/Pages/Deposit/Source-packages/tightvnc-1.3.10_unixsrc.tar.bz2" su - install cd /usr/src tar xf tightvnc-1.3.10_unixsrc.tar.bz2 cd vnc_unixsrc xmkmf && make World cd Xvnc ./configure && make cd .. mkdir -p /usr/local/encap/tightvnc-1.3.10/usr/{bin,man/man1} ./vncinstall /usr/local/encap/tightvnc-1.3.10/usr/bin /usr/local/encap/tightvnc-1.3.10/usr/man cd /usr/local/encap/ mkencap tightvnc-1.3.10/ logout cd /usr/local/encap/ epkg tightvnc-1.3.10 ******************************************************************************** ### vncserver first time setup vncserver :1 ( set password ) vncserver -kill :1 ******************************************************************************** ### vncserver config file ~/.vnc/xstartup #!/bin/sh # export XKL_XMODMAP_DISABLE=1 # autocutsel -fork # autocutsel -selection PRIMARY -fork & userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap # merge in defaults and keymaps if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f $userresources ]; then xrdb -merge $userresources fi if [ -f $usermodmap ]; then xmodmap $usermodmap fi # Start the window manager: /usr/bin/openbox-session ******************************************************************************** ### vncserver startup script : /etc/rc.d/rc.vncserver #!/bin/bash PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin" USERNAME=pejman case "$1" in 'start') echo 'Starting vncserver for $USERNAME on localhost ...' su $USERNAME -c "vncserver -geometry 800x600 -alwaysshared -localhost -dpi 96 :1" ;; 'stop') echo 'Stopping vncserver ...' su $USERNAME -c "/usr/bin/vncserver -kill :1" ;; 'restart') $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 [start|stop|restart]" ;; esac ******************************************************************************** ### first lunch chmod +x /etc/rc.d/rc.vncserver /etc/rc.d/rc.vncserver start ******************************************************************************** ### automatic startup from /etc/rc.d/rc.local # Start vncserver: if [ -x /etc/rc.d/rc.vncserver ]; then /etc/rc.d/rc.vncserver start fi ******************************************************************************** ### automatic shutdown from /etc/rc.d/rc.local_shutdown # Stop vncserver: if [ -x /etc/rc.d/rc.vncserver ]; then /etc/rc.d/rc.vncserver stop fi ******************************************************************************** ### vnc viewer vncviewer -depth 8 -encodings tight -nojpeg 127.0.0.1 # -bgr233 ******************************************************************************** ### Bookmarks [https://wiki.archlinux.org/index.php/Tightvnc](https://wiki.archlinux.org/index.php/Tightvnc) TODO: add autocutsel -fork to xstartup for copy/paste ******************************************************************************** _BY: Pejman Moghadam_ _TAG: epkg, tightvnc, vncserver, vncviewer_ _DATE: 2012-04-07 19:15:49_