Hump Day Ramblings

I accidentally shut down my X server yesterday before I left work, so I took the opportunity to install the custom nVidia driver on my X desktop. And I must say, the proprietary driver is much nicer than the nv driver that comes with X.org. Someone at nVidia has put a lot of work into making these cards work well with Linux. The installer script produced a working config file that started right up, with acceleration enabled to boot.

The nVidia driver has a built-in option called “TwinView” which provides multihead support via the VGA and DVI ports on the card. It replaces Xinerama, although supposedly Xinerama can still be used to provide the same functionality. However, TwinView seems to be the better alternative because it provides acceleration on both displays. It also adds Xinerama-compatible “hints” to the X server so that window managers will work the same as with Xinerama. It’s really very well done. So now I have a full 24-bit display across both monitors, with acceleration. Right now I’m still using the widescreen as my “main” display and the standard display as my “secondary” screen. I’m going to try it like this for awhile, and if I don’t like it I’ll switch them.

The only configuration challenge was getting both displays working at their respective resolutions. I accomplished this with the following Device section:

Section "Device"
Identifier "nVidia"
Driver     "nvidia"
BusID      "PCI:1:0:0"
Option     "TwinView"
Option     "MetaModes" "CRT-0: 1680x1050, DFP-0: 1280x1024"
Option     "TwinViewOrientation" "RightOf"
EndSection

The MetaModes line is the important one.

[More:]

While testing things out, I also learned something about VNC: It compresses the pixel depth over slow connections. To force full-color rendering, I need to do

vncviewer -FullColor host.name:display

I was initially scratching my head as to why it was still rendering limited colors despite the 24-bit display. That explains it, and I may want to keep full color rendering disabled to maximize performance over my slow DSL uplink.

Also, this morning I hooked a scavenged SCSI disk up to my PC at home, mainly as a proof-of-concept: The disk uses 68-pin wide SCSI, and my controller uses 50-pin narrow SCSI. However, all I needed to make it work was a 50-to-68-pin adapter cable. I just jumpered the drive to SCSI ID 1 and plugged it in. Initially I had an external terminator on the drive case, and that hosed things. When I removed the terminator, it worked. Apparently my controller wants to terminate the bus itself. At any rate, now I have a spare 72-gig drive with its own case and power supply.

And finally, what’s a summer blog entry without a mention of the pool? Last week, the backup valve on my Polaris 380 broke. The valve mechanism itself is a big mess of gears and turbines, which fits into a plastic enclosure. The enclosure is made up of two halves held together by a screw-on collar ring, with a couple of o-rings to prevent leaks. The screw-on collar piece is what actually broke, probably after the valve was dropped onto the concrete pool deck one too many times. The mechanism itself was undamaged. Fortunately, Polaris sells a replacement case kit separately, and it’s much less expensive than an entire valve. The annoying thing is, the case kit only includes one of the two necessary o-rings. The included o-ring seals the two case halves together. The other one seals the backup jet to the case. It’s “technically” not part of the case, but if I’ve got the valve disassembled anyhow, I might as well replace both o-rings as they’re both probably worn out. It’s a small o-ring (1/2″ O.D. x 3/8″ I.D.) and it would have been nice if Polaris had seen fit to throw one in with the case kit. Oh well. For future reference, I found a replacement o-ring at Home Depot, in the plumbing section where they have the faucet repair kits.

Well, I guess I should get to work now.

Success with Dell widescreen monitor and X.Org

What a difference a video card makes…

A couple months back I tried getting a Dell 2007WFP working with X, using the Intel graphics controller built into my motherboard. I didn’t have much luck. Well, now I have a new video card, with an nVidia GeForce MX 4400 chipset. And, all I had to do was specify the card, driver and resolution (1680×1050) in my xorg.conf, and it worked right away. Great. Still more work than it was with my Mac (where I just plugged it in and it worked), but not bad at all, especially considering that this is X.

