wilde@738: #!/bin/bash wilde@738: andre@1160: # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik andre@1160: # Software engineering by Intevation GmbH andre@1160: # andre@1160: # This file is Free Software under the GNU GPL (v>=2) andre@1160: # and comes with ABSOLUTELY NO WARRANTY! andre@1160: # See LICENSE.txt for details. andre@1160: wilde@738: PREFIX="" wilde@763: CFGDIR="${XDG_CONFIG_HOME:-$HOME/.config}/BSI" wilde@738: TBCMD="trustbridge --tray" wilde@738: XSET=/usr/bin/xset wilde@738: CONFIG="$CFGDIR/trustbridge-tray-starter.cfg" wilde@738: wilde@738: if [ -r "$CONFIG" ] ; then wilde@738: DISPLAY=`sed -n "/DISPLAY/s/[^=]*=\(.*\)/\1/p" "$CONFIG"` wilde@738: export DISPLAY wilde@738: wilde@738: # only run when X is accessible wilde@738: if "$XSET" -q >/dev/null 2>&1 ; then wilde@738: "$PREFIX/bin/"$TBCMD wilde@738: fi wilde@738: fi