February 2007 Archives

Jeremiah Foster

AddThis Social Bookmark Button

If I held Microsoft stock (which I don’t) I would be furious.

Here is Steve Balmer focusing on Linux, making the tired claim that there is so-called Intellectual Property in Linux that violates patents held by Microsoft. Meanwhile Microsoft gets hit with a hefty patent violation of its own; 1.5 billion (yes, that is a “B”) for the use of the mp3 patent without payment of royalties. It appears that patent obligations are for others, not for Microsoft to worry about.

But wait, you say, the current international patent system is a mess and this ruling is indicative of that, this is actually an unfair decision against Microsoft which will impact any number of companies, like Apple, who use mp3 based technology. Furthermore, you say, patent verdicts are often reversed upon appeal so we ought not to snicker gleefully in our beer just yet. And I would say you are right, but still I would expect Mr. Balmer to be honest; if there is a patent infringement of Microsoft code, he should point it out. If I were a shareholder, that is the least I would expect. After all, isn’t that his job? To protect shareholder value? So why is he not doing that? Why is he not pointing to the code that violates intellectual property? And why does Horacio Gutierrez, Microsoft’s VP of intellectual property and licensing, say, “We believe there is overlap between our IP portfolio and several open source components.”

Overlap? You mean the clean-room engineering of Samba? Could you please be specific Mr. Gutierrez and Mr. Balmer? Meanwhile, time to review your own patent portfolio and “IP” practices to see if there might be a better way to provide value for your shareholders, like innovating. A quick look at your stock price the last few years should be enough to warn you both that shareholders cannot possibly be happy.

AddThis Social Bookmark Button

James Ward, a Flex evangelist, repeats the tired fib that “Flash runs on Linux” in How I Overcame My Fear of Flash.

James, if we’re ever in the same area, let me hand you the notebook sitting right here. It runs Linux. I’d love to see you get Adobe’s Flash plugin running on it. Did I mention it runs Linux?

No fair backing out when you realize it has a PPC chip inside. Flash should just work, right, because Flash runs on Linux?

I don’t really care if any company decides not to port proprietary software to one particular architecture or another. Yet if you deliberately do not support a platform, please be clear about it.

Flash for Linux runs only on x86 and 64-bit x86 CPUs. That’s fine. That’s Adobe’s choice.

Why is that so difficult for Adobe and Flash supporters to say?

Juliet Kemp

AddThis Social Bookmark Button

Two things today: a recommendation and a question.

  1. I recently discovered ClusterSSH. This enables you to set up “sets” (clusters) of hosts, log into them all at once, and then whatever you type in the main cssh window will be replicated in all the hosts. The xterms are all shown so you can check what’s going on; and you can also select any host xterm to make changes just on that host. Works best if you have ssh key logon set up, for obvious reasons. Very useful! See their FAQ for more information.
  2. I keep a fair amount of my system notes on a wiki (MediaWiki). I could really do with backing this up occasionally into an offline-accessible form & dumping it somewhere where I can get at it if, say, the webserver is out of action. PDF or HTML would both do fine. Even text (with some sort of formatting) would do. Unfortunately, whilst there is a utility in MediaWiki to dump a static copy of the wiki to HTML, it doesn’t seem to work with multiple wikis on the same installation, which is what I have. Does anyone out there have any other suggestions? I feel sure that this can’t be a “roll your own” problem, but a scan of the utilities referred to MediaWiki2HTML doesn’t seem to be complete yet, and Terodump seems to be wikipedia-specific.

AddThis Social Bookmark Button

Apparently some guy switched from one Linux distribution to another, throws a fit, and this is news.

Hey, I’ve tried lots of distributions in the past ten years. Does anyone remember Caldera?

Anyway, the important thing in that guy’s rant may be if he raised important issues that Fedora needs to consider.

AddThis Social Bookmark Button

