I had built an early version of libxosd for my Solaris SPARC systems a year or two ago, since it provides a very tidy way to have a ubiquitous onscreen clock with a wide variety of window managers. libxosd went, when I was distracted, through a substantial rewrite, culminating in a 2.2.x series release. And I'm running Solaris 10 (with smf(5)) on a dual Opteron now, as I've mentioned before.
I generally try to build OSS software with the Sun Workshop/Forte compiler suite first, but for libxosd, I recommend going directly to GCC. There are too many mistakes in the autoconf/libtool pairing to bother fixing—none of these appear to be libxosd issues. (I mean, couldn't -Wall not be passed to cc by now?)
Recommended.
I'm often manipulating over 100 files when I'm making modifications to various software components. Generally, the buffers menu in Vim (X11/Motif) handles this okay, unless all of the files are named with the same letters. In a recent batch of changes, 90 of my files were named "Makefile", "prototype_com", or "pkginfo.tmpl"; this results in the buffers menu being larger than the vertical height of the screen.
I tried a few of the publically available scripts, and found BufExplorer to be all I needed and more: since it turns the list into an additional buffer, with various viewing and sorting options, it's easy to search and select the correct buffer to modify. And your fingers need never leave the keyboard.
Recommended.
I figured I should mention that I'm going to make most of my Solaris-specific comments on my blog at blogs.sun.com. We'll see if I can keep the topics meaningful and interesting on both, without halving my posting rate on each.
I use ion as my window manager, but have recently switched my home desktop from a G4 Cube to a PC running Solaris. I'm a regular full-screen VNC user, and getting vncviewer and ion to cooperate is pretty key. Fullscreen mode can be achieved using vncviewer and ion (from blastwave, or build them yourself) with only a few modifications to the X resources for vncviewer. These aren't at all tricky, but require enough experimenting that writing them down will save someone somewhere five minutes some day.
Although the fullscreen transition will mostly work, ion will be confused about the keyboard focus, so we need to tell vncviewer to take additional responsibility. Add the following to your $HOME/.Xdefaults file:
vncviewer.grabKeyboard: true vncviewer.fullScreen: true
For the latter case, you could instead use the -fullscreen option to vncviewer or the on-screen menu. That's it: you're immersed in a virtual reality... which for me is mostly the same as my normal reality.
Update (9 June): Five minutes saved already; see Comments.
Here's an interesting survey: Sun wants to know how secure the default install for Solaris 10 should be. If you listened to the NetTalk on Wednesday, then you might be able to guess that your input here probably means more work for my team and me.
(I suppose I should really split work blogging from home blogging. Oh, well: work's particularly fun right now.)
Stephen's one of the so-called "rocket scientists" in the Solaris 10 Technical Discussion being offered as a NetTalk tomorrow. (It's at 1pm PDT.) You can register for the live session (or for details about hearing a replay later).
(You would think folks would rather hear from computer scientists or software engineers or operating systems designers than rocket scientists on this kind of topic, but perhaps not...)
I've been using a dual Opteron as my primary desktop lately, but Solaris doesn't support the sound device included on its motherboard. After asking around about the likelihood of support arriving, I was told that one possible path was to use a USB Audio device instead.
So I drove off to Fry's to look around and found, as is always true when I look at PC peripherals, that there is a wide variety of such devices, ranging from a cheap plastic version with only a few features to US$100+ options from Philips and Creative.
I ended up selecting from the midrange, and bought the Hercules Gamesurround MUSE Pocket, which is a little chrome number with a big volume dial (which Solaris supports) that doubles as a mute button (which it doesn't) and 5:1 surround sound (which I can't test). (Generally the Gamesurround gets middling reviews, but as a USB Audio pod when no sound support is available, I like it.)
Recommended.
References: :bufdo
If you use vim, then you may have discovered that its documentation, while extensive, is nearly impenetrable. One operation I often have to do is
$ for x in [list of files]; do > sed -e '[some substitution]' < $x > $x.bak > mv $x.bak $x > donesince most Unix-based editors don't offer multi-file replace. It turns out that, sometime between 5.3 and 6.x, vim has added the
:bufdo command, so this operation is much simpler as
:bufdo. (See "impenetrable documentation", above.)
I've reformatted the software:dockables page to bring it in line with the site's general format; it's still one of the more active entry pages for blueslugs.com (along with the grammar entry in Ben's ABC collection).
I was trying another web server statistics package, awstats, based on a testimonial in Alan's blog. Unfortunately, awstats expects a log file to be in the `combined' log format, and blueslugs.com has many entries in the default `common' format (prior to a switch for superior logging). A search showed no obvious small script for this, so I hope that providing massage_log.pl will save someone a few minutes or, at least, a few thousand log entries.
I've started using analog to build reports from the blueslugs.com server logs. One of the tools on the site is minidns, which is a small Perl script that runs through the logs, replacing any IPv4 address matches with their DNS-resolved names (if defined). I've improved this slightly, by adding caching inside the application (on the grounds that your site is likely visited by the same communities over time) and, via Storable, to a state file (on the grounds that you probably run the analyzer over your logs rather regularly). [Get cachedns.pl.]
Is it worth it? Read on.
Here are some simple timed runs with the original (minidns.pl) and with cachedns.pl.
$ time perl minidns.pl < ./al.1000 > /dev/null real 1m56.431s user 0m0.030s sys 0m0.030s
al.1000 is the first 1000 lines of an Apache server log.
Our name service cache, nscd(1), and the DNS server we're calling (and the perl(1) text) are now reasonably warmed up for subsequent callers.
154 $ time perl minidns.pl < ./al.1000 > /dev/null real 0m11.210s user 0m0.030s sys 0m0.020s 155 $ time perl minidns.pl < ./al.1000 > /dev/null real 0m12.943s user 0m0.050s sys 0m0.010sSo 1000 calls take a little over 10 seconds. Let's run the caching version:
$ time perl cachedns.pl -c dns.cache < ./al.1000 > /dev/null real 0m8.579s user 0m0.090s sys 0m0.020sSo the internal caching is maybe making a little difference. But let's rerun with the now-populated cache file.
$ time perl cachedns.pl -c dns.cache < ./al.1000 > /dev/null real 0m0.096s user 0m0.070s sys 0m0.010sSince the first part of the log file is processed every night, our cache file means that we're likely only going to perform a DNS lookup for new visitors to the site. (There are many sophisticated DNS resolvers-for-weblogs around, that use C++ or Python or threading or whatever. I just felt that a simple, understandable Perl version, with a boost, was enough for this little site.)
I've used pretty much every VNC client available for Mac OS X over the past year. My preferred client now is Chicken of the VNC, even though the pun makes me cringe. Recommended.
I recently started using Sun's version of GNOME 2.0 as my primary desktop environment, and decided that I needed an icon to launch my favourite mail application, mutt. I'm not much of an artist or a GIMP expert, but I was able to combine the GNOME terminal icon with the mutt in the Mutt banner:
![]()
Feel free to use it, if it's useful to you.