Thanks. It's helped me a lot!
But I had to adjust some things on this script to make it run error free on my system. Maybe it's related to the version of bash and zenity, as my pc runs Ubuntu 7.04 Feisty.
What I had to change:
1. zenity syntax
Code:
Original code:
zenity --error --title "CD-Rom eject" --info-text "$1"
Changed code:
zenity --error --title="CD-Rom eject" --text="$1"
2. bash test syntax (it didn't work with ==, but just with a single =)
Code:
Original code:
if [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
Changed code:
if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
Code:
Original code:
if [ "$1" == "-z" ] || [ "$1" == "--zenity" ] ; then
Changed code:
if [ "$1" = "-z" ] || [ "$1" = "--zenity" ] ; then
I found this script on https://help.ubuntu.com/community/EjectCDLauncher but was unable to report those suggestion there. If you can, please include those changes there, so it can be used by others. It took me some time checking the script until I found what to do.
Thanks again!
Bookmarks