VNC on an Ubuntu VPS

VNC viewer

Although I do most of my server configuration and administration from the command line, occasionally it’s helpful to have access to GUI applications.  Since the machines are remote, and tightly constrained in terms of memory, it makes sense to use the lightest option available.  My current setup use the tightvnc VNC server in conjunction with the fluxbox window manager.  It’s not very pretty, but it does work.  Using SSH tunneling, it’s also quite secure.

Continue reading

Simplecrypt: fun with encryption

The XXTEA encryption algorithm (a.k.a. Correct Block TEA) is an update to the original Tiny Encryption Algorithm (TEA) introduced in 1988 by Roger Needham and David Wheeler.  Designed expressly for simplicity, the algorithm itself can be expressed in a mere 20 lines of C code.  In spite of having been shown susceptible to a chosen-plaintext-attack, for basic uses it is actually reasonably secure.

Simplecrypt is a bare-bones implementation of file encryption using XXTEA as a block cipher in conjunction with several techniques to allow it work with reasonable security and efficiency on standard user files.  The program is written in ANSI C and depends on a few POSIX library calls.

simplecrypt.c (~7k)

Continue reading

The Rise (and fall?) of MacOS X

Mac lion

The 1990s were a rough decade for Apple.  After a promising start in the 1980s, the Macintosh system appeared adrift.  Apple’s attempts to develop a next generation operating system for its hardware were stalled.  Joint efforts with IBM, Microsoft, Sun and others had failed, as had several internal projects, so when Apple acquired Steve Jobs’s NeXT company in 1995 to use as the core of their new system, it seemed a last ditch effort.  Even after Jobs reassumed full control of the company in mid-1996, there were serious doubts whether Apple would survive long enough to release the new system to the public, let alone make it into a successful product.

Continue reading

mhz

While computers have changed a lot in the last 20 years, we still use clock speed (MHZ or GHZ) as the primary metric for describing speed.  Unfortunately, the manufacturers don’t make it easy.  First AMD and then Intel switched away from labeling their processors by clock.  Thus if you purchase a new machine today, the processor is likely to be a ‘Core i3 2100’ or a ‘Phenom X4 2200’.  The numbers that they use after the processor type aren’t the clock speed, rather, they’re some sort of internally-designated model number.

Continue reading

Building gcc on MacOS X

Apple has never included a stock version of GCC with their development tools, but now with the current version of Xcode, they don’t even include a modified version.  Seeing as their plan going forward is to move entirely to Clang/LLVM, if you intend to use GCC on OS X, you’ll have to build it yourself.  It’s not a terribly difficult process, but it can be a bit tricky the first few times around, particularly when it comes to configuring the build.

Instructions follow.

Continue reading

Tidbits

tidbitsAs mentioned previously, I’ve been mostly happy with my Thinkpad laptop, with the obvious exception of the occasional Microsoft-induced breakage. The modifier ‘mostly’ is used advisedly because there are two issues I’ve not yet fixed. The first problem is easily solvable, with the proper application of cash that I’d rather not spend: the battery has run itself down to the point that it can only hold 16% of its original capacity. This after barely 20 months of use. Let’s just say that it doesn’t exactly encourage mobile computing.

The more serious issue cropping up now and again is that under heavy load, the machine simply overheats and is forced to suspend itself. While I’m grateful that the power manager is smart enough not to simply keep on going and crash, I’m quite unimpressed that Lenovo couldn’t be bothered to design a cooling system that was actually capable of keeping the CPU temperature below 100C under normal circumstances. Even with the fan manually set to maximum speed, rapid edits of files in Lightroom quickly push temperatures to the shutoff threshold.

I don’t have anything terribly original to say about the current meltdown, but the near-constant revelations of mismanagement and outright fraud suggest that a great many people belong in jail or somewhere less pleasant. That there have been basically no prosecutions, punishments, or even confiscations of ill-gotten gains is unsurprising but still discouraging. Americans have always been depressingly well-behaved when it comes to respecting the property and persons of the upper class. More peasants with pitchforks, please!

Winter is effectively over here in New York. Temperatures are up to the point that the few remaining snow patches will be completely gone in the next few days. And the forecast for the next few weeks says they’ll only be going up. Spring on the other hand is taking its sweet time coming back, and the trees and grass look just as dead as they have for the last three months.

Finally, I’m suffering the usual ’embarassment of riches’ with regard to photos – too many hundreds of shots that I’ve not had a chance to properly sort through, select out the promising ones, and do a quick editing pass over before posting. I was sort of hoping this’d be the year of fewer better shots, but thusfar that’s not exactly happening. Sooner or later I do expect lack of patience and hard disk space to kick in though.

Yes, Windows (Still) Sucks

bsodI’ve mostly gotten used to the quirks of Windows XP on my Thinkpad X61. True it’s not exactly as painfree as OS X on my PowerBook used to be, but for the sake of the hardware, I’m willing to put up with some inconvenience. Every so often, though, I seem to get a reminder of just how fragile and poorly designed the whole thing is.

Yesterday I made the mistake of allowing Windows Update to install an ‘optional hardware’ driver along with the usual raft of security fixes. Spectacularly bad idea. The particular ‘update’ was a driver for the ‘Cypress AT2LP’ which subsequent investigation reveals as a popular bridge board in external HDD enclosures such as the Venus DS3 I rely on.

Naturally, when I connected my main external data drive this morning, I got nothing. Windows didn’t even acknowledge there was a USB device attached, let alone a drive of some sort. Figuring that my enclosure might just have chosen this innoportune moment to call it quits, I tried it on my grandmother’s Mac with a Firewire cable, and it of course worked just fine.

After a few other experiments (different enclosure, different boot disk) it became clear that rather than a dead drive or fried USB port, I was simply suffering from yet another broken Windows update and the ‘Cypress – Other hardware – Cypress AT2LP (3.03.0000.2)’ entry near the top of the Windows Update log was to blame (confirmed by Google).

Naturally, Microsoft has created no simple way to remove individual ‘updates’ like this one. Their preferred solution involves doing a ‘Rollback’ to an earlier ‘System Restore Point’. Nice way to lose all sorts of other updates and changes. Also useless in my case as System Restore has been disabled from day 1 as a waste of limited disk resources.

After a fair bit of searching and fiddling, I did come up with an actual solution which involved:

1) In the System control panel, going to ‘Environment Variables’ under the ‘Advanced’ tab and adding the system variable ‘devmgr_show_nonpresent_devices’ with a value of ‘1’.

2) Checking ‘Show Hidden Devices’ in the ‘View’ menu of the Device Manager.

3) Going to the ‘Universal Serial Bus controllers’ section of the Device Manager and for the ‘Cypress AT2LP (3.03.0000.2) entry, going to Properties -> Driver -> Roll Back Driver.

Not my idea of elegant or even particularly straightforward. Somehow the whole sorry episode reminds of the lipstick-on-a-pig joke. Microsoft Windows XP: 8 years of development and patches and still nowhere near ready for prime-time.

Fortunately, with the exception of an all-day snowstorm that dumped about a foot of the stuff in the streets outside, the rest of the day was pretty relaxed.