The time now is Tue 21 May 2013, 07:23
All times are UTC - 4 |
|
Page 28 of 50 [737 Posts] |
Goto page: Previous 1, 2, 3, ..., 26, 27, 28, 29, 30, ..., 48, 49, 50 Next |
| Author |
Message |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 05 Aug 2011, 23:52 Post subject:
|
|
No, init has similar code, but I made a small static version that doesn't need Xlib at all.(getenv DISPLAY instead)
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sat 06 Aug 2011, 01:37 Post subject:
|
|
Cool! Any chance to have it replace xinit? Taking args as xinit I mean? Then one could symlink waitfordisplay to xinit without changing any other code/scripts....
Edit: Might just use a script like below (not tested): | Code: | #!/bin/ash
XINITRC="$1"
COMMAND="X $(echo $@ | cut -d " " -f3-)"
"$COMMAND" &
waitfordisplay
exec "$XINITRC" |
replacing the xinit in command:
xinit /root/.xinitrc -- -screen ${VIDEOMODE} -shadow -mouse /dev/${MOUSEDEVICE},5
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 06 Aug 2011, 04:59 Post subject:
|
|
I wrote a little C proggie to quick autostart X, but I set it to be able to change the window manager instead. If you fixed the wm to jwm, you could use the argv for the X server.
EGGSACK is the shell equivalent of command &
EGGSACKWAIT is similar to command && ...
SHIFT is similar to shift in shell, but requires an integer arg for # of shifts
| Code: | /* Notes
* no need for getenv/setenv PATH because execvp will automatically try /bin:/usr/bin
* this program will run Xvesa with jwm if no arguments are passed, but
* it requires Xvesa, waitfordisplay and jwm to exist in /bin:/usr/bin
* usage: quickX [wm <arg for display :0>]
* Copyright 2011 Brad Conroy
* License: GPL2
*/
#include <unistd.h>
#define EGGSACKWAIT(a) ({int s,p;if((p=fork())==0){execvp(a[0],a);}else{while(wait(&s)!= p);}})
#define SHIFT(i,a) ({ int j=0;while(a[j] != NULL){a[j]=a[j+i];j++;}})
#define EGGSACK(a) ({if((fork())==0) execvp(a[0],a);})
int main(int argc, char** argv) {
char* X[99];
X[0]="Xvesa";
X[1]="-screen";
X[2]="1024x768x24";
X[3]="-nolisten";
X[4]="tcp";
X[5]=NULL;
EGGSACK(X);
char* wd[99];
wd[0]="waitfordisplay";
wd[1]=NULL;
EGGSACKWAIT(wd);
char* wm[99];
wm[0]="jwm";
wm[1]="-display";
wm[2]=":0";
wm[3]=NULL;
if(argc>1){
SHIFT(1,argv);
EGGSACKWAIT(argv);
}else{
EGGSACKWAIT(wm);
}
char* kX[99];
kX[0]="killall";
kX[1]="Xvesa";
kX[2]=NULL;
EGGSACKWAIT(kX);
} |
Edit:
here is a minimal mimic of xinit ... also cleaned up some unnecessary variable declarations
just add another "EGGSACK" for any scripts you want to run _while_ X is starting after the X eggsack ... or after the waitfordisplay eggsack if the server needs to be running
if you need programs to run sequentially use EGGSACKWAIT
| Code: | #include <unistd.h>
//these could be functions but gcc complains less this way
#define EGGSACKWAIT(a) ({int s,p;if((p=fork())==0){execvp(a[0],a);}else{while(wait(&s)!= p);}})
#define SHIFT(i,a) ({ int j=0;while(a[j] != NULL){a[j]=a[j+i];j++;}})
#define EGGSACK(a) ({if((fork())==0) execvp(a[0],a);})
int main(int argc, char** argv) {
char* X[99];
if (argc>1) {
argv[0]="Xvesa"; //could be X if using a symlink ... compat w/ xvfb, xvesa...
EGGSACK(argv);
}else{
X[0]="X";
X[1]=NULL;
EGGSACK(X);
}
//script? [0]="/root/.xinitrc" ...really getenv("HOME") instead of root
//could add the waitfordisplay code directly but only uclibc is compliant
//so currently forcing it to be separate till I get rid of the GNUisance
//tinycore's waitforX works but makes a large static bin due to Xlibs
X[0]="waitfordisplay";
X[1]=NULL;
EGGSACKWAIT(X);
X[0]="jwm";
X[1]="-display";
X[2]=":0";
X[3]=NULL;
EGGSACKWAIT(X);
X[0]="killall";
if (argc>1) {
X[1]="Xvesa";
}else{
X[1]="X";
}
//may want to add any programs that hold on to X server here
X[2]=NULL;
EGGSACK(X);
} |
 |
