Desktop drive icons fix

Those who are using a Puppy built from recent Woof will notice on the first boot that the drive icons draw along the bottom of the screen rather slowly.

One-second intervals in fact. I had put a "sleep 1" into the code to delay the icon changing from mounted to unmounted, as there is a problem with a USB activity-light flashing up to a second beyond the drive being unmounted (and 'sync' completed).

However, this 1-second is also delaying the initial drawing of the icons. Furthermore, the 1-second delay was only supposed to occur for USB drives but is happening for all.

So, I have changed the test for the 1-second delay in /etc/rc.d/functions4puppy4:

icon_unmounted_func() {

#passed params: drivename category ex: sda usbdrv
DRVICON="drive48.png" #default.
[ "$2" = "usbdrv" ] && DRVICON="usbdrv48.png"
[ "$2" = "card" ] && DRVICON="card48.png"
[ "$2" = "floppy" ] && DRVICON="floppy48.png"
[ "$2" = "optical" ] && DRVICON="optical48.png"
#find out if already done...
if [ -f /root/.config/ ];then
GLOBLINES="`cat /root/.config/ | tr '\n' '|' | sed -e 's%</rule>|%\n%g'`"
[ "`echo "$GLOBLINES" | grep "$diPATTERN" | grep "$DRVICON"`" != "" ] && return
#[ "`echo "${ATADRIVES}" | grep "${1}"`" = "" ] && sleep 1 #110722 usb drive, LED light briefly flashes after unmounted, so wait a bit. ATADRIVES is in /etc/rc.d/PUPSTATE.
[ "$2" = "usbdrv" ] && sleep 1 #110828 above test doesn't work.
echo "<?xml version=\"1.0\"?>
<env:Envelope xmlns:env=\"\">
<env:Body xmlns=\"\">
</env:Envelope>" | rox -R

I have no idea why the previous test does not work. This change should fix it, at least now the internal drive icons will draw fast.

Posted on 28 Aug 2011, 16:38


Posted on 28 Aug 2011, 18:21 by L18L
ATADRIVES is in /etc/rc.d/PUPSTATE.

Yes it is but there is NO actualization of ATADRIVES in PUPSTATE after plugging in.

Using wary513
Hope that helps

Posted on 28 Aug 2011, 21:05 by BarryK
sleep removed
I thought about it some more, have removed the "sleep 1" completely. That is the wrong place for it.