Ok guys. I don't use gnome and I don't use nautilus, and so i don't bother installing zenity... but i do have kdialog installed in kde, so i modified the scripts to work with kubuntu and kde... only i can't get the unmount to work....i've got it started, so i'd appreciate some kind soul to find my error...thanks
here's my working mount.sh
Here's my unmount.sh. I didn't think it worked, but I think I found my error. Try it and make any modifications you think necessary.Code:#!/bin/bash # mount # script was originally written for gnome and nautilus # found http://www.ubuntuforums.org/showthread.php?t=87369&page=3 # modified to support kde/kubuntu by Joshua Kersey / goodtimetribe kdesu /bin/echo "got r00t?" BASENAME=`basename $1` sudo mkdir "/media/$BASENAME" kdialog --title "ISO Mounter" --msgbox "$BASENAME e $1" if sudo mount -o loop -t iso9660 $1 "/media/$BASENAME" then if kdialog --title "ISO Mounter" --yesno "$BASENAME Successfully Mounted. Open Volume?" then konqueror /media/"$BASENAME" fi exit 0 else sudo rmdir "/media/$BASENAME" kdialog --error "Cannot mount $BASENAME!" --title "ISO Mounter" exit 1 fi
Code:#!/bin/bash # unmount # script was originally written for gnome and nautilus # found http://www.ubuntuforums.org/showthread.php?t=87369&page=3 # modified to support kde/kubuntu by Joshua Kersey / goodtimetribe kdesu /bin/echo "got r00t?" BASENAME=`basename $1` sudo umount "/media/$BASENAME" sudo rmdir "/media/$BASENAME" kdialog --info --text "Successfully unmounted /media/$BASENAME" exit 0




Adv Reply






Bookmarks