#!/bin/sh
# # Make sure we have all the required parameters. # [ "$1" = "" ] && { echo "USAGE: $0 servername" exit }
# # The remote server. # SERVER=$1
# # Set the size of the display. # RDGEOM=800x600 XWI=xwininfo if [ -x /usr/openwin/bin/xwininfo ]; then XWI=/usr/openwin/bin/xwininfo elif [ -x /usr/bin/X11/xwininfo ]; then XWI=/usr/bin/X11/xwininfo elif [ -x /usr/X11R6/bin/xwininfo ]; then XWI=/usr/X11R6/bin/xwininfo fi
if [ -x $XWI ]; then WIDTH=`$XWI -root | grep Width |\ awk -F: '{ print $2 }' | sed -e 's/ //g'` HEIGHT=`$XWI -root | grep Height |\ awk -F: '{ print $2 }' | sed -e 's/ //g'`
if [ $WIDTH -gt 1280 -a $HEIGHT -gt 1024 ]; then RDGEOM=1280x1024 elif [ $WIDTH -gt 1152 -a $HEIGHT -gt 900 ]; then RDGEOM=1152x900 elif [ $WIDTH -gt 1024 -a $HEIGHT -gt 768 ]; then RDGEOM=1024x768 elif [ $WIDTH -gt 800 -a $HEIGHT -gt 600 ]; then RDGEOM=800x600 else RDGEOM=640x480 fi else echo "Can't find xwininfo, using 800x600 resolution." fi
#
# Figure out the username. Should be the same as Unix login name.
# If not, you'll need to fix this to be USER=<Your Windows Login Name>.
# Regex it and convert the first charicter to uppercase (Windows likes it)
#
set `whoami | sed -e 's/\(.\)\(.*\)/\1 \2/'`
USERNAME=`echo $1 | tr [a-z] [A-Z]`$2
# # Where do we want the output from rdesktop sent? # OUTPUT_DEVICE="/dev/null"
# # Find the program, make sure it exists and execute it. # PROGRAM=/usr/bin/rdesktop [ -x /usr/local/bin/rdesktop ] && PROGRAM=/usr/local/bin/rdesktop
if [ -x $PROGRAM ]; then $PROGRAM -u $USERNAME -g $RDGEOM $SERVER >> $OUTPUT_DEVICE & else echo "Can't find $PROGRAM executable!" fi
# # We're done. # exit
-brian
Brian D. McGrew { brian@xxxxxxxxxxxxxxxxxxx || pacemakertaker@xxxxxxxxx }
--
> YOU! Off my planet!
On Sep 22, 2004, at 9:43 AM, Michael Scully wrote:
Greetings fellow penguin heads:
I'm using rdesktop 1.2 that comes with Enterprise 3, because I need
to manage other Win machines around the network. This works great, but you
have to specify the host you want on the command line. I was hoping to not
have to have a desktop full of separate shortcuts for every host I want to
attach to. Is there no front end to the rdesktop that lets you choose
hosts, akin to how M$ lets you choose when you use their RDP client? Does
1.3 work better in this regard? I couldn't find documentation online about
it.
I suppose I could write a shell script launcher that prompted for this and then invoked rdesktop.
Scully
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list