Still a few things to be resolved:

  1. The new card is only working through the VGA port. Need to figure out what magic incantations I need to use DVI.
  2. Apparently I can’t use the onboard graphics controller and the new (AGP) card at the same time. As soon as I plugged the new card in, it was like the onboard controller didn’t exist. So, I’m still stuck using the old Matrox PCI card for my other monitor. The Matrox only has 8mb video memory, which limits me to a 16 bit display depth. The MX 4400 apparently supports multiheading via the DVI port and VGA port, so I’ll have to see if I can do this with X.
  3. The widescreen monitor is vertically smaller than my other standard-resolution flat panels. I’m getting a little squinty-eyed staring at it. I think I may make it the “secondary” display and use a physically larger screen as my “primary” display.

But all in all, I’m really happy to have the 1680×1050 working, and without much extra fiddling or hair-pulling.

On another note, I’ve restored sonata to a new drive (after its old drive crashed). I lost a few files before I backed the dying drive up. The system works fine, but fonts in some applications are screwy (screwy fonts in X is a relative term, of course…). So, I may end up reinstalling the machine anyhow…

Followup… looks like I may need to use nVidia’s driver (instead of the built-in nv driver) to get multihead support. I’ll try that out later this week.

Crash.

Well, the hard drive in sonata, my desktop machine at work, is dying a slow death. I saw the writing on the wall a few months ago, and now it’s finally biting the big one. I’m typing on the box now, but it’s slowly getting wonkier and wonkier as it churns out ever more i/o errors, read errors etc.

A new drive is forthcoming, but in the meantime, I’ve managed to back up what’s left of the old drive, so I can restore it onto the new one. And, I’ve found that when it comes to archiving drives with errors, cpio beats tar hands down. I started out doing

cd /filesystem
tar cvplf - . |
ssh other-box "cd /backup/disk; tar xpf -"

But, it dies as soon as it hits a bad spot.

I ended up doing

cd /filesystem
find . -xdev -depth -print |
cpio -o --verbose -H newc |
ssh other-box "cd /backup/disk; cpio -id -H newc"

The -H option is needed to back up files with inode numbers greater than 65535.

Cpio is even more obfuscated than tar WRT command line options, etc., but it seems to do a better job at disaster recovery.

Fun fun…

FP using new concerto

I’ve got my “new” P3-750 box booted up as concerto.ucs.umbc.edu. This post will hopefully confirm that b2evolution is working right. Things are looking pretty good. My calendar and photo album appear to be working. I set up my Oracle Calendar download stuff and it looks good. The RRBC mailing list is back up and running.

The new box actually has slightly less RAM than the old one: 512M vs 576M. The old box will be going home to replace my old 300mhz P2 server, and I decided that I could use the extra RAM there more than here. So, the home machine gets 640M, and concerto gets 512M.

Next, I need to do some memory, disk and video-card shuffling amongst the machines, so off I go to shut everything down…

sshdfilter config

I’m beginning to think I need to set up a Wiki for this stuff.. but later.

Trying to get the sshdfilter stuff up and running on my new Debian box, and of course I didn’t document the process when I did it on 3 previous machines awhile back, so here goes.

  1. Install sshdfilter script in /usr/local/sbin
  2. Edit /etc/init.d/ssh. Look for two lines that look something like

    start-stop-daemon --start [...] /usr/sbin/sshd -- $SSHD_OPTS

    Replace them with

    start-stop-daemon --start --quiet --exec /usr/local/sbin/sshdfilter -- $SSHD_OPTS &

    Don’t forget the trailing ampersand!

  3. Create an executable file /usr/local/etc/iptables.sh:


    #!/bin/sh
    modprobe ip_tables
    iptables -N SSHD
    iptables -A INPUT -p tcp -m tcp --dport 22 -j SSHD
    exit 0

  4. Modify /etc/network/interfaces. Under interface eth0, add the following line:

    pre-up /usr/local/etc/iptables.sh

And that should do it.

Reinstalling ‘grub’ boot loader

