pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

otf_sfs in puppy 5

#226 Post by emil »

goingnuts wrote:
Do not work in P431 but could be modified to do so (different squashfs/aufs-version I think). Works only with aufs (but same functionality could be made with unionfs using unionctl).
Worked a little more with otf_sfs_loader. Added:
...
#check aufs version (for future P431 comp.)
hi - I tried to use the OTF_SFS Loader with Lupq-511, but it wont run because aufs filesystem check fails. You write that it possibly could be modified, do you have any specific hint how and where?
thanks in advance!
emil

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

#227 Post by goingnuts »

Might as well use this area to store build code for the freememapplet in previous post. Here is the source
And build script:

Code: Select all

#!/bin/sh
rm -f freememapplet.o freememapplet
ln -s $(g++ -print-file-name=libstdc++.a)
g++ -static-libgcc -fno-rtti -fno-exceptions -L. -L /usr/X11R7/lib -lX11 -lXpm -o freememapplet freememapplet.cc
strip --strip-all freememapplet*
Last edited by goingnuts on Fri 07 Jan 2011, 22:09, edited 3 times in total.

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

#228 Post by goingnuts »

dbl post
Last edited by goingnuts on Fri 07 Jan 2011, 05:26, edited 1 time in total.

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

#229 Post by goingnuts »

dbl post
Last edited by goingnuts on Fri 07 Jan 2011, 05:25, edited 1 time in total.

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

#230 Post by goingnuts »

dbl post
Last edited by goingnuts on Fri 07 Jan 2011, 05:25, edited 1 time in total.

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

#231 Post by goingnuts »

dbl post
Last edited by goingnuts on Fri 07 Jan 2011, 05:24, edited 1 time in total.

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

#232 Post by goingnuts »

emil wrote: hi - I tried to use the OTF_SFS Loader with Lupq-511, but it wont run because aufsfilesystem check fails. You write that it possibly could be modified, do you have any specific hint how and where?
thanks in advance!
emil
gyro has done sfs-load/unload scripts that works in P431 - here.
Remember that the sfs-file should be outside the current / branch. I started to implement it in present otf-sfs-loader but aufs2 reports different than aufs1 and maybe better to do a otf-sfs-script for 431 and dont make a common 412/431-script.
Anyway gyros script is an excellent starting point as it basically do the same as my script - load and unload sfs files.

Below a small wrapper for pupngo that loads GUI_412.sfs present on boot-cd after cd-boot when xwin is called (and without savefile) - name it whatever and start xwin via the script:

Code: Select all

#!/bin/sh
mount /dev/sr0 /mnt/cdrom
otf_sfs_loader.sh /mnt/cdrom/GUI_412.sfs
exec xwin
exit
Same principle could be expanded to jwm-menu...sort of load relevant application-sfs when needed...just for inspiration...

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

#233 Post by technosaurus »

I wrote a similar script when I was working on 4.4, but lost it when gparted dumped my ntfs drive during a resize operation. There were 2 significant differences though:

1. I placed the loader script in /usr/local/bin (because its near the end of $PATH) with the same name as the executable in its <application>.desktop file
2. I then preemptively put the <application>.desktop file in /usr/share/applications (causing a menu entry to be created)
{{3.I should have probably added any include mime type entries to $HOME/Choices/...}}
{{4. the final line that executes the command should get a $@ to allow for usage if called by rox or the user with an argument}}

the result was that if an application's sfs was _not_ loaded, the script would be executed (which loads the application and then runs the program), but if the sfs was already loaded, it would just run the actual program (because it is higher in the $PATH) ... pretty simple and reduces ram usage and boot times

