Two-state Launcher for CD-ROM drives in Mandrake 9.1

Paul M. Bucalo pmbuc at pmbenterprises.com
Mon Feb 2 00:21:56 CET 2004


On Sun, 1 Feb 2004 17:03:45 -0500, Paul M. Bucalo graced me with:
> A while back someone was kind and generous enough to post a
> wonderful script for mounting/unmounting CD-ROM drives using XFce's
> two-state launchers. Here it is for those who aren't aware of it:
> 
> #!/bin/sh
> # script to mount/umount cdrom
> # for use with xfce4-trigger-launcher
> if [ "$1" = "1" ]; then
> mount /mnt/cdrom &> /dev/null
> elif [ "$1" = "0" ]; then
> eject /mnt/cdrom &> /dev/null
> else
> STATUS=`grep cdrom /proc/mounts`
> if [ "x$STATUS" = "x" ]; then
> echo 0
> else
> echo 1
> fi
> fi
> 
> 
> This script worked perfectly in Red Hat 9, even with the slight
> modification to the drive numbering to distinguish between the CD-
> ROM and CD-RW drive in that particular box. In Mandrake 9.1, the
> opposite is true. Both launchers show that they are always mounted.
> If I put a CD in, it eventually cycles through the script and
> ejects it back out. The scripts are identical to the ones
> successfully used in Red Hat 9, with only one difference: The
> second ROM drive in the MDK 9.1 box is denoted as '/mnt/cdrom2'
> (instead of '/mnt/cdrom1' in RH 9) by the O/S.
> 
> Anyone using Xfce-4.0.3.0.1 on Mandrake 9.1, and using this same
> script with success? Any changes recommended for this distro? If
> anyone has a better, or just plain working, script for MDK 9.1, *p-
> l-e-a-s-e* tell me! :0/
> 
> TIA,
> 
> 
> Paul

I seemed to have outsmarted myself. I was so concerned with 
replicating the neat environment I had in RH 9 that I forgot about 
some of the differences between the two distros. I don't need the 
two-state launchers to mount/unmount CD-ROM drives in MDK 9.1. 
Supermount does this automatically, in the background. 

Ok...enough chuckling from the Mandrake users. I *did* finally catch 
on. :0)

Paul




More information about the Xfce mailing list