Skip to main content

Posts

Tethering an AmaySIMmed phone on Linux

Tethering one’s Nokia E5 to take advantage of the 4GB of Internet traffic included in AmaySIM’s $39.90 plan (for 30 days) is quite simple, once all of the knowledge is in place. Switch your phone to “PC Suite” mode... Press [Menu] Select [Ctrl. Panel] Select [Settings] Select [Connection] Select [USB] Select [PC Suite] Select [OK] Select [Back] until Menu closes ...at which point a serial device appears when you plug it into your PC (in this case, a laptop running Natty Narhal Kubuntu) at /dev/ttyACM0 . Now follow AmaySIM’s instructions: Press [Menu] Select [Ctrl. Panel] Select [Settings] Select [Connection] Select [Destinations] Select [Access point] Press [No] Select [Packet data] Enter amaysim Internet and press [OK] Select [Internet] as the destination Select [Internet] Highlight [Optus Internet], press [Options] and select [Edit] Ensure Data bearer is set to [Packet Data] Select [Access point name] Enter or change to interne...
Problem: download a stack of MP3 files listed in a web page. Solution: SaveAs the web page (as music.html ) then... for x in $(gawk '-F"' '/\.mp3"/ { print $10; }' music.html); do wget -c $x done Hit the Enter key, wait about 3 minutes, all finished. Yay! Software as a toy!

Unravelling layers of issues

We have two copies of an app, one running on SCO Unix, the modified version running on Linux. The SCO version depends upon the num-pad sending «esc»OS , however putting PuTTY into NumPad mode means all of the numpad keys send «esc» whatever so are useless for keying numbers (yes, I could remap them, in the Linux version, however a few features have not yet been ported enough to swap versions yet), so... Run PuTTY in numpad mode, download KeyTweak , remap the numpad keys to non-numpad keys, all functional!

Digital playing blocks, a positive consequence

One required feature (limiting the width of table columns, requiring the use of CSS) was/is absent from htmldoc v1.8*, however CSS support will be present in 1.90 when it’s released, so... use SVN to download the source, compile... it almost does what’s needed. A bit of debugging (of others’ code), a bit of editing, my name up in lights, & presently that digital plastic block will be precisely the correct shape for the job at hand — & still respect the HTML4 standards to the letter. Having the code written (in part) by the people who will be using it works extremely well, as an individual (myself, in this case) can focus on one or a few small details to refine the result to perfectly fit their needs, however the overall designers, heavy-code implementers can stick to principles, get the big things correct, & not worry over-much about each tiny detail.

Digital playing blocks

