pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Post Reply
Message
Author
noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#121 Post by noryb009 »

This looks great! I'm just wondering, if you don't add anything to the ISO (no X), would it:

1) run things made in C++ ONLY using the STL?
2) have less overhead then the normal Puppy Linux? (If so, how much (about?))

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#122 Post by technosaurus »

noryb009 wrote:This looks great! I'm just wondering, if you don't add anything to the ISO (no X), would it:

1) run things made in C++ ONLY using the STL?
2) have less overhead (than) the normal Puppy Linux? (If so, how much (about?))
Yes, yes - significantly less (but the standard version would be the same if you do a full install and boot to the command line)

Here is a really base system and some other system images for most architectures:
http://impactlinux.com/aboriginal/downl ... test/base/

P.s. I compiled amigo's patched rox for gtk1 and will post later.
I found out how to start it via jwm.
Last edited by technosaurus on Thu 05 Aug 2010, 17:23, edited 1 time in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#123 Post by goingnuts »

I have not had any success starting/killing Xorg and have a new xorg.conf afterwards - still hanging in a black screen in qemu or having no xorg.conf.
Xorg -probeonly generates a log in /var/log/xorg.0.log which might be worth digging into - might also have info concerning GL, GLU and dri...

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#124 Post by technosaurus »

"Xorg checks the settings of HorizSync and VertRefresh in the Monitor section to compute valid resolutions" - do not change these willy nilly, better to use sed on the xorg.conf or use xrandr to change it once the server is running (I compiled Xdialog against gtk1 too)

to make jwm start rox add this to your .jwmrc template or .jwmrc-tray

<StartupCommand>rox -p /root/Choices/ROX-Filer/PuppyPin</StartupCommand>

(of course that could all be put in a script with some other commands - with a lot of the stuff that is in .xinitrc)

The startup script should check for a file with the resolution first and use the HEIGHT & WIDTH parameters from it if it exists - otherwise create it with Xvesa -listmodes (as in my previous post)

I have had success with Xvesa, but noted some scripts that will need to be combined into the startup.
  • background_reshape
    fixPuppyPin
    clean_desk_icons
    probably more? see /root/.xinitrc
what would be even better is if it could load the pup*.sfs file (and other non-essentials) in this jwm startup script rather than during boot (ultra fast boot) ... so far I don't know of a distro that uses unionfs to layer a squashfs file to the initrd though - Barry uses switchroot(or pivotroot) and tinycore uses symlinks similar to choicepup.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#125 Post by goingnuts »

Small CLI script to set jwm background. Include this code in /root/.jwmrc:

Code: Select all

<Include>/root/.jwmrc-desktop</Include>
before using. Will probably not work in a ROX-controlled desktop...
Attachments
setbackground-jwm.sh.gz
CLI script to set background image, color or command in jwm
(1.17 KiB) Downloaded 308 times

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#126 Post by technosaurus »

If you want some Xdialog alternatives for your script

I have attached my gtk1 version that only uses about 4mb of ram (vs 14mb for the gtk2 version)

Code: Select all

Xdialog --stdout --no-tags --checklist "Select the type of background that you want" 0 0 8 1 "solid color" 0 2 "color gradient" 0 3 "stretched image" 1 4 "tiled image" 0 5 none 0 6 program 0 7 nevermind 0

Code: Select all

Xdialog --stdout  --fselect /usr/share/backgrounds/ 0 0

Code: Select all

Xdialog --stdout --wizard --colorsel "Select your background color" 0 0 --colorsel "Select your secondary background color" 0 0

Code: Select all

Xdialog --stdout --inputbox "Enter the commands for program you want to run for setting your background" 0 0
They aren't complete but it should be a start.

to get the results in a shell use:
VARNAME="`Xdialog ......`"
or
echo $?
Attachments
Xdialog-2.3.1-i486.pet
(27.97 KiB) Downloaded 319 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#127 Post by technosaurus »

I found amigo's patched rox-filer and reworked some of the mime types and icons, (the icons could easily be cut down to make the package much smaller if you want)
Attachments
gtk1pup.png
(68.19 KiB) Downloaded 1298 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#128 Post by technosaurus »

I like to make little kiosk style puplets for kids but always find ways to make things more kid-proof. My latest one is this script named:
/usr/bin/kidstart

Code: Select all

#!/bin/sh
Xorg & rxvt +sb -e jwm && kidstart
That is just a simple example using Xorg - the Xvesa commands and "backlog" trick from before should work as well. The key is the "&&" at the end that restarts the script recursively if anyone ever tries to exit to the command prompt. ... you can just use pprocess or simply killall kidstart if you ever NEED to fall back :)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#129 Post by noryb009 »

How do you mount partitions in this?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#130 Post by technosaurus »