OK. Documenting this here for the next time I have to do this.

I’m working on setting up a computer that dual-boots into Linux and XP.

Rule 1: Always put Windows on the first primary partition on the drive. Linux can go pretty much anywhere else.

Rule 2: Always install Windows first, then Linux, so the boot loader will get set up properly. I knew this, but chose to do things the other way around anyhow (yep, I’m stupid that way). And of course, the XP install hosed the Linux boot loader, so I had to manually restore it, which was a big pain.

Here’s how I reinstalled the boot loader, for the next time I ignore my own advice…

  1. Boot into the Debian netinst CD, or Knoppix, or Tom’s Root Boot, or whatever flavor of standalone Linux you prefer.

    With netinst, you’ll need to walk through the install process until it gets to the disk partitioning part (this ensures that the disk devices are loaded). Then, hit ALT-F2 to get a shell.

  2. Create a mount point, say /disk, and mount your root filesystem there. Example: mount /dev/hda5 /disk
  3. chroot /disk
  4. Mount any additional filesystems you might need, like /boot, etc.
  5. grub-install /dev/hda

That’s all I needed to do, but it took several unsuccessful attempts to arrive at this.

References: here and here.

Lots of fun stuff

A smorgasbord of various topics today.

I biked in for the first time since 6/21 today. A week of bad weather at the end of June, followed by a 5-day Independence Day weekend, then more unsettled weather the following week, all combined to keep me off the bike for awhile. Our boiler job starts tomorrow, which will potentially affect later rides this week, so I figured today was do-or-die if I’m going to get back into a routine. So, I did.

I also signed up for online bill-payment through our brokerage, now that they’ve kindly made it free. I haven’t used a bill payment service since the late 90s, and I’ve heard they’ve come a long way. I hope to try it out later in the week — I need to wait for some material to arrive snail-mail first.

And, lastly, I’m going to do a bit of computer shuffling..

[More:]

Currently, I have

Name Location CPU OS RAM Disk Use
sonata office P4 2.4ghz Linux 512mb 150gb Desktop
concerto office P3 450mhz Linux 576mb 8gb Server
doze office P3 700mhz Windows XP 384mb 20gb Windows Desktop
snorkelwacker home P2 300mhz Linux 384mb 16gb Server

Now that I’m running Remedy on a centrally-maintained Windows 2003 server, and I’ve switched from SQL Navigator to Oracle SQL Developer, I no longer need a full-time Windows desktop in my office. I actually will only need Windows when I’m watching my son, so he can play games. So, I’m thinking I’ll take the 700mhz box, add some memory to it, and make it my office server box. It’ll run Linux full time and dual-boot into XP on the rare occasion that Michael is here. Then I’ll take the 450mhz box home, make it my home server, and put my ancient 300mhz box out to pasture. That will buy me a bit of extra performance at home, and more memory (the 300mhz box is maxed out at 384mb).

For the future, I’m moving away from Linux on the desktop in favor of OS X. So, my next new desktop computer will most likely be a Mac, which will then free up the 2.4ghz box. Then, the bubble-down process will begin again. Fun fun!

Dell Widescreen Monitor + Linux: Utter & Complete Frustration

I just wasted an entire day trying to get a new Dell 2007WFP working with my 3-year-old Dell GX270 desktop, which runs Debian. The result: total failure. It works at 1280×1024 (and looks all stretched out), but flatly refuses to work at the monitor’s optimal resolution of 1680×1050.

In the xorg.config file, first I tried just adding a new “Screen” resolution for 1680×1050. This failed with “no such mode” or somesuch. After much head scratching and googling around, I learned that I needed to patch my video BIOS (Intel 810 series) to add the new mode. I did this via a utility called 915resolution. This seems to work.