It’s not so different from primary school days: given a huge collection of varied, interlocking blocks, Joe Random can build a neat aeroplane, a car which can be zoomed to stunning velocity until it disagrees with a wall or door & explodes into a shower of plastic components. Add just a touch of wit & the most amazing devices can be assembled. Zoom forward 40 years, push a DVD into a computer, 5 minutes later it’s running Kubuntu with an office suite, graphics app plus suite of tools for altering images, audio editing & conversion app, video disintegrators & assemblers, two full-fledged SQL databases, name it. Now a challenge arises: you have an app (written from the glass-teletype level, evidently, then steadily kinda-upgraded), thankfully written using gcc but on <ghasp!> SCO Unix, which is driving a specific brand of dot-matrix impact printer on a specific device node under the control of Wyse-brand VT-100B-clone terminals (apparently by a top-gun c...

Some machines fight every step of the way

Po: a machine to replace an existing Windows XP box which mostly displays slideshows. The existing XP box contracted a virus which doesn't seem to do much destructive but does axe anything even vaguely to do with the Win32 “shell” (loose use of the term: CMD.EXE ) including downloading virus scanner database updates. The machine does not often enjoy an Internet connection so presumably was infected from somebody's Flash USB stick. No problems. Install XP on a replacement machine with a 30% faster (& dual-core) CPU, twice as much RAM & PS/2 sockets (the original Dell box had none, USB keyboard & mouse only) so that it was possible to respond to prompts issued by the non-Dell-specific XP installer. Add LibreOffice (the original MS-Office disks are the install-three-times variety which have already been installed three times), Audacity, GIMP, SD-Player a non-Adobe PDF displayer, a few other tools & it’s all good... then XP fails to complete the SP2 update, gets h...

OK, so Kubuntu Natty Narwhal tends to Kernel Panic after logging in...

...on a few different machines, so it ain’t a coincidence. It doesn’t K-P as it launches KDM, only as you log in. Plus the Plymouth startup thingy is often quite reluctant to stop playing splash-screen. If you Ctrl-Alt-F* & log in to a text console, you can kill KDM, then “ /usr/bin/startx /usr/bin/startkde ” on some (not all) machines to get a running KDE session. Owe... kay. From a console: sudo su - cd /usr/bin mv kdm kdm.removed vi /etc/rc.local 12ji /bin/plymouth --quit sudo su - username /usr/bin/startx /usr/bin/startkde sleep 5 [Esc] :w! [Enter] ZZ It helps to delete the “ nosplash ” &amp “ ” keywords from the GRUB command you’re booting, add “ plymouth:debug ” then re-run grub-install , all of which gets Plymouth to settle down a bit more, plus slightly reduces the odds of being left with an always-K-P video card. Yes, that logs you in (no password) as exactly one user, but for many workstations, that’s...

So much history in one PC!

Open case, discover: Two separate Pentium-II processors An AGP socket, sundry PCI sockets, two AT-sized ISA sockets a Matrox-brand PCI video card The video card would’ve been quite the bomb in its day! It turns out to be quite handy for putting into a dual-core 3GHz Pentium-IV machine with sundry PCI plus one PCI-X sockets plus built-in everything including video card. The machine will be used for running presentations, & rather than telling the projector to freeze the image, they can now edit a presentation on another screen, get it to the same point in the series, plus one, then minimise the old slide-show (LibreOffice Impress), flip new slideshow onto screen, maximise in under 2 seconds. The machine was to use PowerPoint under MS-Windows XP, as it had done in the past. It had picked up an irritating virus, which seemed to do nothing except propagate itself onto any USB stick plugged in, & knife any shell-type ( CMD.EXE ) actions in the guts — including update the viru...

It's been a while...

...since I viewed ncurses as new technology. It is, however, for more flexible than... printf ("%sPrompt for Input here:", curs(22,1)); ...which is itself an upgrade from the original... printf ("\33[22;1HPrompt for Input here:"); ...in this application. So here we go, bringing an app apparently written at glass-Teletype level as far forward as last century.

YouTube video clip to DVD in one command

You may wish to alter the device on which the DVD is burned via ( /dev/sr0 in the example) or the default burn speed, or you may have a more appropriate place to store up to maybe 9GB of temporary files (the DVD content plus an ISO file of the same), however this one command turns a downloaded YouTube clip into a push-in-n-it-plays DVD: #!/bin/sh if [ -f "$1" ]; then     LEN=$(ffmpeg -i "$1" 2>&1 |gawk '/ Duration: / { print gensub(":[0-9][0-9]\\.[0-9][0-9],", "", "g", $2); }')     if [ $LEN = "" ]; then         echo No video minutes seen in the file "'$1'"         return 1     fi else     echo File "'$x'" does not appear to exist or is a dir or device-node     return 1 fi rm -rf /tmp/DVD_temporary /tmp/DVD_temporary.iso /tmp/temporary.xml /tmp/temporary.jpg nice ffmpeg -i "$1" -target ntsc-dvd -y /tmp/temporary.mpg cat <<ENDOFFILE > /tmp/temporary.x...

Attitude != progress

Conclusion: a sustained good attitude results in an irreplaceable attribute: determination. The app worked mostly-right, but patience based on surety of my abilities, plus certainty that I don’t know everything, plus continued positive reinforcement/encouragement from one skipping a step in the process (to arrive at “Gorgeous” early), resulted in the key road-block being three completely unrelated roadblocks. The original app didn’t care about whether a dependent was installed or not, so failed silently when it wasn’t installed, rather than the more-common bizarre codified error message; Correcting the code to report failures (& log them in detail) also revealed a slight typoe in my enhancements; Correcting the typoe produced hard data which could then be adjusted to produce not only accurate but quite readable PDF reports. All of this cascaded out of the woodwork across 13 minutes after about 9 hours of debugging, starting with strace . Up to that poin...

Single parenting?

Ignoring Desiderata for an instant, I would be delighted if over a decade of dishonesty & manipulation were swept aside, in order for single parenting to become possible here. For context, an intimate friend of mine was unable to even read the last batch of dishonesty. I really wish that in some significant way, even an iota of this was really my fault — because then I could change what I was doing, to allow better things to happen for the children involved.

Automated Me

What can’t you get an app for doing? Very little, it seems. If I want to read stories for children, Audacity will record my voice, the DVD-Slideshow app collection will layer slides with the text over that to make a video sequence of it, then DeVeDe will convert that into a standard DVD format & burn it to disc. Viola! A clone-able Me who can read stories to thousands of children at once!

Technical is buried in non-technical

This performance happened when I was in Year 11 of high school, yet another Brooks from midway through last century would agree with it. Frederick mentioned this in his book, “The Mythical Man-Month,”published 3 years before the performance: “Adding manpower to a late software project makes it later” while he regards this as a drastic oversimplification, it is accurate in that some aspects of the coding situation have little or no dependence on your ability to actually invent code, more to do with the social context (teaming up 10 women won’t get you a baby 4 weeks after conception). One recent aspect of this is that I have enough pieces to assemble maybe 10 or 12 fully functional computers, yet for social reasons, very few people are at all interested in such a computer. Another is that becoming aware of having been subject to over a decade of social sabotage was the key to understanding the hidden limits of my abilities to ramp up my IT business. Afte...

It turns out that CRT monitors are still useful

I stayed at a B&B two weekends ago which has an ADSL Internet connection, an office PC & a WiFi-connected personal laptop (which I redid the config on so it actually connected, happily the WiFi router's password set was still admin/admin ). Next visit to the area, they’ll also have an Internet cafe workstation since they have room for a 19" CRT (old-style glass television) screen, since I have 13 of those sitting behind my house, plus a few “old” PCs including a couple of dual-core 3GHz to which I can fit a pair of 512MB DDR2 DIMMs & a random (80GB) IDE hard drive. A selected PC is about to grow a copy of Maverick Meerkat Kubuntu & simple instructions for manually re-creating the default user (as in, Ctrl-Alt-F1 , log in, “ sudo su sh scriptname ” to remove the home directory tree & unpack a new template from a .tar.bz2 file). Said template will include a Flash plugin, a Video DownloadHelper plugin, a reasonable set of bookmarks, an “...

Converting .raw ripped CD tracks to WAV format

Why do this? Because you have a heap of CD audio tracks ripped to Raw format by k3b, however the software intended to use those depends on some kind of file structure. So... place this in ~/bin/raw2wav.sh & mark it executable ( chmod a+x ): #!/bin/sh if [ -f "$1" ]; then echo WAVifying [$1] sox -V -r 44100 -b 16 -c 2 -s "$1" "$(dirname "$1")/$(basename "$1" .raw).wav" fi Apply this using a command like: find . -type f -name '*.raw' -exec raw2wav.sh {} \;

(Virgin) mobile internet on Kubuntu

Users who wish to run wvdial productively need to add themselves to the group dialout (to see the /dev/ttyUSB# device nodes) & the group dip to run (authenticate, as it were) the ppp dæmon. Getting WiFi (or many other network things) to work may (after installing wicd ) requiring adding an entry to /etc/apparmor.d/sbin.dhclient3 to permit dhclient to access /var/lib/wicd/* in lrw mode.

Nothing replaces determination!

Now I have a good handle on how the previous programmer typically mucked things up, it’s becoming much simpler to predict what they omitted or their weird ways of implementing otherwise ordinary procedures in a semi-sane fashion. The time to convert a report from a format intended to be rendered on a specific brand of dot-matrix impact printer to a generic prints-everywhere email-able PDF file (via an HTML-ish file) has decreased from several hours per report to maybe half an hour... & shrinking... Call it “meta-study,” in that instead of attempting to divine how something was done each time, one figures out roughly why certain things were done in certain ways, then the discrepancies often make a bizarre kind of sense, & can be rapidly, systematically replaced with much more concretely sane ways of doing things.

Micro$oft software does love farting around in others' territory

Situation: a Vista user has clicked on an attachment in a "friend's" email, now the machine won't do anything networkily sensible, so is evidently virussed to the eyeballs & beyond. There was no obvious hope of getting something working enough to copy their documents & image off, so... Response: boot a Kubuntu LiveCD, investigate system without hearing the opinion of any viruses. Install Kubuntu over the "Recovery" partition ( /dev/sda2 ). Plug in another hard drive (machine has only 2x SATA power cables, so need to unplug the DVD drive to do this). Boot Kubuntu, Copy docs/images onto temp hard drive (tar.bz2 as the drive is kinda small). Boot into Kubuntu, DHCP picks up an address from the ADSL router, can now browse & do banking. Good! Fetch Windows 7 Eternity disc, Install that, no worries but Kubuntu now invisible. Boot Kubuntu LiveCD, in recovery mode, re-run GRUB. Kubuntu is now visible. To avoid the risk of trashing the man MS-Windows part...