Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 30 Oct 2014, 10:39
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
pUPnGO - 6Mb ISO - Basic Building Block Puplet
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 16 of 58 Posts_count   Goto page: Previous 1, 2, 3, ..., 14, 15, 16, 17, 18, ..., 56, 57, 58 Next
Author Message
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Thu 06 Jan 2011, 14:53    Post_subject: otf_sfs in puppy 5  

goingnuts wrote:
Quote:
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).


Quote:
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
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Thu 06 Jan 2011, 15:29    Post_subject:  

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

#!/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*

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Thu 06 Jan 2011, 15:30    Post_subject:  

dbl post
Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Thu 06 Jan 2011, 15:31    Post_subject:  

dbl post
Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Thu 06 Jan 2011, 15:45    Post_subject:  

dbl post
Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Thu 06 Jan 2011, 15:47    Post_subject:  

dbl post
Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Fri 07 Jan 2011, 01:21    Post_subject:  

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:
#!/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...
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Fri 07 Jan 2011, 10:22    Post_subject:  

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:
[ ! -f /usr/lib/libgtk-x11-2.0.so.1 ] && loadgtk2


Thanks for this exchange - I had almost completely forgotten this train of thought.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Fri 07 Jan 2011, 12:10    Post_subject:  

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?
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sat 08 Jan 2011, 01:15    Post_subject:  

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
freememc.tar.gz
Description 
gz

 Download 
Filename  freememc.tar.gz 
Filesize  11.92 KB 
Downloaded  274 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Sat 08 Jan 2011, 02:50    Post_subject:  

Quote:
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!
freememapplet_xlib-0.1.2.tar.gz
Description  freememapplet_xlib-0.1.2 bin and moded source c++2c
gz

 Download 
Filename  freememapplet_xlib-0.1.2.tar.gz 
Filesize  9.87 KB 
Downloaded  295 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sun 09 Jan 2011, 02:10    Post_subject:  

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:
#!/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?
getgui-202-2.pet
Description 
pet

 Download 
Filename  getgui-202-2.pet 
Filesize  28.06 KB 
Downloaded  280 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Wed 12 Jan 2011, 18:53    Post_subject:  

technosaurus wrote:

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

Yes... Very Happy

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... Very Happy

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... Smile
pmnet0.2.tar.gz
Description  pmnet 0.2 (blinky "alternative")
gz

 Download 
Filename  pmnet0.2.tar.gz 
Filesize  16.52 KB 
Downloaded  246 Time(s) 
pmfree0.2.tar.gz
Description  pmfree 0.2 (based on freememapplet_xlib-0.1.2)
gz

 Download 
Filename  pmfree0.2.tar.gz 
Filesize  8.35 KB 
Downloaded  243 Time(s) 
pmfree_pmnet.png
 Description   
 Filesize   6.28 KB
 Viewed   1061 Time(s)

pmfree_pmnet.png


Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Fri 14 Jan 2011, 02:55    Post_subject:  

Simple IRC client (using root tail & getgui, but can easily swap out tail and read in a terminal or other input/output methods)
Code:
#!/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:
#!/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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 782

PostPosted: Mon 17 Jan 2011, 11:43    Post_subject:  

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 Smile
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:

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.
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 16 of 58 Posts_count   Goto page: Previous 1, 2, 3, ..., 14, 15, 16, 17, 18, ..., 56, 57, 58 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1108s ][ Queries: 12 (0.0144s) ][ GZIP on ]