http://www.busybox.net/downloads/BusyBox.html
See the mount part of the busybox command help. If you have extra time you can use xdialog to make a simple GUI.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

jwm automount+disk icons

#131 Post by goingnuts »

Adopting some of your ideas, technosaurus, using jwm to do more of the work:

Attached example of generating jwmrc during start of X - just include this in xwin:

Code: Select all

#generate create_jwmrc_drives.sh if present
[ -f /root/create_jwmrc_drives.sh ] && /root/create_jwmrc_drives.sh

#automount if activated - missing script to set this
[ -f /etc/automount ] && /usr/sbin/automount.sh
All drives will be auto mounted before start of jwm and icons placed on desktop.
Code still on draft-level...
And forgot to include script automount.sh but code below:

Code: Select all

#!/bin/sh
#auto-mounts partitions found. Depends on guess_fstype
[ ! -f "$(which guess_fstype)" ] && echo "Missing guess_fstype" && exit

for PART in $(fdisk -l | grep "/dev/" | grep -v "Disk" | cut -d " " -f 1); do
   TYPE="$(guess_fstype "${PART}" 2>/dev/null)"
   if [ ! "${TYPE}" = "unknown"  -a ! "${TYPE}" = "swap" ]; then
      MOUNTPOINT="$(echo $PART | sed 's/dev/mnt/g')"
      if [ ! -d "${MOUNTPOINT}" ]; then
         mkdir -p "${MOUNTPOINT}"
         sync
      fi
      mount -t "${TYPE} ${PART} ${MOUNTPOINT}" #2>&1 >/dev/null
   fi
done
Attachments
jwm_drives.png
(30.49 KiB) Downloaded 1229 times
jwm_drives.tar.gz
(2.2 KiB) Downloaded 317 times

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#132 Post by goingnuts »

New builds uploaded - probably the last "Desktop"-version I will do of pUPnGO.
Some of the content is inspired by BasicLinux ex. the use of links as file browser/launcher. Using kmap´s as only kbd source have also reduced size.

The kernel is still slight modified with support for fb and ipv6. I would have liked to test a move of all needed drivers present in initrd.gz into the kernel to make kernel-up-or-downgrade less complicated - but I have no time for this...

This version contains hacks of initrd.gz: Full dynamic BusyBox and most of the ntfs stuff moved to initrd - copied at boot time to tmpfs before switch-root. This gives a lot more programs to run if you stay in initrd.gz and also reduce the total iso size (by re-use stuff needed in initrd.gz in main-sfs).

The main sfs-file contains Xvesa, jwm, xli (as image viewer), links text browser, alsa, grub, conky system-monitor and other small apps.(e3-text-editor, calender, pkg-install/remove, sfs-resize, sfsmanager, floppy-format a.o.).
All hd drives is auto-mounted when X/jwm starts and desktop icons created.
Most of the set-up wizards also works in plain CLI-mode, but dialog is included already (builds run wizards in CLI mode - delete /etc/use_dialog do get the dialog GUI).
I have removed all save-to-CD stuff from main sfs as I do not use that facility but it can be added as a pet as initrd.gz should recognize saved sessions on CD. And you will probably not find everything needed to use wireless....

Two versions to choose between:
One with all drivers for qemu only in zdrv:
initrd.gz 1,932K
zdrv_412.sfs 1,640K
pup_412pUPnGO.sfs 3,060K
Total ISO size: 8,516K

And one with full drivers in zdrv for use on all hardware (use zdrv-ctr to reduce at save)
initrd.gz 1,932K
zdrv_412.sfs 20,904K
pup_412pUPnGO.sfs 3,060K
Total ISO size: 27,772K

The difference in zdrv-size above reflects the power of zdrvctr...
Probably still some bugs and room for improvements...

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#133 Post by technosaurus »

looks pretty good - I like the idea of having separate trays as includes so that you don't have to grok the heck out of sed to edit it in place.

I wrote a gtkdialog script that will generate a menu for all apps with .desktop files (in /usr/share/applications) that could also be adapted to autohiding jwm trays for each category (instead of notetabs)
http://www.murga-linux.com/puppy/viewto ... h&id=31615 ... if anyone is interested, I can try to throw something together

File browser - I was using gtk1-xdialog's --fselect option and modified parts of the /usr/local/bin/defaulthandler script to auto open file types with the appropriate app.

Further jwm discussion...
Maybe we could set up separate includes for each jwm configuration category (instead of traditional .jwmpersonal etc...) like it is setup in the config manual -
http://joewing.net/programs/jwm/config.shtml

For example:
  • Root Menu
    Trays (9 screen locations TL, TC, TR, LC, C, RC, BL, BC, BR)
    "Icons" (floating trays with an x,y position)
    Clock Style
    Tray Style
    Task List Style
    Pager Style
    Group Settings
    Window Style
    Menu Style
    Popup Style
    Fonts
    Colors
    Key Bindings
    Mouse Bindings
    Desktops
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#134 Post by technosaurus »

