pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#561 Post by technosaurus »

our alternative to gtkdialog has been right under our noses (tcl/tk=8.5.X)
tk apps use about the same RAM as rxvt and there are a bunch

tcl

Code: Select all

../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-shared --disable-rpath --disable-load --disable-symbols --disable-langinfo --disable-dll-unloading
tk

Code: Select all

 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-shared --disable-rpath --disable-load --disable-symbols --disable-langinfo --disable-dll-unloading --disable-xft
(standard CFLAGS and LDFLAGS apply)
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:

#562 Post by goingnuts »

technosaurus wrote:maybe it wouldn't be too hard to invert the logic for x11vnc to require -shm to use shared memory instead of -noshm to disable it?

btw, have you been able to build a working Xvesa with tcp removed? I tried but even starting with -nolisten tcp failed ... it seems like maybe something is not ifdef'd. There were a couple of other things that may be easier to do than this if I could just find them - like starting in the highest supported resolution and bpp instead of a fixed one (the default doesn't work well on _all_ systems, but using the highest supported one _should_ ... in theory)
Yes - a small patch to revert x11vnc shm logic should do it.

For the Xvesa thing - not sure what you mean...I have no problems running Xvesa with -nolisten tcp. But if you want to have it as default-built-in I think its the /hw/utils.c and /hw/connection.c that needs patching. Btw: The vnc-3.3.2r2 contains source-tree for a cutdown Xvesa server. I haven't tried to build it as my xmkmf is not working well at the moment - but it might have some hints for the Xvesa build.

The tk/tcl builds nicely with uclibc/tinyX11. I only had to add a few functions (FSSaver.o+ReconfWM.o) to Xlib (or actually added them to libtk8.5.a). The result is a static wish at 1552K and a static tclsh at 745K uncompressed (for both it is smaller that the dynamic linked bins). Had to comment out 3 lines in /usr/lib/tk8.5/tk.tcl

Code: Select all

#event add <<Cut>> <Control-Key-x> <Key-F20> <Control-Lock-Key-X>
#event add <<Copy>> <Control-Key-c> <Key-F16> <Control-Lock-Key-C>
#event add <<Paste>> <Control-Key-v> <Key-F18> <Control-Lock-Key-V>
to get some of the demos running without errors.
At the moment testing in pupngo to see how many of the auxiliary file that can be removed - best guess now is that you will need approx 500K additional.
Unfortunately the widget demo requires msgcat so haven't been able to run that (reluctant to start compiling static version of the gettext monster...) but browse, hello, rmt, rolodex, tcolor and timer works (ixset needs xset which I also miss).

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

#563 Post by technosaurus »

re: tcp - building without -DTCPCONN failed ... I'll try it again though, I may have removed other defines too.

tcl/tk really should just combine altogether they are only a single test away from being able to be a multicall binary
if you do a diff of tclappinit.c and tkappinit.c ... essentially tkappinit.c is tclappinit.c with an extra code block to run the tk interpreter

