Sunday, October 12, 2008

TOOL-A-WEEK #2 'screen'

'remedy for terminal sessions'

Have you ever been annoyed
o while navigating multiple terminal windows?
o that when your X server goes down,
all your open X terminals and the stuff running inside is aborted?
o or a logout?
o etc...

From the man page:

"Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically
interactive shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several
control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and sup-
port for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-
paste mechanism that allows moving text regions between windows.

When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of
your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen)
windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn
output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows
in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs con-
tinue to run when their window is currently not visible and even when the whole screen session is detached from the
user's terminal. When a program terminates, screen (per default) kills the window that contained it. If this win-
dow was in the foreground, the display switches to the previous window; if none are left, screen exits."

I couldn't describe it better,
type 'man screen' to learn the rest.

Monday, September 29, 2008

TOOL-A-WEEK

name: most
description: a pager; replacement for 'less'

The program has a little bigger memory footprint than 'less'
but here comes the twist:

$ man --pager most FOO

and most will color the man-page,
which makes it light-years more readable.

This is just one of many other additional features.
Discovering the rest is left as an exercise for the reader.

Wednesday, September 10, 2008

RepRap

For a second, try to imagine a 3D printer that can replicate itself.
Difficulties?
Then have a look at <a href=http://www.reprap.org>reprap</a>
Or if you wanna see it in persona pay a visit to Vienna's <a href=http://www.metalab.at>Metalab</a>
(which is some sort of ultimate place to hang around anyway).

770 miles per second

"Holy shit. This thing makes an Ono-Sendai look like a kid's toy."
- Gibson, Mona Lisa Overdrive

"Ever since STs PADDs, I wished for such a thing to be in my hands."
Past year uses of my 'Nokia 770 Internet Tablet':
.having it with me all the time and trying to explain it's numerous applications
.browsing the web
.email, usenet, chat, im, blogging
.learning & other general hacking
.ebook reading & comics
.lexicon, dictionary, thesaurus
.music playing, sound recording
.manipulating images, drawing, photos, pr0^H^Hictures
.[script] development
.bluetooth, rdesktop
.taking notes, clock and calendar
.watching the movie 'Crank'
.nethack & several other games & scummvm
.dropping the thing from an altitude of approximately 1m onto glazed tiles in the toilet.
..and much, much more.. .ps. there's cool stickers over the 'N' logo now!

Things I'd love to see in the next model that I'd buy, in particular order of importance are, baaaaaby:
.(Who needs GPS or an FM transmitter? Or a shitty web camera?)
.0.5 The superb design, with the sliding cover that lets me carry it in my pocket without destroying the screen, biking. Alternatively i would accept some highly scratch resistant touchscreen (a la iPhone)..
.1. Battery life and a brighter/better (touch)screen
.2. The physical keyboard (us, essential) of the N810
.3. Memory
.4. Processing Power

whether that, or im migrating to a next generation UMPC, which seems more likely at the moment.

brought to you by The APP (alternative psychedelic press)
(disclaimer: if you experience any difficulty in understanding the
words on this page you are encouraged to consult the usual search
engines)

busybox

Category: Clever hacks I like most
Entry: BusyBox

Citing the man page, The Swiss Army Knife of Embedded Linux, BusyBox combines tiny versions of many common UNIX utilities into a single small executable.

The day before yesterday I wgot me a recent source snapshot tarball of <a href=http://www.busybox.net>busybox</a>.
Configuration, as stated in the TODO, should be revamped but is endurable. Compilation under Knoppix 5.something a no brainer. Had to disable some SELinux and crypt related stuff.

I first made a busybox binary containing only ash, and then another with nearly everything.Stripped and UPXed, the ash is 42944 bytes small and the 'allinone' comes down to 384616.

There was just little sed magic and general hacking to be had in making my 'workbench' shell scripts compatible to
the syntax of the ash.. 'echo -en'..
Beautyful KISS. Small and fast.
Very nice to see good old ash updated.
Some things previously not implementet in older 'ashes' that I used to know are a $RANDOM special variable, command line editing and history, better arithmetic (%), Tab completion goodness, aliases ..

One of zsh's features that I miss most is the abbility to '=' $path expand command lines, eg:
vim =blender.sh
expands to vim /usr/local/bin/blender.sh
I wrote a very simple wrapper function that does more or less the same:
vv () { [ ! "$1" ] || [ $1 = --help ] && echo Usage: vv FILE.. ' finds and edits FILE in $PATH' && return 1
vim `which $1`
}

a shortcut to edit /usr/local/bin/compsopogon being thus:
vv compsopogon

I am planning to implement a 'hist_ignore_dups' function, just for the comfort of it.
Already having started to read and understand the ash.c and library source code it'd be a matter of several lines changed or added.
Meanwhile rent, electric power and gas want to be paid though, so donations are welcomed by
Yours Truely.

ps. and I am out of coffee.

Monday, September 8, 2008