Not everyone in the world of free and open source software praised Greg Kroah-Hartman’s Free Linux Driver Development! offer (and see his later clarification in Free Linux Driver Development Questions and Answers!). Specifically, the OpenBSD project criticized the offer to work on free drivers under NDA.

Juliet Kemp

AddThis Social Bookmark Button

Getting dual-head monitors going with an nvidia card on Debian is largely a pleasingly straightforward business.

Edit your /etc/apt/sources.list to include the contrib and non-free repositories, and run apt-get update. Install the driver as follows:

apt-get install nvidia-kernel-common module-assistant
m-a -i prepare
m-a a-i -i -t -f nvidia-kernel
depmod -a
apt-get install nvidia-glx nvidia-glx-dev
Use lsmod to check that the nvidia module is loaded.

The final task is to edit your xserver config, which is the bit where I encountered a slight gotcha this time around; hence this post.

If both monitors can handle the same resolution, editing the Device section of your /etc/X11/XF86Config-4 (sarge) or /etc/X11/xorg.conf (etch) as follows should work:


Section "Device"
        Identifier      "NVIDIA Corporation NV44 [Quadro NVS 285]"
        Driver          "nvidia"
        BusID           "PCI:1:0:0"
        Option          "TwinView" "true"
        #Option         "ConnectedMonitor" "FPD,FPD"
        Option          "MetaModes" "1600x1200,1600x1200; 1280x1024,1280x1024"
        Option          "SecondMonitorHorizSync" "31-80"
        Option          "SecondMonitorVertRefresh" "56-76"
        Option          "TwinViewOrientation" "RightOf"
EndSection
Make sure you use appropriate sync and refresh values (these work for HP 1702 flat panel & a standard Transtec 19″ flat panel), and that the BusID is correct (lspci output - look for the line corresponding to your card. 01:00.0 translates to PCI:1:0:0 as above; 05:09.0 or 0000:05:09.0 to PCI:5:9:0, etc).

However, if your monitors don’t support the same resolution, you’ll need to change this line:


        Option          "MetaModes" "1024x768,1280x1024"
(you may also need to try swapping the two entries around - e.g. 1280x1024,1024x768 - depending on which one is being seen first). If you don’t get this right, you’ll have one screen coming up OK, and the other one coming up blank. I spent some time battling with this before the solution occurred to me; I hope therefore that this information is useful to someone else!

FWIW I’d also note that different resolution monitors is suboptimal for a TwinView setup; sometimes one has to make do with what one has, though.

Juliet Kemp

AddThis Social Bookmark Button

Last week I had to move (and therefore reboot) a machine running Debian sarge (stable) which has a couple of FireWire drives attached to it. Last time I did this it all came up beautifully of its own accord; sadly not this time. The logs showed the nodes being recognised by the ieee1394 module, but not actually being mounted.

As this machine is in fairly heavy use there was a limit to what I could try to get them back up again.

What worked eventually was:


modprobe -r ohci1394 sbp2 raw1394 eth1394 ieee1394
modprobe sbp2 ohci1394 raw1394
./rescan-scsi-bus.sh

The rescan-scsi-bus.sh script comes from Kurt Garloff and is available for download.

A significant downside to this method is that the drives wound up being recognised more than once. In this specific case: the first time, one drive was recognised once, the other one 8 times (!). Rerunning the rescan-scsi-bus.sh script another time as I was writing this: the existing drives (2 actual drives, 7 ‘fakes’) showed up again; but the first drive (the one that only appeared once before) was picked up a further 7 times. So I now have 2 real drives, and 14 fakes (7 of each, which at least is neat). Unfortunately as mentioned above this machine sees heavy use so I can’t mess around further with this (e.g. by unloading/reloading the modules and running the script some more at various stages). (And it does work, in that the drives are mounted and accessible right now, so if it ain’t broke…).

I am curious, though. This machine is about to be replaced with a superior solution, so I might get a chance to experiment in a few weeks.

