I Am The Virus King

After another thorough scan on my systems, including cross-scans from different OSes, I have confirmed that my streak of being virus-free is still unbroken from ever since I got my first PC in 1993. Sometimes it pays to be paranoid…

Avoiding them has actually been fairly simple:

1) Never run e-mail attachments directly. EVER. If you do get what you think is a legitimate attachment, save it to disk and then open it from within the appropriate program.
2) Don’t use Outlook. That’s just asking for trouble.
3) Firewall off every port and only open the ones you absolutely need. Preferably with a physically separate firewall device.
4) Don’t use IE on untrusted sites. If you do use IE, deactivate ActiveX objects and Javascript. If you have to leave them enabled, don’t ever say yes to those ‘toolbar’ downloads.
5) Be suspicious of .exe files from untrusted sites. Virus-check the hell out of them, see if you can open them in WinZip instead (sometimes they’re just self-extracting .zip files), etc.
6) If it has an unfamiliar extension, don’t run it.
7) If you browse Usenet, don’t auto-display HTML and images. Treat them like e-mail attachments in 1).

Arrr Matey, I Be Pillaging Meself

I’m lazy. In fact, I’m so lazy that I’ll spend 10 hours working on something that’ll shave ten minutes off some other task.

My current time-saving crusade is part of an attempt to work through the backlog of games I have. Although I probably really should focus on one at a time, I like to switch back and forth every so often, and that’s a bit of a pain. Thanks to the current copy-protection schemes, you need to put one of the original discs in, and keeping all those CDs nearby and searching through them and changing them is annoying. Although there are ‘no-cd’ cracks out there, I’ve had trouble getting a lot of them to work, they don’t always exist for that specific game and/or patch, they aren’t exactly from a trustworthy source, etc…

Instead, the solution I’m trying now is to use the Daemon Tools package to act as a ‘virtual’ CD drive, and DDump to rip copies of all the CDs. Then switching between CDs is just a menu selection, and I can even store the ripped images on the file server now that I’ve got sharing set up properly. Normally programs like these are considered pirating tools, but hey, there are legitimate uses after all…

Of course now I have to rip all of those games to disk, which is taking even longer than expected. It looks like some of the more common copy-protection schemes really slow down certain stages of the copying — it’ll take 20 minutes to read the first 10,000 or so sectors, then 8 minutes to whip through the next 300,000… At least I only have to do it for the play discs.

The Never-Ending Search

To hell with it, maybe I should just get an iPod after all. The fourth-generation ones are out now, with the clicky-wheel from the mini-iPod, better battery life, and a lower price (I can live without the dock and case). It still doesn’t have the other features I’d like, but it’s better to have something at all than to chase a ‘perfect’ goal forever…

The problem then becomes one of management. I’d obviously need iTunes in order to load songs, manage playlists, and so on, but of the three systems I have, all of the songs are stored on the Linux file server, the one where iTunes isn’t available. There isn’t enough room to mirror the entire library on the iBook, and I don’t have FireWire or even USB2 on the Windows system (which I’d prefer to avoid and is also low on space).

Fortunately you can add songs to an iTunes library from a network share, so I can do all of the management from the iBook, but then that creates a couple more problems. First, it doesn’t seem to let me edit ID3 tags on songs in the library that are from a network share. Whether this is a limitation of iTunes or a permissions problem or what isn’t clear yet, so I still need to do some investigation there.

The second problem is that now I have a redundant data problem. Although I can’t fit my whole music library on the iBook, I *do* have a subset of my favourite tracks loaded on it so I can listen to them while roaming. Adding the songs from the network share makes the local ones show up twice in the library, and it’s not immediately obvious which one is the local one and which is the remote one (idea to Apple: smart playlists based on filename/path). What I really need is two separate libraries, one just for the networked songs and one for the local copies, but iTunes just has one big library per user.

There is a way around it though, if you cheat a bit. Since everything is stored in ~/Music/iTunes, all I had to do was take the existing directory, rename it to iTunes.local, restart iTunes and add the network songs to the now-empty library, quit iTunes, and rename the newly-recreated iTunes directory to iTunes.remote. Now all I have to do is make ~/Music/iTunes a symbolic link to whichever library I want to work on at the time before starting iTunes. (If I were really lazy I’d make wrapper scripts to do it automatically from the Dock or Finder.)

It’s a bit of a kludge, but should work well enough. Now where are all those pennies…

const me = dumdum;

I can never keep these straight since I keep forgetting the exact rules around pointer type qualifiers, so for my own reference:

const X * foo;    // Cannot change what is being pointed at, can change the pointer
    foo = &bar;   // Allowed
    *foo = bar;   // Not Allowed
X const * foo;    // Equivalent to the above
X * const foo;    // Cannot change the pointer value, can change what is pointed at
    foo = &bar;   // Not Allowed
    *foo = bar;   // Allowed
const X * const foo; // Cannot change either the pointer value or the target
    foo = &bar;   // Not Allowed
    *foo = bar;   // Not Allowed

New Node Name Niceties

Tip for the day: Restarting ‘udev’ on a running system is a really, really bad idea if you ever want to see any of your pseudo-ttys again. I couldn’t log in via SSH or even start another xterm until I rebooted.

Otherwise though, it seems like it works fairly well so far under Slackware 10. The entries in /dev are minimized to those actually relevant to the system, and I can assign node names based on things like vendor strings, so my camera always appears as /dev/camera instead of varying between /dev/sda1 or /dev/sdb1 depending on what order I plugged things in.

