#!/bin/bash directory=`kdialog --getexistingdirectory $HOME` if [ $? = 0 ]; then echo "User selected directory $directory." kdesu -c "mount -o loop $1 $directory" if [ $? != 0 ]; then kdialog --sorry "Could not mount $1 at $directory." fi else echo "User did not select a directory." fi