Sunday, December 28, 2008

Finally got some photos posted

It's been a long time since I posted new photos at Pbase. I had a big backlog of photos, and I finally finished processing them all this weekend. So I uploaded Seattle and Northwest photos from 2007.

http://www.pbase.com/saalwaechter/cwb

http://www.pbase.com/saalwaechter/pnw07

Friday, December 5, 2008

X server problem with Debian etch in VMware

When I install Debian etch in VMware, the system comes up on first boot with:

"Failed to start the X server (your graphical user interface). It is likely that it is not set up correctly. Would you like to view the X server output to diagnose the problem."

The log contains: "(EE) No devices detected. Fatal server error: no screens found".

Fix this by editing /etc/X11/xorg.conf and change the ``Driver "apm"'' line to ``Driver "vesa"''. Here's the diff:

--- xorg.conf.orig 2008-12-05 15:10:43.000000000 -0800
+++ xorg.conf 2008-12-05 15:23:59.000000000 -0800
@@ -65,7 +65,7 @@

Section "Device"
Identifier "VMware Inc [VMware SVGA II] PCI Display Adapter"
- Driver "apm"
+ Driver "vesa"
BusID "PCI:0:15:0"
EndSection

Permanently ignore packages in Apple Software Update

An annoyance of using iTunes is the Apple Software Update. At one point it forcibly pushed Safari on users. At least now Safari is an optional package. The problem is that Safari, and other packages, are "checked" for install by default. I was constantly having to pay attention to make sure I didn't accidentally trigger Apple's relentless quest to get Safari on to my machine.

Well, there is a solution. Under the Tools pull-down menu, there is an "Ignore Selected Updates" option. So one can simply check Safari and other packages, then use "Ignore Selected Updates". From then on, Apple Software Update will behave as though those packages don't exist.

Friday, November 21, 2008

error: install: %pre scriptlet failed (2), skipping coreutils

I've been working lately on OS installation into image files, along the lines of the process here.

The "/usr/bin/yum -c yum.conf --installroot=/mnt/foo.img -y groupinstall Base" step for me kept producing significant errors of the form: "error: install: %pre scriptlet failed (2), skipping coreutils-x.y.z". This occurred for 16 packages in my case.

Several google hits suggested problems with selinux, but that wasn't the source of the problems in my case. After much troubleshooting I finally discovered that an RPM macro was the culprit.

In my ~/.rpmmacros file I had this entry:

%_tmppath %(echo $HOME)/rpmbuild/tmp

That's because on some hosts the default %_tmppath of /var/tmp has insufficient space, but my home directory generally has plenty. During install, yum/rpm writes out rpm scriptlets to %_tmppath. Using --installroot with yum causes a chroot(), so that path is invalid within the chroot() environment, and for some reason a number of %pre scriptlets fail in a way that causes yum to not install the package.

I did look through the Base package group, and it wasn't just the rpms that happen to have a %pre scriptlet that failed. It was a subset of them, and I haven't had the time to determine what it is about those particular %pre scriptlets that invoked the error. Regardless, removing the %_tmppath macro from my ~/.rpmmacros eliminated the error and let the yum install work properly.

(Use the "rpm --showrc" command to see your current value for %_tmppath.)

Thursday, November 6, 2008

ChaCha

I occasionally use Google SMS to check sports scores or flight info, but its query ability is limited to a few topic areas that it knows how to process. Today I checked on an Indianapolis-based startup that I've followed over the years. It's called ChaCha and it's at http://www.chacha.com/. ChaCha uses human guides as part of its search processing, so you can send conversational free-form questions.

The interesting thing is that they now specialize in mobile searches. You simply text your question to CHACHA (242242), and you'll get a reply. This is much more flexible than Google SMS, because you can ask anything. It's basically like calling a friend and asking them to quickly research a question for you.

For example, you could text this to ChaCha: "Does everyone in Minnesota like chocolate pudding pops?"

Anyway, give ChaCha a try.

Friday, October 31, 2008

Pumpkin Seeds

In recent years our family jack-o-lantern tradition has come to include roasting the pumpkin seeds. Here's what we do:

1. preheat the oven to 300 F

2. Remove all the seeds, separate them from the pumpkin goo, and clean them. This is tedious and usually takes me 20-30 minutes.

3. Dry off the seeds with paper towel. They don't have to be completely dry.

4. Put them in a bowl and add the following per cup of pumpkin seeds: a) tbsp olive oil, b) 1/2 tsp salt, c) tsp garlic powder. Mix and coat well.

5. Spread the seeds on a cookie sheet

6. Bake in oven for 45-55 minutes, stirring/flipping every 15 minutes.

Mmmmmm... pumpkin seeds

Monday, October 20, 2008

request_module: runaway loop modprobe binfmt-464c

Short answer: If you are getting this error right after linux kernel initialization, you are likely booting a 32-bit kernel with a 64-bit OS.

Long answer: If you boot a 32-bit kernel with a 64-bit OS, when the kernel tries to start /sbin/init (a 64-bit binary), it won't recognize the binary format, and it'll try to load the binfmt-464c kernel module, which is ELF support. (ELF support is generally compiled into the kernel, not built as a module, by the way.)

The reason for the loop error is that the kernel is trying to invoke modprobe to load the module, and modprobe is itself an ELF binary, resulting in a recursion loop...