As always, there are quirks. My USB multi-card reader only shows up as the basic whole-device node (e.g., /dev/sda) if no cards are actually in it at boot time, as is usually the case. In order to actually get at the files though, you need the partition nodes (e.g., /dev/sda1, /dev/sda2, etc.), and they don’t show up. Unfortunately, with these kinds of devices, inserting a card doesn’t actually cause a USB event, so the kernel and udev don’t know that there’s now a card there on which it should go scan the partitions.

Fortunately there’s a workaround; you can force udev to always create the partition nodes with something like the following in udev.rules:

BUS="usb", SYSFS{product}="Multi-Card Reader", NAME{all_partitions}="usbcard"

Then I can access my SD card in the reader with /dev/usbcard1.

And, of course, the above pseudo-tty problem…

Does It Get HBO?

Though I’m not much of a Mac zealot, there were still a few things out of the WWDC announcements yesterday that caught my interest:

Cinema Displays: Oooo, widescreen. And, uh, HUGE — that 30″ screen is bigger than my living room TV! That one is overkill (meant for professional editing and such) and beyond my tech specs anyway, and the 23″ is still rather expensive, but the 20″ one is intriguing. I wouldn’t be able to use it with the iBook, but their switch to DVI makes it a viable choice on a KVM for the rest of the systems, and the hubs certainly don’t hurt. The new stand is also a lot better than the old ‘easel’ style that I thought was rather silly-looking and hard to adjust.

It is, though, just one more possibility out of a field of contenders for LCD screens, and I doubt I’ll be picking one up soon anyway. My ViewSonic 17PS may be getting old, but it still serves very well with a high-quality picture, so there’s not much of an incentive to switch to an LCD at the moment.

Spotlight: Hah, looks like Apple’s going to beat MS to getting metadata search capabilities (it won’t be in Windows until Longhorn in 2006ish). The devil is in the details though, and its usefulness will depend on how good it is at extracting useful metadata from files (will it be able to search based on GIF/JPG comments? EXIF headers? Comments in text-based files?).

Automator: Now this could be very useful. There have been times where I’ve wanted to repeat a task a bunch of times, and I knew I could probably do it in something like AppleScript, but I didn’t want to have to stop, refresh my memory on the scripting syntax, write the script, experiment, debug it, etc… This sounds like it would nicely cover that gap where something’s annoying to repeat by hand, but manually scripting it feels like too much work.

Smooth

Whoo, fully upgraded from Slackware 9.1 to 10.0 in just under two and a half hours. And without rebooting, even — uptime is still 77 days and counting…

The only major pain was updating config files in /etc, but even then the differences were pretty minor (Slackware’s major draw is that it keeps things pretty simplified and straightforward for power users, so there aren’t umpteen zillion layers of wrappers that get completely rewritten from release to release). The only annoying one was Apache, due to some loadable modules being moved around.

Now to see what all the hubbub over GNOME 2.6 and the new Nautilus is… Tomorrow. Zzzzz….

Update:
So far only two things seem broken: SpamAssassin had to be reinstalled because it likes to hardcode paths to the Perl library directories when you ‘make’ it, and the session startup path to ‘gkrellm’ had to be adjusted since it’s an official package now and thus moved from /usr/local/bin to /usr/bin.

I don’t really like the new ‘spatial’ method of traversing folders in Nautilus in GNOME 2.6; I like my directories deep and don’t want six gazillion windows open just from browsing through them. Fortunately though, it’s configurable. Somewhere…

Fat Fingers And Laptops

I like my iBook well enough, but dammit, whenever I’m typing I often accidentally hit the up arrow whenever I go to press the Shift key. If done in the wrong order, this causes the whole previous line I just typed to be highlighted and then overwritten by the next character I type before I notice what’s happening. Grrr…

Maybe I need to take proper touch-typing lessons. You’d think after all this time I’d be good at it, but my fingers are still mostly all over the place…

My PC Has Turned To The Dark Side

Star Wars: Knights of the Old Republic is a great game, but it’s still pissing me off mightily. Why? Simple, it seems like I can’t go five minutes without the stupid thing crashing on me… It crashes when it loads new areas. It crashes at the start of cutscenes. It crashes if I look at it funny.

It’s somehow related to the video drivers, since the debug dump is almost always in ‘atiogl.dll’ or something like that, the ATI OpenGL subsystem. Reverting to the previous version of the ATI Catalyst drivers helps; it now only crashes every dozen or so area changes instead of every other one. Except that there’s a bug in that version of the drivers that makes the frame rate choppy…

Ugh, this is part of what’s driving people to develop and play games on consoles like the X-box instead. Its version of KoToR certainly doesn’t have these problems…

Update: Although the latest ATI Catalyst drivers are version 4.6, I apparently have to go back *four* whole releases to 4.2 if I want KOTOR to be stable and run smoothly. Wheee…

The New Old Version

Firefox 0.9 is out now, for better or for worse (good: bugs fixed, bad: hideous new default theme).

On the Windows version, they made a slight goof though. It looks like it imports all of the previous configuration settings, but the version of the browser reported in the user agent string is one of those settings, so it continues to identify itself as Firefox/0.8 if you do an upgrade from 0.8. OOPS.

The OS X version seems to report the correct version after an upgrade, though.

If someone really needs to tell the ‘fake’ 0.8s apart from the real 0.8s, the ‘fake’ 0.8s also have ‘Gecko/20040614’ as part of the user agent string.