With 1680×1050 programmed into the BIOS, I then tried several different ModeLine entries in the config file, with varying different modes of failure. At certain settings, X would refuse to use the mode, complaining about “vrefresh out of range” or something. At other settings, when I started X, the monitor would go into power-save mode as if it wasn’t receiving a signal. At other settings, the monitor would display a message stating that the signal was out of range and it couldn’t use it. I fiddled with turning DDC on and off, to no effect. Everything I tried resulted in one of these three failure modes. I’m pretty sure I’ve got good ModeLine numbers, as they match what’s reported by DDC in the X.org log.

I’m pretty much at my wit’s end here, so I’ve given up for now and am back to using my old dual-monitor xinerama setup. Needless to say, I’m not too high on the whole Linux/X desktop scene right now. I’m ready to punt the thing and go to a Mac.

A bit of everything today

I skipped work today so I could ferry the clan around on various errands, and seized the opportunity to knock a few odd things off the to-do list.

First off, I paid my first visit to Namco, my favorite place to get pool supplies. The prices have gone up this year, which comes as absolutely no surprise to me. But, they’re still pretty much the cheapest place around for chemicals, particularly after late August when they blow everything out at half price (which really drives home how high the dealer markup is on pool chemicals). I bought a couple 5-gallon jugs of liquid chlorine, which is basically sodium hypochlorite (household bleach) at about twice the strength of grocery store bleach. Namco has this stuff at $13 for 5 gallons, plus a $6 deposit for the jug. That’s a decent price, and it makes me wonder how much of a premium I’d pay to use this stuff instead of calcium hypochlorite for daily chlorination. The main advantage of cal-hypo is its shelf life: I can buy it at half price late in the season, and it’ll still be just as potent the following spring. Its drawback is inconvenience. To avoid clouding the pool water, you need to dissolve the cal-hypo in a pail of water, then pour it off. Then you have a lot of sediment left over that you have to get rid of. The liquid chlorine is much more convenient, but its shelf life is shorter, so I’d need to buy it at full price during the season. The challenge here is to figure out the true effectiveness of the cal-hypo vs the liquid stuff, then see how much of a premium I’d pay for the liquid stuff, and determine if the convenience is worth the price difference. I love doing this kinda stuff, so you can be sure I’ll tackle that soon..

In other news, we got our vegetable garden planted. To keep the critters at bay, we strung chicken wire around the garden and hung some old CDs above it. The theory is that the CDs will blow around and flash as they catch the light, which discourages birds. We’ll see how it does this year. I guess the next step would be to add lawn edging to prevent moles/groundhogs/etc.

… and finally, I made a stab at speeding my wife’s anemic Windows XP box up a bit. Basically I went into the Microsoft System Configuration utility (Start Menu -> Run -> enter msconfig), went to the “startup” tab, and disabled a whole bunch of unnecessary kruft that the OS was starting up at boot time. It’s amazing the amount of junk that accumulates there over time.. Quicktime crap, Adobe crap, crap from some kid’s software we installed, crap from Dell, crap from the stupid stuff that Dell pre-installs on the computer, AOL crap, the list goes on and on. After I turned a bunch of stuff off, I rebooted and the machine seemed a good deal snappier. I guess we’ll see how it goes from here.

More on Coppermine

Still playing around with Coppermine, trying to set things up so that Cathy can have a separate login and still have the ability to upload and edit photos in the public albums. First, I tried setting her account up in the registered group. After a bit of fiddling and RTFMing, I was able to get it so that the account could upload to public albums. I had to

  1. Remove the disk quota from the registered group (group admin area, change default quota from 1024K to 0)
  2. Enable registered group to upload to public albums without admin approval (group admin area)
  3. For each album, go to the configuration page (go to album list and click “properties”). In properties, select “Visitors can upload files”

After I did that, I could upload pictures, but once uploaded, I couldn’t do anything further with them (like adding captions etc). So it looks like this isn’t the answer. That leaves me with two options:

  1. Add Cathy’s account to the administrators group; or
  2. Move all the albums to Cathy’s “personal” album space, so she “owns” them; then she should have access to them and I can access them through my administrator account.

For now, I’m going with option #1 because it’s the easiest.