Skip to main content

Posts

Showing posts from May, 2010

Why PuTTY is good even for TelNet

It can send keepalive traffic, which prevents the connection from being dropped by masquerade (NAT) network transitions or inattentive WiFi links while you’re grabbing a cuppa; It runs on just about any platform so you only need one (1) set of instructions for all users; It’s quite flexible about window setup (especially compared with (say) xTerm or Konqueror, but don’t even ask about operating through CMD.EXE) & the keystrokes can be individually configured; When invoked from a command line, one can simply name a pre-configured set of connection parameters rather than adding a bazillion litle options for this or that parameter (& then forget one detail); It’s simple to configure a live CD to autostart straight into PuTTY, making a simple, robust, Thin Client (Twiggy, eat yer heart out).

Reverse Engineering

Twice now in a few days, the docco has been useless, but vivisecting running programs has worked. In the first case, I was using an app to turn a bunch of slideshow-style images into a DVD, with a talk track running under it. The initial application was childrens’ stories. The app was quite clumsy, forex it would only allow one to adjust the length of time each slide remains in whole seconds, & each slide (duration, transition, transition-speed) had to be adjusted manually (GUI interface). Each slideshow had to be redone from scratch (that is, change a detail on one image, need to reload all images & reconfig each time, sigh). So I ran a bunch of ps commands ( ps wwwwaux >filename1.log ) & captured copies of some of the (temporary) config files it made to run the app, now I can select slide times to the nearest millisecond (real-time accuracy is probably about 40ms) & rebuild the slideshow from a simple bash script. I made the slides by scaling photos to NTSC sized

A piece offering

Over the years, I’ve quasi-specialised in doing stuff other computer people baulk at... Today’s more-of-the-same is taking a specific application, written (in gcc at least) on SCO Unix hard-coded (at the printf("\33[%d;%dH",row,col); level) for a particular VT-100B terminal clone’s terminal I/O, printing (hard-coded formatting) to a particular brand & model of dot-matrix impact printer via a specific hard-coded printer device, porting to Linux [basics done, including use of lpr in place of a hard-coded output device, works under Karmic Koala Kubuntu or Mandriva 2010.0] , transmogrifying the terminal interface to something systematic wrapped in ncurses (with a view to wrapping it in something more GUI later) [work-in-progress] , feeding all printer output through a to-PDF converter (probably via a to-PostScript converter) [work-in-progress] thus enabling use of any printer which can leave recognisable stuff on A4 (or Letter) paper plus emission of PDFs for emailing rat

Arbitrary scaling using ImageMagick

It took me a little while to blunder across the info, but using ImageMagick tools (like “convert”) results in the aspect ratio being retained, so an 800x600 image will scale to 640x480 but not 720x480. Add a shriek (exclamation mark) to the end of the dimensions. To do the above, “-scale 720x480!” (often, the ! must be prefixed with a \).