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