#!/bin/sh foo1() { dd if=/dev/cdrom of=/home/$USER/$input } foo2() { Xdialog --title "Creating image" \ --gauge "please wait while image is being created" 18 45 1000 } Xdialog --title "makeimage" \ --inputbox "Enter file name eg: my.iso" 18 45 2> /tmp/inputfoomain.tmp.$$ retval=$? input=`cat /tmp/inputfoomain.tmp.$$` rm -f /tmp/inputfoomain.tmp.$$ case $retval in 0) foo1 & foo2;; 1) echo "Cancel pressed.";; 255) echo "Box closed.";; esac