Customize your file manager to launch an emulator when you double click an ISO file. Normally, double clicking an ISO file opens a file archive program which is useless!
This way we can use our file manager as a very easy way to launch ROMs and our favorite emulators, with just a double click, thus making it something like a front end.
The script needs the isoinfo
utility installed on your system and any emulator or the script it self to be in a dir. that is in the PATH environment of your system.
Read the script and customize it. It uses simple BASH commands. It just checks to see if the ISO file is inside a specific directory and if so, launches the emulator with the appropriate command. The script expects to have a directory tree like:
xbox
+ roms
ps2
+ roms
gamecube
+ roms
etc.
#!/bin/bash
# Commands
CMD_BURN="xfburn -i $1"
CMD_XBOX="xemu -dvd_path $1"
CMD_PS2="pcsx2-qt $1"
case "$1" in
*xbox/roms*) # if iso file is in xbox folder
echo "Launching XBOX Emulator"
$CMD_XBOX
;;
*ps2/roms*) # if iso is in ps2 folder
echo "Launching PS2 Emulator"
$CMD_PS2
;;
*) # otherwise, give us some options!
reply="$(zenity --list \
--title "Select what to do..." \
--column "Actions" \
--height=300 \
"List" "Info" "Burn" "Erase")"
case "$reply" in
Burn) $CMD_BURN
;;
List) isoinfo -l -i "$1" | zenity --text-info --title "File list of $(basename $1)"
;;
Info) isoinfo -d -i "$1" | zenity --text-info --title "Info for $(basename $1)"
;;
Erase)
if zenity --question --title "Warning!" --width=300 --text="Are you sure to erase file?"; then
zenity --info --text="You pressed \"Yes\"!"
fi
esac
;;
esac