site  contact  subhomenews

Desktop drive icons fix

August 28, 2011 — BarryK
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.


Username: 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

sleep removed
Username: BarryK
"I thought about it some more, have removed the "sleep 1" completely. That is the wrong place for it.

Tags: woof