25 |
exit 1 |
exit 1 |
26 |
fi |
fi |
27 |
|
|
28 |
|
USE_XMESSAGE=0 |
29 |
|
if [[ -x $(type -P xmessage) ]] |
30 |
|
then |
31 |
|
USE_XMESSAGE=1 |
32 |
|
fi |
33 |
|
|
34 |
case ${CMD} in |
case ${CMD} in |
35 |
enumerate) |
enumerate) |
36 |
# enumerate apps |
# enumerate apps |
39 |
|
|
40 |
launch) |
launch) |
41 |
# launch apps |
# launch apps |
42 |
"${BROWSER}" -L "${APP}" -U "${USER}" -P "${PASS}" -D "${DOMAIN}" "${STORE}" |
if [[ ${USE_XMESSAGE} = 1 ]] |
43 |
|
then |
44 |
|
xmessage -center -title "ICA-Client" -buttons "" " |
45 |
|
Starting session '${APP}' ... |
46 |
|
|
47 |
|
" & |
48 |
|
fi |
49 |
|
if "${BROWSER}" -L "${APP}" -U "${USER}" -P "${PASS}" -D "${DOMAIN}" "${STORE}" |
50 |
|
then |
51 |
|
if [[ ${USE_XMESSAGE} = 1 ]] |
52 |
|
then |
53 |
|
killall xmessage |
54 |
|
fi |
55 |
|
else |
56 |
|
if [[ ${USE_XMESSAGE} = 1 ]] |
57 |
|
then |
58 |
|
killall xmessage |
59 |
|
xmessage -center -title "ICA-Client" -buttons " |
60 |
|
Abort" "Failed to start session '${APP}'. |
61 |
|
|
62 |
|
" & |
63 |
|
else |
64 |
|
echo "Failed to start session '${APP}'." |
65 |
|
fi |
66 |
|
fi |
67 |
;; |
;; |
68 |
|
|
69 |
*) |
*) |