possible issues: I had heard (I think on Barry's blog) that mounting too many loop devices could significantly slow things down. I didn't see a big difference, but I was already considering a rewrite for app categories that grouped apps according to dependencies in some type of dependency based hierachy... X11 only, gtk only, gtk & c++ & ?, etc... I think this issue is largely overcome in recent kernels though, so it may even be possible to use ldd to get the library filenames to use, such as:

Code: Select all

[ ! -f /usr/lib/libgtk-x11-2.0.so.1 ] && loadgtk2
Thanks for this exchange - I had almost completely forgotten this train of thought.
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:

#234 Post by goingnuts »

technosaurus wrote:Thanks for this exchange - I had almost completely forgotten this train of thought.
Thanks for the response - you are (as always) 3-10 steps ahead! The principle of using placement in PATH is perfect. I do not see any performance decrease loading up to 30 sfs-files - but I do see an increased demand for ram...unless the sfs-loading is used as as package-manager-system users rarely have need for having more than 30 sfs loaded - and performance might also be depending on the size of the sfs?

I have challenged the getgui a little and might include it later in the dialogfunctions.sh but only using its menu, input & message functions as its file-function chokes if number of files is high (haven't tested if the same occurs for the menu) - would be nice if that could be fixed but it seems to be 5-6 years since the developer worked on it.

Concerning the freememapplet it really should be possible to make a much smaller application - this site has a huge collection of tray-applets and some of them do not depend on libstdc++.
For the idea of having a script that relink xpm-images you would still need a X-application to show the xpm?

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

#235 Post by technosaurus »

I hacked out all of the C++ so freememapplet is in c only (has to be swallowed still) ... including the source since it was compiled in wary
Attachments
freememc.tar.gz
(11.92 KiB) Downloaded 490 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:

#236 Post by goingnuts »

I hacked out all of the C++ so freememapplet is in c only...
Thanks! Already in service in my main P412. For whatever reason it did not show up in pUPnGO (it is running but don't show). So I followed your modifications to the source of freememapplet_xlib-404 and applied it to the source of freememapplet_xlib-0.1.2. And this one shows in pUPnGO. Attached the binary and the modified source. Really impressed that those "small" mods of source reduce demand for deps so much!
Attachments
freememapplet_xlib-0.1.2.tar.gz
freememapplet_xlib-0.1.2 bin and moded source c++2c
(9.87 KiB) Downloaded 498 times

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

#237 Post by technosaurus »

yeah the code was kinda old to begin with - lots of gcc warnings
only the error messages needed changed - which leads me to believe that they were added by someone other than the initial dev that didn't know any C (I don't know a lot so the error messages are now more generic and go to stderr - never to be seen unless you run it from the command line for debugging)

I fixed getgui by hardcoding it to use ls -C -a -F -w 130 as the default instead of just ls -C
(you can do it with a command line argument as is too)

which gives you the capability for a little file manager

Code: Select all

#!/bin/sh
[ $1 ] && cd $1
A=`getgui "Pick a directory or file to continue:    dir/, symlink@, executable*" -filepick`
[ -d $A ] && $0 $A || defaulthandler $A
Edit: may need to modify default handler for the symlinks ending in @

Edit - I compiled uClibc++ <patched> in wary - only a 70kb pet and geany-0.20 compiled cleanly against it. .... anyone interested?
Attachments
getgui-202-2.pet
(28.06 KiB) Downloaded 499 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:

#238 Post by goingnuts »

technosaurus wrote: Edit - I compiled uClibc++ <patched> in wary - only a 70kb pet and geany-0.20 compiled cleanly against it. .... anyone interested?
Yes... :D

I have worked a little further on the c-converted freememapplet ending out in the attached poor-mans-freemem:
# Reduced size of images - now only green, red and lightred - single colour.
# it now takes the argument given
# introduced argument -k: control if you want to kill other running apps
# introduced launch command on mouse-click
# fixed a bug (?) that prevented -u (Set update interval) from being used

And probably introduced new bugs and malfunctions as this is the first time I am doing Xlib-code... :D

Some figures:
pmfree: size of bin 9K
pmfree: size of all needed libs 1940K
org freememapplet: size of bin 20K
org freememapplet: size of all needed libs 3276K


Update 130111: Changed Xevent code to be independent of the update delay (mouse-click independent of update-delay).

Also uploaded pmnet - a "replacement" of blinky
pmnet: size of bin 14K
pmnet: size of all needed libs 1940K
org blinky: size of bin 39K
org blinky: size of all needed libs 8854K

Update: 170111: Uploaded new versions: now background color can be chosen and commands can be assigned to all 3 mouse-buttons. Source code and build script included.
NB: You do not need to install icons - they are included in the bin... :)
Attachments
pmnet0.2.tar.gz
pmnet 0.2 (blinky &quot;alternative&quot;)
(16.52 KiB) Downloaded 446 times
pmfree0.2.tar.gz
pmfree 0.2 (based on freememapplet_xlib-0.1.2)
(8.35 KiB) Downloaded 456 times
pmfree_pmnet.png
(6.28 KiB) Downloaded 1135 times
Last edited by goingnuts on Mon 17 Jan 2011, 20:44, edited 1 time in total.

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

#239 Post by technosaurus »

Simple IRC client (using root tail & getgui, but can easily swap out tail and read in a terminal or other input/output methods)

Code: Select all

#!/bin/sh
[ $1 ] && USER=$1 || USER=puppy$RANDOM$RANDOM
touch /tmp/irclog /tmp/ircbot
root-tail /tmp/irclog
echo NICK $USER'
USER '$USER' +iw '$USER' :ashirc
JOIN #puppylinux '$USER > /tmp/ircbot

ircmsg(){ sleep 3
while true
do
echo 'PRIVMSG #puppylinux :'`getgui "Enter an IRC message" -keyin 30` >>/tmp/ircbot
done
}

ircpong() { while (sleep 100) do echo 'PONG' >>/tmp/ircbot; done }

ircmsg & ircpong &

tail -f /tmp/ircbot | telnet irc.freenode.net 6667 | while true
do read MSG || break
echo $MSG >> /tmp/irclog
done
Still needs some work with killing input loops
a little better with just Xdialog

Code: Select all

#!/bin/ash
. /etc/DISTRO_SPECS
[ $1 ] && USER=$1 || USER=${DISTRO_FILE_PREFIX}${DISTRO_VERSION}${DISTRO_MINOR_VERSION}user-$RANDOM
echo NICK $USER'
USER '$USER' +iw '$USER' :ashirc
JOIN #puppylinux '$USER > /tmp/ircbot;echo starting irc > /tmp/irclog
while (! grep QUIT /tmp/ircbot) do tail -f /tmp/ircbot |telnet irc.freenode.net 6667 >> /tmp/irclog; done &
while (! grep QUIT /tmp/ircbot) do Xdialog --title "#puppylinux irc" --tailbox /tmp/irclog 30 99; done &
while (! grep QUIT /tmp/ircbot) do sleep 200;echo 'PONG' >>/tmp/ircbot; done &
while (! grep QUIT /tmp/ircbot) do
	A=`Xdialog --stdout --title "AshIRC message dialog" --inputbox "Enter an IRC message for #puppylinux" 0 0`
	[ "$A" == "" ] && echo QUIT >>/tmp/ircbot || echo 'PRIVMSG #puppylinux :'$A'.' >>/tmp/ircbot
done
killall tail
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:

#240 Post by goingnuts »

Ahh - did use a lot of time getting the "Simple IRC client" to work in pUPnGO...turn out that I was running pmconky.sh...it kill all root-tails every 10 second :)
Also some font issue with getgui - installed courB12-ISO8859-1.pcf and that one was also solved.

