#!/bin/bash
#
if [[ "$DISPLAY" && "$(which Xdialog 2>&1 | grep -v "which: no")" ]]; then
	dialog="Xdialog"
else
	dialog="dialog"
fi
if [[ $EUID -ne 0 ]]; then
	$dialog --title "Need to be root" --msgbox "\nYou need to be te root user to run unetbootin\n\nEither log in as root to run\nor open an xterm and enter\nsudo -i\nenter the root password\nthen enter:\nunetbootin-app\n\n" 0 0
	exit 0	
else
	unetbootin-app
fi
