#!/bin/bash
if [ "x" != "x""$MSG" ];
then
    if [ -x /usr/bin/notify-send ];
    then
        ICON=""
        if [ -e /opt/picoscope/share/picoscope.png ];
        then
            ICON=" --icon=/opt/picoscope/picoscope.png"
        fi
        /usr/bin/notify-send $ICON -t 0 -u normal -a picoscope "$MSG"
    else
        echo "$MSG" 1>&2
    fi
    exit 1
fi

/opt/picoscope/lib/PicoScope.GTK "$@" 2>&1 >/dev/null 2>&1 >/dev/null