Caitlyn Martin

AddThis Social Bookmark Button

Some years ago Linux creator Linus Torvalds famously compared changing operating systems to “performing brain surgery on yourself”. I’ve quoted him often because so many people seem to have unrealistic expectations when they pick up a Linux DVD or CD-ROM. I’ve recently received a couple of e-mails in response to my articles here on O’Reillynet that illustrate Linus’ point beautifully and demonstrate part of the problem Linux has faced in gaining greater acceptance on the desktop. OK, one of the e-mails was addressed to Cathy, whoever that is, but since it came to my inbox I’ll assume it was meant for me. Here are some excerpts:

Caitlyn Martin

AddThis Social Bookmark Button

Running a basic, truly minimal window manager can save significant CPU cycles and memory. This becomes important if you’re running old, limited hardware or when designing a desktop environment for an embedded Linux device. Even the oldest, most primitive window managers (think TWM or MWM) can support a pretty desktop background image. The ability is almost as old as X itself.

The tool you need is a very old, very small utility called xli. It’s included as part of X.org in many distributions. If your favorite distro doesn’t include it the source code can be found here. You can load the image of your choice either from the command line or when your window manager starts. The command you’d use to add a background to an X session that’s already running is:

xli -onroot <path-to-image>
Juliet Kemp

AddThis Social Bookmark Button

Bash is one of those Unix things that I am fully aware has a lot more potential and power than I know how to use. Every so often I go looking for another handful of useful things to learn about it: this is a selection of recent ones.

Firstly: the Debian bash package includes a file /etc/bash_completion which extends bash - for example, enabling zsh-style tab completion of hostnames. Source this file in your own .bashrc to get this functionality. It also makes it easy to extend/program bash yourself, via the directory /etc/bash_completion.d/, which is automatically sourced by /etc/bash_completion. For example, suppose you have a script foo.sh which takes hostnames as arguments (e.g. one which applies a particular command across a set of hostnames). You can get hostname tab-completion on foo.sh by creating a file /etc/bash_completion.d/foo which contains the line

complete -F _known_hosts foo.sh
You can also, of course, can get a lot more complicated - this article talks about getting tab-completion for any other arguments to foo.sh.

Secondly: $CDPATH is to cd what $PATH is to executables. Set $CDPATH in your .bashrc as follows:

export CDPATH=.:~:/usr/local/:/opt/my/long/dir/path
Then if you wish to change to /opt/my/long/dir/path/subdir, just type cd subdir at the prompt and you’re there. Note that you do need to include . in there or you won’t be able to change directories within your current directory.

Thirdly, some small useful .bashrc things:

  • shopt -s cdspell will attempt to correct misspellings of directories.
  • shopt -s dotglob allows files beginning with a dot to be returned in filename expansions.
  • export HISTCONTROL=ignoreboth stops the bash history from including either duplicate lines, or lines beginning with a space, which makes it rather quicker to navigate.
and some small useful command-line shortcuts:
  • Ctrl-r searches backwards in your bash history. I love this one very much.
  • Alt-. (that’s a full stop there) inserts at the cursor the last argument to the previous command.
  • Alt-Ctrl-y inserts at the cursor the first argument to the previous command. Further: if you hit Alt-3 then Alt-Ctrl-y, you’ll get the 3rd argument to the previous command.

Finally: a little snippet for your .bashrc that will change the title of your xterm or xterm-alike to show username@hostname:/current/directory. It updates as you change directory or ssh to another host. This is useful if you spend a lot of time opening lots of xterms on various hosts and in various directories; and it’s another visual clue as to (e.g.) whether you’re currently logged in as root. Myself, I also set my root prompts to be in a different colour to my own prompts. You can’t have too many reminders of your identity…

case $TERM in
    xterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"'
        ;;
    *)
        ;;
esac

Comments with other useful bash bits and pieces welcome!

Advertisement