Still some interference between pmconky.sh and "Simple IRC client" but its seems to run ok. A nice way to use that big empty desktop.

Below the change in pmconky.sh (just using pidoff instead of killing all root-tail):

Code: Select all

kill $PID 2&1> /dev/null 
#killall root-tail 2> /dev/null 
/usr/sbin/root-tail -g 50x14-10+10 -font fixed /var/log/test,black & #-reload " 5 pmconky.sh" 
PID=$(echo $!)
The ggprocesss works fine if ps-FULL is present but seems to fail if only BB is there. Might need a switch reflecting witch one to use...

Been working on adding all 3 possible mouse-clicks to pmfree and pmnet - download updated in previous post. Getting transparent background on icons for pmnet is not working - I just cant figure out the coding.

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

#241 Post by goingnuts »

Its birthday time - 1 year with pUPnGO today...

Reported downloads the last 5 days of pUPnGO_V412_041210.iso is close to 1200! I do not know if this is an error, friendly or hostile activity but I doubt it represent a major increased demand for pUPnGO in the world.

Nevertheless, thanks for all the response and inputs during this first important year of living!
Kim
Attachments
baby-tux.png
(41.4 KiB) Downloaded 1363 times

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

happy birthday!

#242 Post by raffy »

Well, Happy Birthday!