| Description |
here is a tarball with waitfordisplay and x just running x will run Xorg x <parameters> will run Xvesa with those parameters
|

Download |
| Filename |
jwmfaststart.tar.gz |
| Filesize |
3.66 KB |
| Downloaded |
106 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7018 Location: qld
|
Posted: Sat 06 Aug 2011, 18:57 Post subject:
|
|
Hi goingnuts
I tried pUPnGO_V216_060611.iso on my old 486. It's an IBM 80486DX50 with 16M RAM, 80M swap. Previously it had 32M but some of it was dodgy and had to be removed. Installed on the HDD is big_bass fat-free_dillo-216 as a full install but that is failing to get to X, it used to when it had 32M RAM. It used to run quite successfully, on the net, playing mp3s, CDs, basic browsing with elinks.
Now what I want to do with it is just that, but I don't need X. I can do all the things I want in console. Running live would be a bonus.
I thought I'd try your pUPnGO_V216_060611 variant because it uses the same kernel with which I had success and has a very small footprint.
I booted with Pakt's wakepup-2 floppy and had no issue with initialising boot. However, once I got to the 'depmod' part the machine just hangs there, keyboard is still responsive so it hasn't crashed. I let it go 20 odd minutes, no response. I tried different log levels with no clues, sorry. The machine still successfully boots fat-free_dillo to RAM, no X (the HDD was thrashing like a frenzied shark when trying to start X, almost got there though).
Any ideas?
TIA
EDIT:
Thoughts that occurred to meI don't recall that swap was being detected and loaded, at least up until the 'depmod' stage anyway, I'll poke around in init (fat-free did detect and load swap)
The zdrv wasn't loading due to RAM constraint? Maybe I'll do an lsmod in fat-free and cut the zdrv
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sun 07 Aug 2011, 10:53 Post subject:
|
|
technosaurus: Thanks for the scripts - I will test them asap!
01micko: Thank you for testing! I have no 486 machine so I can only test in qemu. No problem booting with 20Mb ram there (usually 20Mb ram in qemu is reported as 16Mb inside the running OS...). Going down to 16Mb (should then equal 12Mb on real hardware) it seems to have the problem you describe - hanging at depmod for ages. The version you are testing have to create the driver files (modules.dep and friends) at first boot and it might be that 16Mb ram then is at a limit.
I did a test to see if a swap partition is picked up: It is - but after depmod.
Maybe try booting without zdrv included - create a save file + swap - and reboot with zdrv?
Or inject a modules.dep from 216 to the pup_216pupngo.sfs before booting?
|
|
Back to top
|
|
 |
PANZERKOPF
Joined: 16 Dec 2009 Posts: 249 Location: Earth
|
Posted: Fri 12 Aug 2011, 17:44 Post subject:
|
|
Yet another image viewer:
http://www.johnhawthorn.com/meh/
Did you know about it?
Supports jpeg,gif,png,bmp,netpbm.
Really fast and small (about 20Kb). Needs Xlibs only.
Disadvantages: Cannot rotate or flip image. Other well-known formats like tiff and xpm are unsupported.
_________________ SUUM CUIQUE.
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sat 13 Aug 2011, 02:59 Post subject:
|
|
PANZERKOPF: No - I did not know - very nice finding! I have tried to contact developer and asked if xpm-support will be included in the future...
Thanks!
|
|
Back to top
|
|
 |