continuing on further the hwish in hv3 is tkappinit.c with an extra line to run the tkhtml interpreter
(I haven't explored this any further, it may be this way for other compiled tk apps)

... so we could determine which interpreter(s) to run based on basename(argv[0]) as in the other mcbs
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:

#564 Post by goingnuts »

Turns out that msgcat is an internal tcl-function...
Also seems that if you have a static build of tk tclsh is not needed.
So attached a stripped down pet (removed man/encodings/msg etc) with tcl/tk 8.5 static build (uclibc/tinyX11) that runs all demos of tk witout errors in pupngo (no shared libs at all needed). The demos and images-folders can be deleted - saving approx. 900K on disk - but included to have something to test with - leaving us with a total size on disk for tcl/tk approx. 1700K (if wish is upx ultrabrute compressed...).
Now we only need to find all those tk apps to replace the gtk1 apps (editor, ftp, archive, mail, paint, chat etc.).

20130513: Removed attachment as forum does not support file size anymore.
Last edited by goingnuts on Mon 13 May 2013, 18:14, edited 1 time in total.

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#565 Post by PANZERKOPF »

goingnuts wrote: Now we only need to find all those tk apps to replace the gtk1 apps (editor, ftp, archive, mail, paint, chat etc.).
There are some TK apps in Puppy 3 repository:
ftp://ftp.nluug.nl/pub/os/Linux/distr/p ... ackages-3/
Another start point:
http://wiki.tcl.tk/693
SUUM CUIQUE.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#566 Post by sc0ttman »

PANZERKOPF wrote:
goingnuts wrote: Now we only need to find all those tk apps to replace the gtk1 apps (editor, ftp, archive, mail, paint, chat etc.).
There are some TK apps in Puppy 3 repository:
ftp://ftp.nluug.nl/pub/os/Linux/distr/p ... ackages-3/
Another start point:
http://wiki.tcl.tk/693
Maybe gnocl is too heavy for this, and maybe the apps aren't pupngo friendly, but there are some great things here: http://www.pa-mcclamrock.com/papenguinspacks.html

pamcclamrock is on this forum, so you could PM him for the pre-gnocl versions, which were actually made after I requested some gnocl versions - so I know the guy is very helpful!
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

#567 Post by technosaurus »

This is why I never get anything accomplished...

I was in the process of learning tcl/tk and after pouring over several examples, realized a major portion of its power lies in the ability to load modules on the fly (it is still excellent even without dynamic loading).
needed for tcl-gtk-0.5, hv3, filerunner, brlcad and many other top tk apps

This made me rethink the mcb direction - what difference would it make to uses shared versions of the tiny libs?
... my gut check says it could be an overall win, but I would probably end up wanting to have an xz compress squashfs image icluded in the kernel's initramfs so that the entire thing does not get uncompressed with the kernel, but then I would also need bootstrap code to mount the squashfs image on root

so, knowing I would need code that included "squashfs" and "#include <sys/mount.h>" ... I googled it to see what it turned up ... lo and behold I got something that even included unionfs - awesome

http://openpli.git.sourceforge.net/git/ ... l-dm7025.c
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
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#568 Post by Aitch »

Using x11vnc with the Xvesa build with uclibc/tinyX11 seems to fail if Xvesa is missing XTEST extension (and MITSHM if you do not start x11vnc with -noshm switch). If Xvesa is build with -DXTEST and -DMITSHM x11vnc works ok but it seems that the Xvesa is unstable with MITSHM (freeze). So attached a Xvesa with -DXTEST...seems stable after running a couple of days with it.
I don't know if I've got the wrong end of the stick here, but I connect this with a post I made the other day, and wonder if there's something useful here with freenx?

http://www.murga-linux.com/puppy/viewto ... 120#600120

Aitch :)

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

#569 Post by goingnuts »

PANZERKOPF & sc0ttman: Nice refs - supernotepad-2011 works but the ones needing dyn load of ext libs does not.
This is why I never get anything accomplished...
I know the feeling - would be nice to have a department full of developers to whom you could give your ideas and get the job done...and then...maybe not...might take the fun out of it.
I tried to do a version of wish with the load enabled, as I hoped it was a loading tech and not related to static/dynamic builds. I did not succeed the build though...but still think/hope that there are a way out to link static build external libs...?

Aitch: I will look into that - thanks!

Meanwhile I have spend some time trying to build gqview with uclibc/tinyX but seems to need a lot of patching (probably of the gdk/gtk/pixbuf-libs). So remembered trying out danpei some time ago and did a quick build test: Builds nicely and honestly: Much more clean interface than gqview in my opinion. So attached static build of danpei.

As alternative to learn tcl/tk we could backport gtkdialog to gtk1. I did a first try and got a static build that actually run some of the scripts correctly. Used gtkdialog-0.56 as a starting point and uclibc/tinyX11 and just deactivated what was in the way of functions and defines during compile and linking...

All in all it might not be too difficult - the initial linker errors below - not a long-long list I think:

Code: Select all