You're doing something right here, so thanks and keep up the good work. :D Thanks to the contributors, too.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

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

#243 Post by goingnuts »

dosbox in pupngo...
Puppyt has in his thread "Install basic Puppy on a computer with 16 Mb RAM" some thoughts about using linux+dosbox and if there are any advantage above running pure dos on ancient hardware. Guess the right answer is no.
Anyway it got me thinking on all those genius games I used to play in dos and I found a collection on a forgotten part of my hd (remember names like 7CITIES, BI2, DOTT, Tycoon, UFO, Dune, Warlord2?). Used Patriots dosbox , added some alsa-stuff and a few missing libs, created a sfs-file that loaded fine after boot in pUPnGO. Started out with 24Mb in qemu - dosbox runs - but get killed when trying to run old dos game Warlord2. Second went up to 64Mb - same story. At 128Mb ram the game runs - slow - but that might be emulator qemu emulating dos..
So I guess dosbox is a hungry fellow and its better to use pure dos for those old dos-games.

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#244 Post by starhawk »

Nice little distro, here. Better (and smarter!) than a teacup poodle, if I may say so myself :D FWIW, I was using pUPnGO v412 (the ~28MB ver)

Two questions:

(1) How hard would it be to stuff in arachne (browser), Siag Office, and something to connect to a wireless network*?
(2) About what would you say the absolute minimum requirements would be for running pUPnGO with those added in?

*I'd need something that is compatible with the p54usb driver in order to get WiFi. Unless someone wants to send me a low-profile PCI Wi-Fi card... I don't have the $$$ to buy one myself :(

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#245 Post by Puppyt »

goingnuts -
I really appreciate you looking into that DOS issue further for me and like-minded stargazers. (Poor devils.) I think I remember a discussion somewheres on the forum (with notables like Bruce_B, and Sage) yonks ago, and DMcCunney discussed it further in the "Introducing PULP" thread about the integration of DOS and Linux, and the futility thereof. Thanks for updating the issue - sorry that the result was negative.
I won't muddy the investigation by suggesting Dosemu - you've already considered that issue re Patriot's thread which contrasts the costs and benefits of the 'latest' DOSbox and Dosemu. Nor would I seriously suggest turning the approach inside-out with a pUPnGO4DOS - you've already stated that the purpose here is not about producing a lite Puppy distro when other, lager puplets could serve that role already. Besides, it looks like an uncomfortable mouthful.
I wonder however whether there might be performance differences if pUPnGO was mounted on a ext2-, NTFS- or FAT (possible?)- formatted drive? Please forgive me if such 'foundation' issues have already been debated here or elsewhere,

And a much-belated Happy Birthday, pUPnGO! Loved working with it's GUI and text-browser in 412_041210.iso on a Toshiba Satellite Pro 430CDS with 32 MB RAM. Little discoveries on how to do things everywhere - just like my very first experiment with Puppy! Puppy love all over. Keep up the good work!
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

Post Reply