PANZERKOPF
Joined: 16 Dec 2009 Posts: 249 Location: Earth
|
Posted: Sun 14 Aug 2011, 13:45 Post subject:
|
|
Well, seems we have identical purposes.
pUPnGO has ndiswrapper (I mean parser, not a kernel module) which needs Perl.
I have found another ndiswrapper written in pure C so it doesn't need any external interpreter. Source is attached here.
| Description |
|

Download |
| Filename |
ndiswrapper.tar.gz |
| Filesize |
15.94 KB |
| Downloaded |
119 Time(s) |
_________________ SUUM CUIQUE.
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 14 Aug 2011, 14:04 Post subject:
|
|
meh's memory usage is horrid, I thought the code looked too clean. It just needs to free the large intermediate image data... I started working on an xcb based viewer though it may be a while.
Edit:
Improving the jwm menu here:
http://murga-linux.com/puppy/viewtopic.php?t=70804
Submenu support, 15x speedup and shell-only (no dependencies)
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Tue 16 Aug 2011, 13:14 Post subject:
|
|
PANZERKOPF: I have no chance to test the ndiswrapper - but remember I considered translation of a perl-script to bash...
I have attached a static build of your ndiswrapper - 26K - any chance you could test it?
technosaurus: I haven't had time to evaluate the meh memory usage...but your JWM-menu-thing looks very promising!
Been busy caught up in building features on top of slock Xscreenlocker, view here - having fun with C/X-coding....
| Description |
static ndiswrapper
|

Download |
| Filename |
static_ndiswrapper.tar.gz |
| Filesize |
15.12 KB |
| Downloaded |
104 Time(s) |
|
|
Back to top
|
|
 |
PANZERKOPF
Joined: 16 Dec 2009 Posts: 249 Location: Earth
|
Posted: Tue 16 Aug 2011, 18:24 Post subject:
|
|
| goingnuts wrote: | any chance you could test it?
|
Sorry, I was not correct. Seems that ndiswrapper is old and buggy (crashes with segfault).
I found latest code from GeexBox project (file is attached). Today I rmmod-ed native module of my wireless card and loaded ndiswrapper module. It works with files parsed by this tool. Now I write this text "through" ndiswrapper
One exception: It cannot parse unicoded inf files. We must convert unicoded inf file to
one-byte encoding.
| Description |
|

Download |
| Filename |
ndiswrapper.gz |
| Filesize |
9.53 KB |
| Downloaded |
117 Time(s) |
_________________ SUUM CUIQUE.
|
|
Back to top
|
|
 |
