pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#211 Post by goingnuts »

dbl post

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

#212 Post by sc0ttman »

goingnuts wrote:sc0ttman: Can you start (and view) pmconky.sh after jwm has started via rxvt? If so jwm has the <StartupCommand></StartupCommand> where you might put 'exec pmconky.sh'
I tried your suggestion, not sure I did it right, but what I did, didn't work! :(

Also, I noticed your automount.sh script from the jwm_drives thing, is stopping me from being able to successfully create a save file..

the whole process goes through, but the writing part doesnt actually work.
(just in case you wanted to know.. )
im gonna try some changes either way.. so specifically not asking for support...

EDIT:

goingnuts, in case you care, i stopped automount from running in pupmode 5, now I can create save files...
then i modded create_jwmrc_drives.sh so that when you click on a drive, it runs 'drives_mounter.sh $1' which mounts the drives, if not mounted...
(my script 'drives_mounter.sh' is a near copy of cd_mounter.sh, but it takes $1)

But when automount doesnt run, I must hack 'create_jwm_drives', so that it successfully mounts the drive on which the pup_*.sfs file is kept..
(I check for pupmode then use either /initrd/mnt/dev_ro2 (no save file) or `readlink /mnt/home` (with save file)

(Not checked cd_mounter.sh yet, might have to do the same)

did you have the same problem with create_jwm_drives if you dont automount?
(is that why you use automount?)
[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:

#213 Post by technosaurus »

simple console calculator

Code: Select all

#!/bin/sh
A=`awk "BEGIN{print $1}"`
A=`dialog --stdout --inputbox . 0 0 $A`
[ $A ] && $0 $A
or change to dialog to Xdialog if you want

example:
calc '8+9*(8/2)+sqrt(144)-sin(1)'
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-drives - reviewed

#214 Post by goingnuts »

As a response to sc0ttman´s findings using jwmrc-drives I reviewed the code:
Icons now dependent on file-system and using 9menu a small pop-up-window shows relevant choices (mount, umount/explore or cancel). Not really pretty as jwm insist to manage the window...
But 9menu (12K installed) has potential of being used for other purposes.
Attachments
jwm_drives_new.png
(7.02 KiB) Downloaded 1985 times
jwmdrives_new.tar.gz
jwm_drives_new
(30.89 KiB) Downloaded 600 times

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

#215 Post by technosaurus »

if anyone wants to make it "pretty" you could add a notitle noborder group to jwm
http://joewing.net/programs/jwm/config.shtml#groups
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:

#216 Post by goingnuts »

technosaurus: Just what was missing - thanks!
Just added:

Code: Select all

<Group>
<Class>9menu</Class>
<Name>9menu</Name>
<Option>notitle</Option>
</Group>
Attachments
jwm_drives_new.png
(5.86 KiB) Downloaded 1461 times

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

otf_sfs_loader

#217 Post by goingnuts »

Worked a little more with otf_sfs_loader. Added:
#autoconfig max loops and creation of loops
#check of disktype instead of relying on extension (now loads tcz)
#autoconvert squashfs 4 to 3 (and vice versa for future P431 comp.)
#check aufs version (for future P431 comp.)
#user setup (modify max number of squashfs-files that can be loaded)
#now takes arguments from command line (or drop a bunch of squashfs-files on the script and auto load)
#adapted ldconfig and fixmenus/restart jwm from gyros sfs_load-script for P431)

Included static builds of mksquashfs vers. 3 & 4 + unsquashfs vers. 3 & 4.
Also included rc.otf_sfs that will reload all the squashfs-files loaded at shutdown.

Still on the draft-level...

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

#218 Post by technosaurus »

getgui is a nice little (actually quite extensive) replacement for *dialog and other *message tools (I modified the source to change the ugly yellow to a medium gray)
manpage - examples
  • some screenshots
ImageImageImage
ImageImageImageImage
ImageImage
ImageImageImage
Attachments
getgui-202.pet
(28.03 KiB) Downloaded 571 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:

#219 Post by goingnuts »

technosaurus: That is a nice finding! I might try to implement it in my dialogfunctions.sh. Total size (including dependencies) is around 1900K whereas total size for Xdialog is around 2700K (static gtk1-version) and around 8800K for the version from P412. And the dependencies are identical to the ones jwm needs... :D

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

#220 Post by technosaurus »

the developer of getgui (Steve Grubb) has some other pretty nice/lite tools as well:
http://sourceforge.net/users/fufufini - getgui, lxlogo, midriff, ploticus, quisp, shsql ...
While I am promoting overlooked (Non-Puppy) devs, I should put a plug in for:
Angel Ortega http://triptico.com/software/
Michael Cardell Widerkrantz http://www.hack.org/mc/hacks/
Valery Reznic http://sourceforge.net/users/valery_reznic/
kornelix??? http://kornelix.squarespace.com/ ... the name escapes me, though I have communicated via email after submitting some UI patches (the only C++ programmer in my list)

We really should have a wiki page for these guys and some of the Puppy devs too.

Not so overlooked but worth looking at almost any code they (re)write:
Fabrice Bellard http://bellard.org/
Rob Landley http://landley.net/hg/
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:

#221 Post by technosaurus »

here is the calculator ported to getgui

Code: Select all

#!/bin/sh
A=`awk "BEGIN{print $1}"`
A=`getgui calculator -keyin -initval $A`
[ $A ] && $0 $A
and a minimal process killer gui

Code: Select all

#!/bin/sh
L=`ps -a |grep -v PID |awk '{print $1"\t\t"$4}'`
kill `getgui -title "ggProcess" -msg "Select process to kill" -selectbox "PID    CMD_NAME\n$L" -buttons "Kill|Close" -okstr Kill |cut -d " " -f1`
Attachments
ggprocess.png
(6.98 KiB) Downloaded 1301 times
calc.png
(3.11 KiB) Downloaded 1326 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:

freememapplet

#222 Post by goingnuts »

I have been missing freememapplet in the pupngo GUI-part...but it needs so many libs...
Managed to link libgcc and libstdc++ static and this leaves freememapplet with dependencies already present. But binary goes from 20K to 524K! UPX-ed it gets down to 155K. Still a lot just to show what it shows. But here it is if anybody misses it.
Changed font to fixed and included the 3 xpms needed.
Attachments
freememapplet.tar.gz
freememapplet static libgcc/libstdc++
(156.11 KiB) Downloaded 496 times

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

#223 Post by technosaurus »

Thanks - it does come in handy to know why things have started to slow down and even fail (the -flto flag in my new gcc compile uses ~3X the disk space as without it -which is actually useful to lower ram usage when it is not running in RAM like I typically do)
Compiling c++ for size is a daunting, sometimes painful task if you want to link statically with libstdc++ (similar to glibc, lots of inlining makes it rather large)
for c++ apps you can try compiling with -fno-rtti and -fno-exceptions added to the CXXFLAGS as well as doing the final link with gcc instead of g++ and linking libsupc++ instead of libstdc++

Note: When compiling with -fno-exceptions, if you get an error refering to exceptions, you can usually remove the catch code that gcc refers to without affecting operation ... maybe just do a print to stderr in its place

If you still aren't satisfied with your results there are some alternatives.

I have tried uclibc++ with uclibc and it worked great (it uses a gcc wrapper), but have been meaning to try it with glibc or alternatively stlport or the seemingly more promisingustl

here is one example program I compiled statically with uclibc and uclibc++
http://www.murga-linux.com/puppy/viewtopic.php?t=60395
(it was roughly the same size as the shared glibc version)

On a side note I think it would be an interesting project to make a tray applet frontend that all it does is refresh icons at some periodicity and run an application when clicked (maybe add a right click later)
This would allow one process to handle them all and conserve RAM

Code: Select all

trayapplet - copyleft 2011 technosaurus
    usage:
# trayapplet icon1:refreshtime:leftclickcommand:rightclickcommand icon2
default values: X seconds, no command, and start/stop/help/about menu
this would allow the icons to be updated using a shell script (by changing a symlink, regenerating the icon etc...) btw I compiled ploticus (same maintainer as getgui) last night - it is EXTREMELY fast at generating images - no extra dependencies either - will post if interested ... did several different versions with various combinations of SVG, png, X11, ps, gif enabled ranging from <300k to almost 600k, but all are really fast and light ... I may try to tweak mtcelledit to use ploticus instead of mtcellplot
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].

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#224 Post by emil »

goingnuts:
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 aufsfilesystem check fails. You write that it possibly could be modified, do you have any specific hint how and where?
thanks in advance!
emil

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

otf_sfs in puppy 5

#225 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

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.

Post Reply