Thursday, September 18, 2008

Ambiguous Ad

On my way in to work this morning I noticed this ad in the bus: "Working in healthcare and love technology?" It then went on to give information about a local community college's medical informatics program. For 15 seconds I was wondering what "love technology" is a euphemism for... Then I saw what the writer really intended.

Saturday, August 16, 2008

What words cause gmail to not display any ads?

I've noticed that email messages that include the word "funeral" trigger gmail to not display any ads. What other words result in this behavior?

Sunday, August 10, 2008

Fedora and xterm1 and ncurses-term

The xterm alternate screen behavior is quite annoying. That is, programs like man or vi or less use the alternate screen, and when they exit the original screen is restored. (See http://fixlog.blogspot.com/2006/09/stop-gnome-terminal-screen-clear.html for an animated example.)

I've always switched to using TERM=xterm1, which is the same as xterm, but with the alternate screen clearing disabled.

Today I installed Fedora 9, and I found that xterm1 was not present in /usr/share/terminfo/x. Searching for information about xterm1 is pretty fruitless. In the end, I pulled down the ncurses source rpm and rebuilt it to track down xterm1. The answer was that xterm1 got moved into a secondary package named ncurses-term, which was not installed by default. So a "sudo yum install ncurses-term" did the trick.

Thursday, February 7, 2008

Unsolved "Windows - No Disk" error with ipod nano

I have an ipod problem that's been plaguing me for months, and the all-knowing Internet has failed to provide an answer! I won't repeat all the details, because they are already well documented at http://forums.ilounge.com/showthread.php?t=208152

This also reminds me that Apple is goofy about not providing detailed release notes for software and firmware updates. Why do they do that?

Saturday, February 2, 2008

Javascript alert / confirm trap

Yesterday I hit a web page that contained an infinite javascript loop. That's usually not too bad, because the browser will recognize that and say something like, "A script on this page is taking too long -- stop it?"

The problem this time was that this javascript infinite loop had calls to both the alert and confirm functions. Those functions pop up modal dialog boxes. So instead of a loop that was chewing up cpu time, this one was popping up OK and Yes/No dialog boxes as fast as one could close them. The nasty bit is that these are both modal dialog boxes, so one cannot do anything else in the browser while they are displayed.

In the old days, I would have just killed the browser and restarted it. But these days, with tabbed browsing, I wasn't just killing that page, but all my other tabs, too. Fortunately for me, at the time I had no unsaved state in any tabs. If I did I would have lost it. There's no way to even copy/paste before killing the browser, because of the modal state.

Why can't a modern browser detect this situation and offer a clean escape? For example, if a page has popped up five modal dialogs within five seconds, then offer the user something like, "This page is opening dialog boxes quickly -- stop loading?"

Sample page demonstrating this trap:



<html>
<head>
<title>Modal Hell</title>
<script language="JavaScript">
<!--
function infinite_loop(txt) {
while (1) {
alert(txt);
txt=txt+'.';
}
return;
}
-->
</script>
</head>

<body>
Can your browser break out of this?
<p>
<a name="foo"
onclick="infinite_loop('Now stuck')">
<u>Click me to start an infinite
modal dialog loop</u></a>

</p>
</body>
</html>

Monday, January 21, 2008

Firefox and the default printer

Firefox printing woes...

Firefox's default behavior is to remember your last printer and printer settings, and then use them indefinitely until you change them. This seems to be controlled by the print.save_print_settings configuration flag, which is true by default. You can see this in firefox by going to about:config and filtering down to the "print" settings.

This behavior is counter to the expected behavior for Windows applications, which almost always revert back to the Windows system default printer and printer settings between sessions of an application. I know firefox isn't a "Windows application", but when running on Windows, why not behave like one? When in Rome, and all that. It's just an annoyance to be different than a platform's typical behavior.

Here are the two problems I have with this:

1. On rare occasions I will print something from firefox in landscape mode. Of course, when I print the next thing, I forget that the setting stuck, and it comes out landscape, too.

2. On rare occasions my default printer near my office will be broken, and I'll print something from firefox to a secondary printer on the other side of the building. Guess what? The next time I print, my output goes to the other side of the building, and I have to curse firefox for it.

None of my other apps running under Windows suffer from this silly need to hold onto the last printer settings.

So yesterday I figured I'd do a quick web search and find the option to make firefox behave "properly" under Windows. That is, always go back to the system default printer and settings between sessions. Surprisingly, there was no good hit for "firefox default printer". The main hit was this goofy thread in which most people are debating whether or not this issue really exists, but in the end nobody solves the problem: http://readlist.com/lists/lists.mozilla.org/support-firefox/0/2677.html

I did find the
print.save_print_settings configuration setting. I set it to false, but for me all that did was make firefox just never change the printer settings again. That is, whatever settings were active when I set it to false became the default settings forever. That's still not what a regular Windows app will do. It should track changes the system default printer.

Eventually I found advice to close firefox and manually edit prefs.js. I did do that, and I found a bunch of print settings for all the configured printers on my system. I just deleted all print-related entries in prefs.js except this one:

user_pref("print.save_print_settings", false);

Now firefox behaves as I expect it. It defaults back to the system default printer and default settings every session, and if I change the system default printer, that change is reflected in firefox, too.

I'm surprised I didn't find an obvious KB article or other top web hit for "firefox default printer".