Page 1 of 1

help_NOX .. a helper prog if X crashes

Posted: Mon 29 Nov 2010, 07:00
by 01micko
Hello all.

This is just a small script I wrote which may help some people if they crash X or can't get into X, provided they have a net connection. Recent puppies, if they connect by ethernet, should already be online.

You need to have a net connection to browse and chat so no use to offer the apps as they are pretty small, less than 1MB for both. (Both compiled in Lucid Puppy)

Weechat.. compiled by dejan555
Elinks ... I compiled.

If you don't have a connection then the script stops. Maybe in the future we can have a small wizard that works out of X.
The inspiration was from this thread by goingnuts

There is no menu entry, it's a commandline tool. It is designed to run from console, that is, no X running. It does run inside of X the same way, but uses Xdialog instead of dialog.

You type

Code: Select all

help_NOX
at console

Image

The program then downloads and installs elinks and weechat, verifies install and then you see this

Image

from in X it looks like this:

Image ..then Image

then you see success..

Image then.. Image

Then you choose to browse or chat....

Image Image

It's all pretty fast and simple.

Elinks opens up at the forum page so you can look for a solution, Weechat goes straight to #puppylinux IRC channel.

Thanks guys that hang out on #puppylinux for putting up with my testing over the past few days :D

Any suggestions, I'm sure this could be expanded.

Have fun

Cheers

Posted: Mon 29 Nov 2010, 09:27
by Lobster
works OK Mick

URL linking?
Can that be done from command line - not sure?

Posted: Mon 29 Nov 2010, 09:36
by 01micko
Hello Lobster

May have to read the weechat manual on that one.. there may well be some keyboard shortcut. I might ask dejan555, he has used weechat extensively.

Cheers

Posted: Mon 29 Nov 2010, 14:55
by technosaurus
to expand the packages part you can use the lists of packages in $HOME/.packages
NOTE: I am posting from memory only so the file names may be off a bit

To list ALL available packages (short names) it would be something like

Code: Select all

cat $HOME/.packages/<version_package_list> |cut -d "|" -f1 |sort |uniq
(I think you need -f3 in cut for the _full_ package name - needed for wget)

If you want the user to only see not-installed packages

Code: Select all

cat $HOME/.packages/<version_package_list> $HOME/.packages/woof_installed_packages |cut -d "|" -f1 |sort |uniq -u
<insert dialog here>
you can echo all the chosen full package names to a file and dowload them

I'm not sure if/where Puppy stores the default mirror choice but this example just assumes ibiblio and woof

Code: Select all

wget --continue --tries=0 --base=http://distro.ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-woof/ --input-file=file_you_echoed_packages_to

#(to work with busybox it may need the equivalent short options)
wget -c -t 0 -B http://distro.ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-woof/ -i file_you_echoed_packages_to
Sorry if this is not the type of suggestion you were asking for

Posted: Mon 29 Nov 2010, 23:20
by 01micko
thanks for looking technosaurus

What you suggest sort of goes beyond the scope of this project ... for now.

Probably the priority for this project is to get internet working if it isn't.

Then it could be expanded to install other packages.

Cheers

FOOTNOTE: quickpet started as "browser-installer".. a simple app of about 100 lines.. quickpet is over 1000!!! :lol: :lol: :lol:

help_NOX .. a helper prog if X crashes

Posted: Mon 29 Nov 2010, 23:59
by Billtoo
01micko wrote:thanks for looking technosaurus

What you suggest sort of goes beyond the scope of this project ... for now.

Probably the priority for this project is to get internet working if it isn't.

Then it could be expanded to install other packages.

Cheers

FOOTNOTE: quickpet started as "browser-installer".. a simple app of about 100 lines.. quickpet is over 1000!!! :lol: :lol: :lol:
I misunderstood the topic so I removed my message.