# hook for windows rdesktop if [ ! $TCOS_RDESKTOP ]; then _verbose "(56rdesktop) TCOS_RDESKTOP" else if [ ! -e /usr/bin/rdesktop ]; then _echo " * rDesktop not installed" fi stat_before cpifexists /usr/bin/rdesktop /usr/bin/ mkdir -p $DESTDIR/usr/share/ copydir /usr/share/rdesktop/ /usr/share/ if [ ${TCOS_PULSEAUDIO} ] && [ ${TCOS_SOUND} ]; then # padsp pulseaudio support cpifexists /usr/bin/padsp /usr/bin/ cpifexists /usr/lib/libpulsedsp.so /usr/lib/ fi cat << EOF > $DESTDIR/sbin/startrdesktop #!/bin/sh . /conf/tcos.conf . /conf/tcos-run-functions export DISPLAY=:0 export HOME=/root if [ -f \$XAUTHORITY ]; then TCOS_XORG_OPTS="\$TCOS_XORG_OPTS -auth \$XAUTHORITY" fi XKB=\${TCOS_XORG_XKB} if [ "\${XKB}" = "br" ]; then XKB="pt-br" fi Xorg \${TCOS_XORG_OPTS} >> /tmp/initramfs.debug 2>&1 & sleep 2 waitforX sleep 1 # default server RDESKTOP_SERVER=\$(read_server 'rdesktop' "$TCOS_RDESKTOP_SERVER") RDESKTOP_CMD="/usr/bin/rdesktop -5 -u \"\" -f -a 16 -k \${XKB} \${RDESKTOP_SERVER}" if [ -x /usr/bin/padsp ] && [ -d /proc/asound ]; then RDESKTOP_CMD="padsp -s localhost /usr/bin/rdesktop -5 -r sound -u \"\" -f -a 16 -k \${XKB} \${RDESKTOP_SERVER}" fi # -r sound # -u "" # empty username # -f -a 16 fullscreen and 16 color bits while [ 1 ]; do xterm -e "echo Connecting with \" \${RDESKTOP_SERVER}...\" ; sleep 1 ; \${RDESKTOP_CMD} >/tmp/rdesktop 2>&1; echo \"Connection closed.\"; sleep 2" done EOF chmod +x $DESTDIR/sbin/startrdesktop # old redesktop cmd #/usr/bin/rdesktop -5 -f -a 16 -k \${XKB} -T "Remotedesktop-Client: \${rdesktop}" \${rdesktop} > /dev/null 2>&1 stat_after "rDesktop" fi