Page 1 of 3

Some suggestions that will make Puppy excellent

Posted: Fri 15 Oct 2010, 12:59
by akash_rawal
It is always very difficult for linux newbies to use and adapt to linux operating systems. Being easy enough for linux newbies is a major test for every linux OS, and almost all OSes fail in it. I would suggest following improvements which should make the lives of Puppy linux users easy-
1. Desktop drive icons: They should show volume labels along with drive numbers.
2. Grub bootloader config: It should have ability to detect existing operating systems and generate appropriate configurations to boot them. (I think the easiest way to do that is to read existing bootloader config files, or better still edit existing bootloader.)
3. Lucid Puppy menus: Pupdial and Roaring Penguin icons are missing by default. It would be very convenient if they were present, as in Puppy 4.
4. Power buttons: Puppy should be able to shutdown by pressing power button on computer case, like Windows and a few other linux distributions.
5. Power management: It could be better if Puppy could support standby and hibernate modes. Major linux distributions like Ubuntu support it.
6. Window management: Puppy could have a better window manager like Openbox.
7. Packages : All puppies of same major version (e.g. 4.x, 5.x, ...) should have packages and kernels of same versions. This will improve compatibility.
8. Desktop drive icons: These could be locked, so users cannot accidentally delete it and then keep wondering how it disappeared (This mistake is often done by me, so I know it.)

Posted: Fri 15 Oct 2010, 23:20
by cb88
1. Dunno
2.Thats a tough egg.. ubuntu often doesn't even do that well.
Nowdays theres lilo grub grub2 windows that would need to be supported at least. windows ammounts to chainloading so it is easy.
Linux boot loaders aren't quite as easy as you would acutally have to parse their config files.....in fact it may even be desirable to have a dedicated boot partition if you try out lots of OSes so you can keep the same grub all the time.
3. sounds like a simple oversight to me.

Posted: Fri 15 Oct 2010, 23:29
by disciple
(1) should be possible - someone posted how to use volume labels a couple of months ago.

Posted: Sat 16 Oct 2010, 13:17
by nooby
It is always very difficult for linux newbies to use and adapt to linux operating systems. Being easy enough for linux newbies is a major test for every linux OS, and almost all OSes fail in it. I would suggest following improvements which should make the lives of linux users easy


I am sort of an forever newbie in that I even fail to get what a volume label is?

I have frugally installed some 75 different Linux distros and will try out the Latest SuperOS today in frugal install.

I am sure of that I have no idea what a volume label is.

And not even recognixe one unless you pointed it out to me.

You expect much of us newbies

I agree that it would be cool if the install could make educated considerations of already installed OS and suggest what would be the best way to dual boot or trippel or quad or to boot then in a certain order.

To many OS think them should be the sole OS on that computer.

Even Linux guys get very surprised that one want to dual boot.

Wipe it all clean they say and refuse to talk to the dual booter. :)

Posted: Sat 16 Oct 2010, 17:29
by akash_rawal
nooby wrote:I am sure of that I have no idea what a volume label is.
Volume label is a name that can be given to a partition of a drive.
Microsoft Windows displays volume labels by default in Windows Explorer along with drive letters.
In Puppy also you can see volume labels in GParted (Menu>System>GParted partition manager). It will show them against each partition in "Label" column.

Posted: Sat 16 Oct 2010, 17:54
by nooby
Thanks, now that you remind me I remember that Ubuntu love UUID and that is not volume but a unique identifucation of a volume?

I got misled by the usage of

Pump up the volume! I want to hear the music.

Posted: Sat 16 Oct 2010, 22:30
by upnorth
i see fdisk -l has a nice tidy output and shows sizes, but blkid reveals the label and the uuid as well as the device and type.

Posted: Sun 17 Oct 2010, 01:33
by Flash
# blkid -h
blkid 1.0.0 (12-Feb-2003)
usage: blkid [-c <file>] [-ghlLv] [-o format] [-s <tag>] [-t <token>]
[-w <file>] [dev ...]
-c cache file (default: /etc/blkid.tab, /dev/null = none)
-h print this usage message and exit
-g garbage collect the blkid cache
-s show specified tag(s) (default show all tags)
-t find device with a specific token (NAME=value pair)
-l lookup the the first device with arguments specified by -t
-v print version and exit
-w write cache to different file (/dev/null = no write)
dev specify device(s) to probe (default: all devices)
# blkid
/dev/loop0: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: LABEL="CORSAIR" UUID="BC91-2FE5" TYPE="vfat"
/dev/sdb1: LABEL="KINGSTON" UUID="040B-07A3" TYPE="vfat"
/dev/sdc1: UUID="D461-730D" TYPE="vfat"
#
What does it all mean? I'm using quirky 1.3 in a computer with 4 GB of RAM and no hard disk drive, and 2 flash drives plugged into USB ports and an mp3 player also plugged into a USB port to charge.

