[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-knoppix] [script] Scan for ZIP drives and create KDE desktop icon



i hacked up a little script that scans for Iomega ZIP drives and puts up a desktop icon in KDE.

just run "sudo ./scanzip"

i tested it with my IDE ZIP 100 drive. would be nice if other people could test this as well with their drives. i guess USB and SCSI drives work as well, not sure if it works with ZIP 250 drives and parallel port drives.

chris
#!/bin/bash
# Scan for ZIP drive and create a desktop link for the first one found
# only one ZIP drive is supported with an icon.
# Chris Liechti <cliechti@gmx.net>

ZIP=
LINK=/home/knoppix/Desktop/ZIP
for i in a b c d e f g h i j k l m n; do
if scsi_info /dev/sd$i|grep "IOMEGA ZIP" 2>&1 >/dev/null; then
ZIP=sd$i
echo "ZIP drive found on /dev/$ZIP"
cat >$LINK <<EOF
[Desktop Entry]
Name=ZIP disk
Name[de]=ZIP Diskette
Name[nl]=ZIP Diskettestation
Icon=zip_unmount
Type=Link
URL=/mnt/auto/${ZIP}4
Comment=File System Device
Comment[fi]=Tiedostosysteemi
Comment[pt]=Dispositivo com Sistema de Ficheiros
Comment[fr]=Périphérique avec système de fichiers
Comment[pl]=Urz±dzenie
Comment[it]=Dispositivo con Sistema File
Comment[de]=Dateisystem
Comment[nl]=Apparaat
EOF
chown knoppix.knoppix $LINK
break
fi
done


Reply to: