Sample rdesktop launcher

#!/bin/bash
#*************************************************
#	2011-10-10 By Piotr Zuk
#*************************************************
# Needed 3rdparty: 
# - http://www.semicomplete.com/projects/xdotool/
#*************************************************

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
TITLE="MyWindowsRemoteDesktop"

#kill previous instance
WID=`xdotool search "$TITLE" | head -1`
for id in $WID; do
  xdotool windowkill $id
done

rdesktop -u piotr.zuk -g 1280x1024 -a 24 -D -T $TITLE 10.2.135.133 &
usleep 800000
WID=`xdotool search "$TITLE" | head -1`
for id in $WID; do
  echo $id
  #xdotool windowsize $id 500 500
  xdotool windowmove $id 0 0
done

to enable sound, just add -rsound:local param.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s