Fixed gpvi mode.
[utils.git] / rdp
... / ...
CommitLineData
1#!/bin/bash
2
3usage() {
4 echo "usage: rdp [-hf] HOST [PORT|INSTANCE]"
5}
6
7args=(-K -r sound)
8fs=
9while [ "${1:0:1}" = - ]; do
10 a="$1"
11 shift
12 case "$a" in
13 -h)
14 usage
15 exit 0
16 ;;
17 -f)
18 fs=y
19 ;;
20 esac
21done
22if [ "$fs" = y ]; then args=("${args[@]}" -f); else args=("${args[@]}" -g 1280x960); fi
23
24if [ $# -lt 1 ]; then
25 usage >&2
26 exit 1
27fi
28
29port=3389
30if [ $# -ge 2 ]; then
31 port="$2"
32 if [ "$port" -lt 100 ]; then
33 port=$((port + 3389))
34 fi
35fi
36
37exec rdesktop "${args[@]}" "$1:$port"