wok-tiny view fbvnc-ssh/receipt @ rev 68

fbvnc: speedup
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Sep 12 15:43:10 2011 +0200 (2011-09-12)
parents 05be185b867c
children efbd89023863
line source
1 # SliTaz package receipt.
3 PACKAGE="fbvnc-ssh"
4 VERSION="1.0"
5 CATEGORY="network"
6 SHORT_DESC="VNC client in frame buffer within a SSH tunnel."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://tiny.slitaz.org/"
9 DEPENDS="base-tiny fbvnc dropbear"
11 # Rules to gen a SliTaz package suitable for Tazpkg.
12 genpkg_rules()
13 {
14 mkdir -p $fs/usr/bin
15 }
17 config_form()
18 {
19 [ "$VNCONLY" == "no" ] || VNCONLY=yes
20 [ -n "$VNCUSER" ] || VNCUSER=tux
21 cat <<EOT
22 <table>
23 <tr>
24 <td>SSH user for the VNC server</td>
25 <td><input type="text" name="VNCUSER" value="$VNCUSER"></td>
26 </tr>
27 <tr>
28 <td>Remove virtual consoles ?</td>
29 <td>
30 <input type="radio" name="VNCONLY" $([ "$VNCONLY" == "no" ] && echo "checked=checked ")value="no"> keep virtual consoles 3 to 6
31 <input type="radio" name="VNCONLY" $([ "$VNCONLY" == "yes" ] && echo "checked=checked ")value="yes"> keep VNC console only
32 </td>
33 </tr>
34 </table>
35 <p>
36 You should add the public key in <b>\$HOME/.ssh/authorized_keys</b> of the VNC/SSH server.
37 </p>
38 <p>
39 You can get it on the client (from configuration files) with:
40 </p>
41 <pre>
42 # dropbearkey -y -f /etc/dropbear/dropbear_dss_host_key | grep ^ssh
43 </pre>
44 or
45 <pre>
46 # dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep ^ssh
47 </pre>
48 EOT
49 }
51 post_install()
52 {
53 sed -i 's/\(fbvnc -bpp [0-9]*\) \([^|]*\)/\1 127.0.0.1 5900/;/kill -1 1/d' $1/etc/init.d/local.sh
54 cat >> $1/etc/init.d/local.sh <<EOT
56 # From fbvnc-ssh
57 EOT
58 [ "$VNCONLY" == "yes" ] && cat >> $1/etc/init.d/local.sh <<EOT
59 sed -i '/^tty[3-9]:.*/d' /etc/inittab
60 EOT
61 cat >> $1/etc/init.d/local.sh <<EOT
62 grep -qs fbvnc /etc/inittab &&
63 sed -i "s|tty2:.*|tty2::respawn:/usr/bin/ssh -i /etc/dropbear/dropbear_dss_host_key -i /etc/dropbear/dropbear_rsa_host_key -y -N -L 5900:127.0.0.1:\$VNCPORT $VNCUSER@\$VNCSERVER|" /etc/inittab
64 kill -1 1
65 EOT
66 }