#!/bin/bash usage() { echo "Usage: ulteo -s server -m [icon|desktop|application] [-u user -p password] -s server where we initiate session -m mode as we want to connect -u user to login (requieres password) -p password to connect with user " exit 0 } [ $1 ] || usage parametros="" while [ $# -ne 0 ] ; do case $1 in -s) shift [ $1 ] || usage parametros=$parametros"-s $1 " shift ;; -m) shift [ $1 ] || usage case $1 in icon) parametros=$parametros"-m applications --auto-start --auto-integration " shift ;; desktop) parametros=$parametros"-m desktop " shift ;; application) parametros=$parametros"-m applications " shift ;; esac ;; -u) shift [ $1 ] || usage parametros=$parametros"-u $1 " shift ;; -p) shift [ $1 ] || usage parametros=$parametros"-p $1 " shift ;; *) echo "Wrong parameter" usage ;; esac done echo $parametros java -jar /usr/share/java/OVDNativeClient.jar $parametros