summaryrefslogtreecommitdiffstats
path: root/virtualization/templates/xdialog.sh
blob: dd1c58620a8f1e60d64acf9afb57fce8e23229de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

# This script will run Xdialog. menulist-create will add all menu entrys
# from the different .xdialog files
#
#TODO: change path_to_this_script to path of this file. needed, because
#      a return will exit Xdialog


themesdir="/var/lib/openslx/themes"
res=$(xvidtune -show | grep -wo "\".*\"" | sed "s/\"//g") 
if ! [ -f ${themesdir}/bootsplash/images/silent-${res}.jpg ]; then     
  img=$(ls ${themesdir}/bootsplash/images/ | grep -m 1 "silent")
  display -window root ${themesdir}/bootsplash/images/${img}
else
  display -window root ${themesdir}/bootsplash/images/silent-${res}.jpg
fi


$($(which Xdialog) --rc-file /var/lib/openslx/themes/Xdialog/gtkrc \
    --title "Desktop / VMware-ImageMenu" \
    --screen-center \
    --fill --no-wrap \
    --stdout \
    --no-tags \
    --ok-label "START" \
    --item-help \
    --menubox "Please choose the image you would like to run:" \
    35 80 0 \
    "/var/X11R6/bin/xdialog.sh" "No Image - Don't press return too fast" "" \