PANZERKOPF
Joined: 16 Dec 2009 Posts: 249 Location: Earth
|
Posted: Tue 16 Aug 2011, 18:24 Post subject:
|
|
Double post.
Deleted.
_________________ SUUM CUIQUE.
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Thu 18 Aug 2011, 08:45 Post subject:
|
|
| goingnuts wrote: | PANZERKOPF: I have no chance to test the ndiswrapper - but remember I considered translation of a perl-script to bash...
I have attached a static build of your ndiswrapper - 26K - any chance you could test it?
technosaurus: I haven't had time to evaluate the meh memory usage...but your JWM-menu-thing looks very promising!
Been busy caught up in building features on top of slock Xscreenlocker, view here - having fun with C/X-coding.... | I added a new utility to the jwm menu tools that replaces the slow ppm package manager GUI ... it still uses petget and some of puppy's default icons, so it may need a couple of mods to work with pupngo.
BTW your slock mods look great.
Edit:
After doing the menu, package manager replacement and jwm notification/dialog apps, I decided to try and gather the jwm addon apps together in one package... like your drive tray & background setter. Where can I get your latest versions.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Fri 19 Aug 2011, 15:06 Post subject:
|
|
| Quote: | | Where can I get your latest versions. |
Attached the present state of various jwm-stuff I have. Did a test of your jwm-configurator in pupngo: Runs quick and nice although some setting must be adjusted. I do like to split .jwmrc in sections (command, desktop, styles,tray etc.) - for me it is simpler...
Also like to have predefined menus that the desktop-files need to comply with - think the user should be the one to control what categories he/she wants...
Also attached my rudimentary try to make a shell-replacement for the xdg-suite...
Edit: Adapted your script to pm_jwm_xdg.sh - reduced script time to 8% of my original script
| Code: | #!/bin/ash
#overall categories
MAINCATEGORIES="AudioVideo
Development
Education
Game
Graphics
Help
Network
Office
Settings
System
Utility"
#dummy category="Other"
for X in /usr/share/applications/*.desktop; do
ICON="" CATEGORY="" NAME="" COMMAND=""
while read LINE ; do
case $LINE in
Name=*) NAME="${LINE#*=}"'' ;;
Icon=*) ICON="${LINE#*=}"'' ;;
Categories=*) CATEGORY="${LINE#*=}"'' ;;
Exec=*) COMMAND="${LINE#*=}"'' ;;
esac
done < $X
[ "${ICON}" = "" ] && ICON="Default.png"
#check to which category it belongs
if [ ! "${CATEGORY}" = "" ]; then
if [ ! "$(echo $MAINCATEGORIES | grep $CATEGORY)" = "" ]; then
for Y in ${MAINCATEGORIES}; do
if [ "${Y}" = "${CATEGORY}" ]; then
echo "<Program label=\"$NAME\" icon=\"$ICON\">$COMMAND</Program>" >> /tmp/"${CATEGORY}"
fi
done
else
echo "<Program label=\"$NAME\" icon=\"$ICON\">$COMMAND</Program>" >> /tmp/Other
fi
fi
done
# construct the final menu
echo -n "" > /tmp/menu
# handle the Other category
if [ -f /tmp/Other ]; then
echo "<Menu label=\"Other\" icon=\"Other.png\">" >> /tmp/menu
cat /tmp/Other >> /tmp/menu
echo "</Menu>" >> /tmp/menu
rm -f /tmp/Other # clean up
fi
for Y in ${MAINCATEGORIES}; do
if [ -f /tmp/$Y ]; then
echo "<Menu label=\"$Y\" icon=\"$Y.png\">" >> /tmp/menu
cat /tmp/$Y >> /tmp/menu
echo "</Menu>" >> /tmp/menu
rm -f /tmp/$Y # clean up
fi
done
# publish the menu
echo "<JWM>" > /root/.jwmrc-installed
cat /tmp/menu >> /root/.jwmrc-installed
echo "</JWM>" >> /root/.jwmrc-installed
rm -f /tmp/menu # clean up
exit |
 |
| Description |
|

Download |
| Filename |
pupngo_jwm_stuff190811.tar.gz |
| Filesize |
5.64 KB |
| Downloaded |
104 Time(s) |
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 26 Aug 2011, 01:31 Post subject:
|
|
I think I have come up with a way to let users (or pupleteers) choose and support everywhere from a single jwmrc to a separate include for every parameter. Almost too simple, so I am sure it will need tweak.... a separate config file with
Var1=
Var2=
...
Easily sourced by...?
. $HOME/.JWMRC
A program could choose to use only 1 or all vars to gen 1 or many xml files
And it would be fast and easy to mod with the while read line case format
Thoughts?
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
|
|
Page 28 of 50 [737 Posts] |
Goto page: Previous 1, 2, 3, ..., 26, 27, 28, 29, 30, ..., 48, 49, 50 Next |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|