here is my file browser using the gtk1 version of xdialog

Code: Select all

defaulthandler `Xdialog --stdout --fselect $HOME 0 0`
here is my hacked together tray generator - hack away as you desire and add <Include>/root/.jwmapptrays</Include> to your jwm template

Code: Select all

#!/bin/ash
# can't use entries with " (double quote) in the comment section maybe others - Ayttm is one example
for x in `ls /usr/share/applications/*.desktop`; do
	EXE="`grep "^Exec=" $x |cut -d = -f 2`"
	CAT="`grep "^Categories=" $x |cut -d = -f 2`"
	NAM="`grep "^GenericName=" $x |cut -d = -f 2`"
	[ "$NAM" = "" ] && NAM="`grep "^Name=" $x |cut -d = -f 2 |cut -d " " -f 1`"
	ICO="`grep "^Icon=" $x |cut -d = -f 2`"
	##needs full path to icon - will rework later
	COM="`grep "^Comment=" $x |cut -d = -f 2`"
	#NEW="<hbox tooltip-text=\"$COM\"><button><label>$NAM</label><input file>$ICO</input><action>$EXE &</action></button></hbox>"
	NEW="<TrayButton popup=\"$NAM - $COM\" icon=\"$ICO\">exec:$EXE</TrayButton>"
	
	case $CAT in
		*alculat*|*inance|*heet|ProjectManagement)	BUS=$BUS"
		"$NEW;;
		*eskto*|*creensave*|*ccessib*)	DSK=$DSK$NEW;;
		*ocumen*|*ordProcessor|*ebDevelo*)	DOC=$DOC$NEW;;
		*ile*)	FIL=$FIL$NEW;;
		*Game|*olePla*|*imulation|*musement)	FUN=$FUN$NEW;;
		*raphics|*hotography|*resent*|*art)	GFX=$GFX$NEW;;
		*udio*|*ideo*|*layer|*ecorder|*usic|*idi|*ixer|*equencer|*uner|TV|*iskBurning)	MED=$MED$NEW;;
		Dialup|Network|HamRadio|RemoteAccess)	NET=$NET$NEW;;
		X-PersonalUtility|X-Personal|Calendar|ContactManagement)	PER=$PER$NEW;;
		*etup*|PackageManager)	SET=$SET$NEW;;
		*onitor|*ecurity|*ardware*|*ore|*ystem)	SYS=$SYS$NEW;;
		Utility|Viewer|Development|Building|Debugger|IDE|Profiling|Translation|GUIDesigner|Archiving|TerminalEmulator|Shell)	UTL=$UTL$NEW;;
		*nternet|*rowser|*mail|*ews|*essaging|*elephony|*lient|*ransfer|P2P)	WEB=$WEB$NEW;;
		*) MSC=$MSC$NEW;;
	esac
	
done
echo \<JWM\> >$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"1\" height=\"28\"><TrayButton label=\"Business\"/>" $BUS "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"30\" height=\"28\"><TrayButton label=\"Disk\"/>" $DSK "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"60\" height=\"28\"><TrayButton label=\"Document\"/>" $DOC "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"90\" height=\"28\"><TrayButton label=\"File\"/>" $FIL "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"120\" height=\"28\"><TrayButton label=\"Fun\"/>" $FUN "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"150\" height=\"28\"><TrayButton label=\"Graphics\"/>" $GFX "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"180\" height=\"28\"><TrayButton label=\"Media\"/>" $MED "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"210\" height=\"28\"><TrayButton label=\"Network\"/>" $NET "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"240\" height=\"28\"><TrayButton label=\"Personal\"/>" $PER "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"270\" height=\"28\"><TrayButton label=\"Setup\"/>" $SET "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"300\" height=\"28\"><TrayButton label=\"System\"/>" $SYS "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"330\" height=\"28\"><TrayButton label=\"Utility\"/>" $UTL "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"360\" height=\"28\"><TrayButton label=\"Web\"/>" $WEB "</Tray>" >>$HOME/.jwmapptrays
echo "<Tray layer=\"1\" insert=\"right\" halign=\"left\" y=\"390\" height=\"28\"><TrayButton label=\"Misc.\"/>" $MSC "</Tray>" >>$HOME/.jwmapptrays
echo "</JWM>" >>$HOME/.jwmapptrays
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#135 Post by technosaurus »

OK, I finally figured out how to start up jwm without using rxvt - just use:
jwm -display :0

Here are the commands I use
to start jwm in Xvesa minimum resolution that supports 16 bpp true color and exit to prompt

Code: Select all