automaton.c:(.text+0x6cc): undefined reference to `G_CALLBACK'
automaton.c:(.text+0x6d6): undefined reference to `G_OBJECT'
automaton.c:(.text+0x6e3): undefined reference to `g_signal_connect'
automaton.c:(.text+0x709): undefined reference to `G_CALLBACK'
automaton.o: In function `button_pressed':
automaton.c:(.text+0x10c1): undefined reference to `G_OBJECT'
automaton.c:(.text+0x10d0): undefined reference to `G_CALLBACK'
automaton.c:(.text+0x10ea): undefined reference to `G_OBJECT'
automaton.c:(.text+0x10f9): undefined reference to `g_signal_connect_swapped'
automaton.c:(.text+0x110f): undefined reference to `G_CALLBACK'
automaton.c:(.text+0x1129): undefined reference to `G_OBJECT'
automaton.c:(.text+0x1136): undefined reference to `g_signal_connect'

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#570 Post by PANZERKOPF »

goingnuts wrote: Meanwhile I have spend some time trying to build gqview with uclibc/tinyX but seems to need a lot of patching (probably of the gdk/gtk/pixbuf-libs). So remembered trying out danpei some time ago and did a quick build test: Builds nicely and honestly: Much more clean interface than gqview in my opinion. So attached static build of danpei.
IMHO gtksee is better. It recognizes more graphic formats.

Source is attached. (Rename it to *.xz).
SUUM CUIQUE.

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

#571 Post by technosaurus »

I reduced the sizes of some of the danpei xpm icons a bit (enough to save ~20kb in the compiled binary size)

which reminded me - I redid a bunch of the icons for the other gtk apps (png format)
... uploading both

I may as well describe what I did to shrink them

open with mtpaint
Image -> convert to rgb
Image -> convert to indexed
check Min Max Quantize and Floyd Steinberg
change the number at the top to 92 (maybe 93?) or less
save as whatever (works for at least xpm and png, possibly others)

(use your best judgement based on the image - lower number of colors reduces size some, but may end up looking like trash if it gets too low - most small icon pixmaps look ok at 16 colors)

this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half (not including the reduction for each color ... ~16B ea. I think)

Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.
Attachments
pixmaps.tar.gz
(15.11 KiB) Downloaded 361 times
danpei_icons.tar.gz
(9.28 KiB) Downloaded 358 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].

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#572 Post by wjaguar »

technosaurus wrote:this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half
With mtPaint, it is 64 colors or less.
Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.
mtPaint doesn't even try to preserve transparent color when quantizing. It's best to set transparent color's palette slot to some wildly different RGB color (say magenta or green) before converting to RGB - and set transparent index to that palette color (whichever one it is now) after converting back to indexed.
All appearance of transparency being preserved is from when transparent color is at once the most prevalent and at index 0 - then max-min algorithm will place it at index 0 again.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#573 Post by Aitch »

Hi guys
Something else which may be useful, that I recently stumbled upon - underdog, that used to be in 2 series puppies, and Barry has now brought back

Basically, it is a script which allows a linux partitition to be added to the lower layer, and brought to the top layer so puppy can access it

I stumbled upon info about underdog, dated back to 2006, before I got into using puppy, and Barry picked up on it
He gave a really useful link to a 'How puppy works' page, which I hadn't seen referenced before, also, which people may find useful, bearing in mind, that changes have been made

The underdog bit: In the section on Architecture overview,
What the above diagram is intended to convey is that the bottom layer is a partition, not the "underdog.lnx" file itself. File underdog.lnx is just a text file, containing the name of a partition, for example "hda1".
At bootup Puppy will read underdog.lnx and will mount the partition as the bottom layer. If that partition happens to have a Linux distro installed in it, then the entire distro filesystem will "show through" on the top layer of Puppy's unionfs.

It will look like a normal Puppy, running JWM window manager or whatever, same desktop, but everything in the underlying distro is available to be executed. All the applications, compile environment, package manager, etc.
The actual underdog code, as used in early Puppy versions is shown in the Initial ramdisk section, where the code is listed for anyone wanting to try it,
[though the usual caveats apply...don't blame me if you break something]

http://www.murga-linux.com/puppy/viewtopic.php?t=13750

http://puppylinux.com/development/howpuppyworks.html

http://www.murga-linux.com/puppy/viewtopic.php?t=13750

Aitch :)

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