I hope running blkid didn't cause the mp3 player to lose track of where it was when I turned it off. :(

Posted: Sun 17 Oct 2010, 03:44
by akash_rawal
Flash wrote:
# blkid -h
blkid 1.0.0 (12-Feb-2003)
usage: blkid [-c <file>] [-ghlLv] [-o format] [-s <tag>] [-t <token>]
[-w <file>] [dev ...]
-c cache file (default: /etc/blkid.tab, /dev/null = none)
-h print this usage message and exit
-g garbage collect the blkid cache
-s show specified tag(s) (default show all tags)
-t find device with a specific token (NAME=value pair)
-l lookup the the first device with arguments specified by -t
-v print version and exit
-w write cache to different file (/dev/null = no write)
dev specify device(s) to probe (default: all devices)
# blkid
/dev/loop0: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: LABEL="CORSAIR" UUID="BC91-2FE5" TYPE="vfat"
/dev/sdb1: LABEL="KINGSTON" UUID="040B-07A3" TYPE="vfat"
/dev/sdc1: UUID="D461-730D" TYPE="vfat"
#
What does it all mean?
Honestly, I don't know which devices do /dev/loop0 and /dev/loop3 point to. Probably they point to your personal save file and main sfs file.
/dev/sda1, /dev/sdb1 and /dev/sdc1 point to your two flash drives and an MP3 player (maybe not respectively). They all have fat16 or fat32 filesystem.

Posted: Sun 17 Oct 2010, 07:40
by disciple
What does it all mean?
Well, this discussion is about making Puppy use the volume label to identify your disks. Only two of yours have a label: "CORSAIR" and "KINGSTON".

Posted: Sun 17 Oct 2010, 12:59
by noryb009
GParted has the power to change/add labels, look at this picture: http://www.dedoimedo.com/images/compute ... look-1.jpg.

Posted: Mon 18 Oct 2010, 04:43
by disciple
Yes, but what is the point in changing the labels if Puppy doesn't actually use them?

Posted: Mon 18 Oct 2010, 15:26
by akash_rawal
I think it will be more useful if we discuss how to implement them.
Now I have no time.
I will start implementing them at April 2011 onwards.

Posted: Fri 05 Nov 2010, 03:11
by jemimah
It shouldn't be too hard. The script you need to modify is /sbin/pup_event_frontend_d.

Modify the following function:

Code: Select all