Xvesa -br -screen `Xvesa -listmodes 2>&1 |grep 0x[123][246] |sort |cut -d " " -f 2|tr "\n" " "|cut -d " " -f 1` -shadow -mouse /dev/mouse -nolisten tcp -tst -I & jwm -display :0 && killall Xvesa
to start jwm in Xvesa maximum supported resolution and bpp color (kiosk mode - save as jwmkiosk)

Code: Select all

Xvesa -br -kb -nozap -screen `Xvesa -listmodes 2>&1 |grep 0x[123][246] |sort -r |cut -d " " -f 2|tr "\n" " "|cut -d " " -f 1` -shadow -mouse /dev/mouse -nolisten tcp -tst -I & jwm -display :0 && jwmkiosk
adding -nozap to the Xvesa command will prevent exit by using ctrl+alt+backspace

adding -kb to the Xvesa command allows arrow keys to work ()
http://bkhome.org/blog/?viewDetailed=01764
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#136 Post by technosaurus »

I apologize for monopolizing the thread lately, but I have been making some progress towards getting a flash capable distro down under 16MB.

The latest progress is libflashplayer. I was contemplating getting a license from adobe to compile flashlite4, but I was able to hack flashplugin-7.0r73 to identify itself as 9.0r99 and view youtube in seamonkey-gtk1-1.1.19 - the 999kb pet is available here:
http://www.murga-linux.com/puppy/viewtopic.php?p=443992
(note: flash7 is pretty cpu intensive)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#137 Post by goingnuts »

technosaurus - no need for apologize - just not easy catching up on all your input... :D
I have tested your flash approach - works great - reducing size of libflashplayer.so with almost 70%!
Are you using SeaMonkey for your 16Mb Flash-distro?
I have tried to get a 1.1.19-gtk1 version of Seamonkey to work inside pupngo but I cant get it to report any plugins - think I still miss some libs...and final ISO gets above 20Mb...
Any chance to use a standalone flash-player that other browsers (ex. links) could point to if needed?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#138 Post by technosaurus »

the 4.3 kernel supports an lzma compressed initrd - so that helps (there is a patch available for xz but the compression is about the same)... just gunzip initrd.gz and then lzma -9 initrd and modify your menu.lst (or equivalent for the iso)

It seems that every gtk1 build of seamonkey (including mine) somehow pulls in extra dependencies - unfortunately much of mozilla is poorly documented so it will probably take several more builds to get the right enable/disable mix - I may eventually end up doing a puppy from scratch where I can better control the build environment and hand select version numbers of packages for size, stability and dependencies. The older static-qt3 version of Opera seems to be the best bang for the buck for now, since this version of flash doesn't require gtk.

Barry compiled a special patched version of swfdec that may also work.

p.s. I also managed to get flash 7.0 to dress up as flash 10.1 - the process should work for flash 9.0 as well & it is still being updated
here is the process:

Code: Select all

#!/bin/sh
wget -c http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp7_archive.zip
unzip fp7_archive.zip
tar -xf fp7_archive/r73/install_flash_player_7_linux_r73.tar.gz
cat install_flash_player_7_linux/libflashplayer.so |sed -e "s/7.0 r73/10.1 r9/g" >/usr/lib/mozilla/plugins/libflashplayer.so
rm -rf fp7_archive.zip install_flash_player_7_linux_r73.tar.gz install_flash_player_7_linux fp7_archive
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#139 Post by technosaurus »

I dug up a precompiled Xvesa from the xfree86 site that is pretty small, seems to work and uses few resources. I already stripped and upx'd the binary in my attachment but the dependencies are only lib{c,m,z}, so it should work just about anywhere as is.

it came from one of the Xtinyx tarballs here:
http://ftp.xfree86.org/pub/XFree86/4.8.0/binaries/
(in case anyone wants the card specific/accelerate versions:
Xchips,Xfbdev,Xi810,Xigs,Xipaq,Xmach64,Xsavage,Xsis530,Xtrident,Xtrio,Xts300)
Attachments
newxvesa.png
(22.13 KiB) Downloaded 1724 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#140 Post by goingnuts »

Just an add-on to the Xvesa collection: Xvesa static build cut out of BL3...
Installed size 850K.

Below compiled via buildroot.
A static build of udev - only udevd is needed but everything included - reduce your memory usage by approx. 1Mb compared to shared build.

squash3.4 (unsquashfs and mksquashfs) static build.

squash4 (unsquashfs and mksquashfs) static build.

sysklogd-1.4.1 static build. Reduces the ram usage from BusyBox´s 1500K to 192K for klogd and 164K for syslogd.

autologinroot static build.
Attachments
autologinroot-ulib_static.tar.gz
autologin static build
(2.58 KiB) Downloaded 503 times
sysklogd-1.4.1.tar.gz
sysklogd-1.4.1-static build.
(71.92 KiB) Downloaded 357 times
Last edited by goingnuts on Mon 04 Oct 2010, 19:28, edited 3 times in total.

Post Reply