#574 Post by goingnuts »

Attached the first try to backport gktdialog to gtk1. Do not expect everything working but main things should. Included a test-script (gtk_button) demonstrating what seems to work. Only xpm-images supported, edit-widget works but do not catch content yet. Shipped as static build and with images for the "stock"-icons.
If you need the present source code or if you would like to help improving the things further pm me.
Attachments
snap0000.png
And the thing running the test script...
(68.81 KiB) Downloaded 1130 times

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

#575 Post by technosaurus »

goingnuts wrote:Attached the first try to backport gktdialog to gtk1.
Excellent! I can work with that.

NOTE: it is extremely faster to use

Code: Select all

echo "$MAIN_DIALOG"|gtkdialog -s
Thunor has corrected this to some extent in gtkdialog4 but here is an example that shows the difference (beginnings of a tar frontend)

Code: Select all

#!/bin/sh
MAIN_DIALOG='<wtitle>Test of backported gtkdialog 0.58.11</wtitle>
<vbox>
<table><variable>TABLE</variable>
	<label>File Name          |Size   |Date</label>
'`busybox tar -tvf $1 | busybox awk '{print "<item>" $6 "|" $3 "|" $4 "</item>"}'`'
	<action>echo You selected $TABLE</action>
</table>
<hbox>
	<button ok></button>
	<button cancel></button>
</hbox>
</vbox>'
echo "$MAIN_DIALOG"|gtkdialog -s
#now see with VAR
export MAIN_DIALOG
gtkdialog --program MAIN_DIALOG
we get gdk warnings for the xpms, but a fix is suggested here:
http://mail.gnome.org/archives/gtk-list ... 00270.html
... but maybe we can just ifdef warnings from the sources altogether

should we call it gtkdlg1 (or whatever) to avoid name conflicts in case others want to use it?

I got some weird characters at the beginning of usage, but other than that, seems to be working nicely.

to handle the messages etc... this template should work

Code: Select all

gtkdialog --program MAIN | while read LINE || [ "$LINE" ] ; do
case "$LINE" in
#custom parameters here
  *=*)eval $LINE
  *)echo "$LINE"
esac
done
Edit more notes: it doesn't try to use pixmap path (I wondered why you specified the full paths)
this and others can be set in the gtkrc file (I am attaching the full gtk1 tutorial since it is hard to find these days) which has this in section 21
When your application starts, you should include a call to:

void gtk_rc_parse( char *filename );
Attachments
GTK-1.2-tutorial.tar.gz
(151.14 KiB) Downloaded 344 times
Last edited by technosaurus on Fri 03 Feb 2012, 05:06, edited 2 times 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:

#576 Post by goingnuts »

I have started a new thread for the gtkdlg1 backport...here

User avatar
antiloquax
Posts: 405
Joined: Fri 27 Jan 2012, 09:17

#577 Post by antiloquax »

This may be a stupid question, sorry.
I can boot into PupNGo. I've loaded the GUI sfs. But what command do I issue to start the GUI?
I've had a look using defaultfilemanager, but couldn't see anything that worked!
thanks,
mark
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.

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

#578 Post by goingnuts »

Try "xwin" - depending on which version you use - but if you loaded the GUI-sfs via the firstboot script I guess it states
"If you have just installed the GUI_412.sfs type 'xwin' to start the graphical user interface" .. or something like that.
If it is one of the very first versions it might be 'startx'...
Hope you succeed.

User avatar
antiloquax
Posts: 405
Joined: Fri 27 Jan 2012, 09:17

#579 Post by antiloquax »

Many thanks! I must have missed that message ... :oops:
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#580 Post by Aitch »

goingnuts/techno

I just came across a window manager called awesome

Any use for this project? it uses C and Lua, AFAIK

http://awesome.naquadah.org/

Aitch :)

Post Reply