add_pinboard_func() { #needs ONEDRVNAME, DRV_CATEGORY, FSTYPE
 #ppPATTERN=' label="'"$ONEDRVNAME"'"'
 #v411 rerwin: avoid icon getting duplicated if it is renamed...
 ppPATTERN="/root/.pup_event/drive_${ONEDRVNAME}<"
 [ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
 free_coord
 echo "<?xml version=\"1.0\"?>
<env:Envelope xmlns:env=\"http://www.w3.org/2001/12/soap-envelope\">
 <env:Body xmlns=\"http://rox.sourceforge.net/SOAP/ROX-Filer\">
  <PinboardAdd>
   <Path>/root/.pup_event/drive_${ONEDRVNAME}</Path>
   <X>${COORD_X}</X>
   <Y>${COORD_Y}</Y>
   <Label>${ONEDRVNAME}</Label>
   <Args>${DRV_CATEGORY} ${FSTYPE}</Args>
  </PinboardAdd>
 </env:Body>
</env:Envelope>"  | rox -R
}
Just fix it so the Label is the drive label instead of the drive name. Of course you will need to add the logic to find the label.

Posted: Wed 08 Dec 2010, 11:37
by akash_rawal
Somehow I managed to get some time off my busy routine.
So I implemented the first one. Thanks to jemimah and upnorth for information, or else I might never come to know how to do that.
jemimah wrote: The script you need to modify is /sbin/pup_event_frontend_d.

Modify the following function:

Code: Select all

add_pinboard_func() { #needs ONEDRVNAME, DRV_CATEGORY, FSTYPE
 #ppPATTERN=' label="'"$ONEDRVNAME"'"'
 #v411 rerwin: avoid icon getting duplicated if it is renamed...
 ppPATTERN="/root/.pup_event/drive_${ONEDRVNAME}<"
 [ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
 free_coord
 echo "<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <PinboardAdd>
   <Path>/root/.pup_event/drive_${ONEDRVNAME}</Path>
   <X>${COORD_X}</X>
   <Y>${COORD_Y}</Y>
   <Label>${ONEDRVNAME}</Label>
   <Args>${DRV_CATEGORY} ${FSTYPE}</Args>
  </PinboardAdd>
 </env:Body>
</env:Envelope>"  | rox -R
}
I modified it as:

Code: Select all

add_pinboard_func() { #needs ONEDRVNAME, DRV_CATEGORY, FSTYPE
 #ppPATTERN=' label="'"$ONEDRVNAME"'"'
 #v411 rerwin: avoid icon getting duplicated if it is renamed...
 ppPATTERN="/root/.pup_event/drive_${ONEDRVNAME}<"
 [ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
 free_coord
 echo "<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <PinboardAdd>
   <Path>/root/.pup_event/drive_${ONEDRVNAME}</Path>
   <X>${COORD_X}</X>
   <Y>${COORD_Y}</Y>
   <Label>$(blkid-name-generator $ONEDRVNAME)</Label>
   <Args>${DRV_CATEGORY} ${FSTYPE}</Args>
  </PinboardAdd>
 </env:Body>
</env:Envelope>"  | rox -R
if [ "$( cat /root/.drvlist | grep $ONEDRVNAME )" = "" ]; then
echo $ONEDRVNAME >> /root/.drvlist
fi
}
Notice a new executable blkid-name-generator in Label tag.
Using a text editor create a script /usr/bin/blkid-name-generator as:

Code: Select all

#!/bin/sh
#Gather blkid output and filter out required device
blkid | grep "$@:" |
while read DEVICE PROPS
do
	echo $PROPS | sed -e "s/ /\;/g" > /tmp/blkid-tmp.txt
	. /tmp/blkid-tmp.txt
	DRLABEL=$( echo $LABEL | sed -e "s/;/ /g" )
	#Generate drive label
	if [ "$DRLABEL" = "" ]; then
		echo "$@"
	else
		echo "$DRLABEL
($@)"
	fi
done
#Handle the situation if blkid doesn't list required device
if [ "$( blkid | grep $@: )" = "" ]; then
	echo "$@"
fi
exit
However the function remove_pinboard_func() in /sbin/pup_event_frontend_d also needs to be edited:

Code: Select all

remove_pinboard_func() { #needs DRV_NAME (name of entire drive)
 #ppPATTERN=' label="'"$DRV_NAME"'.*" '
 #[ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" = "" ] && return
 #ALLNAMES="`grep -o "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin | cut -f 2 -d '"' | tr '\n' ' '`" #'geany
 #for ONEDRVNAME in $ALLNAMES
 #do
  #echo "<?xml version="1.0"?>
#<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 #<env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  #<PinboardRemove>
   #<Path>/root/.pup_event/drive_${ONEDRVNAME}</Path>
  #</PinboardRemove>
 #</env:Body>
#</env:Envelope>"  | rox -R
 #done
 #Rewritten to cope with blkid-name-generator
 cat /root/.drvlist | grep "$DRV_NAME" |
 while read ONEDRVNAME
 do
 echo "<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <PinboardRemove>
   <Path>/root/.pup_event/drive_${ONEDRVNAME}</Path>
  </PinboardRemove>
 </env:Body>
</env:Envelope>"  | rox -R
 sed -i -e "s/${ONEDRVNAME}//g" /root/.drvlist
 done
}
After that right-click on a drive icon, select "Run Desktop Drive Icon Manager" and then in "desktop icons" tab click "Tick box to erase then redraw and realign existing icons" and then click OK button.

Then restart X for changes to take effect.
And this works very well on puppy 430.
Image

Posted: Wed 08 Dec 2010, 16:17
by jemimah
Awesome! I will add this to my next release of Puppeee and Fluppy.

Posted: Wed 08 Dec 2010, 19:50
by jemimah
If you make this modification, then the drives with out labels will line up vertically.

Code: Select all

   if [ "$DRLABEL" = "" ]; then 
      echo -e "$@\n " 
   else 
      echo "$DRLABEL 
($@)" 
   fi 

Posted: Wed 08 Dec 2010, 22:20
by jemimah
I don't suppose anyone's interested in writing a simple GUI to change the disk label?

Note that Gparted can do it, but Mtools must be installed to change FAT labels. Mtools 4 doesn't seem to work, but Mtools3 does.

Posted: Thu 09 Dec 2010, 14:02
by akash_rawal
jemimah wrote:If you make this modification, then the drives with out labels will line up vertically...
Yes, it does make the drive icons look tidier.
Image

Posted: Thu 09 Dec 2010, 18:15
by abushcrafter
Thanks muchly. I have been wanting this for a long time :D.

What about drive labels for mount points? Would it be possible to have links in "/media" pointing to mount points in "/mnt"? Then drive icons will show up in the side panel of the GTK File Dialogue :).