Slow Terminal with xfce, alpha channel issues

I recently switched to using xfce on my FreeBSD desktop. Window Maker is nice but it was starting to feel a bit dated. Thus far I like xfce, but I had one problem with Terminal. Whenever I tried to resize it or switch desktops to one with Terminal open in it I could see it painstakingly render the window. Xterm and aterm didn't exhibit this behaviour, my 3d was accelerated, and other screen drawing didn't show problems either (do note I am using NVIDIA's binary driver for my GeForce 8800, the nv driver from X.org is unusable at this point).

Someone pointed me at the environment variable XLIB_SKIP_ARGB_VISUALS=1. Once added to .zshenv, properly exported on my shell and an X restart later I find Terminal to zoom along as expected. It turns out that the NVIDIA driver doesn't properly accelerate alpha channels.

src.conf on FreeBSD 7 for the average installation

If we consider common available technology and the average use of a FreeBSD installation as desktop or server then I think these are sensible defaults for /etc/src.conf under FreeBSD 7.

WITHOUT_ATM=yes

How many of you run ATM to your FreeBSD box?

WITHOUT_BIND_DNSSEC=yes
WITHOUT_BIND_ETC=yes
WITH_BIND_LIBS=yes
WITHOUT_BIND_MTREE=yes
WITHOUT_BIND_NAMED=yes

Do you really need a full installation of BIND on your machine? In most cases you simply need a caching, recursive resolver. For this just install unbound (found in ports/dns/unbound). Do note that I did not specify WITHOUT_BIND_UTILS so tools like dig and nslookup will still be installed. Only if you need an authoratative nameserver might you want BIND. On the other hand, you might prefer to install NSD (ports/dns/nsd).

WITHOUT_BLUETOOTH=yes

Most systems will probably not use Bluetooth at all.

WITHOUT_I4B=yes

Do you even use ISDN?

WITHOUT_IPFILTER=yes

Most people I know use either ipfw or pf, so little need for ipf.

WITHOUT_IPX=yes

You seriously still use IPX? Even NetWare is IP-native nowadays.

WITHOUT_NIS=yes

I would hope most systems are using some sort of LDAP lookup nowadays. NIS seriously doesn't scale.

WITHOUT_SENDMAIL=yes

Given the ease of configuring Postfix, why would one want to bother with the archaic syntax of Sendmail? It has served faithfully for many, many years, but its design and configuration are archaic.

OpenSSH ControlMaster and Subversion

OpenSSH has a fantastic feature called ControlMaster. Basically this option allows you to create a socket that will share your already opened ssh session to the same host. To enable this option for all you put the following snippet in your $HOME/.ssh/config after creating something like $HOME/.ssh/sockets:

Host *
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h:%p

For every username@host:port it will create a socket in $HOME/.ssh/sockets. The only problem is that current Subversion (1.4.6 on my FreeBSD box) cannot work well with control sockets when using the svn+ssh:// URI identifier. In order to work around this problem you can add a specific host before the wildcard entry, for example:

Host svn.example.com
  ControlMaster no

Host *
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h:%p

Of course, doing it like this is a bit tedious for every Subversion repository you use in this manner. Thankfully there is another way to do this. In $HOME/.subversion/config there is a section called [tunnels]. If you add the following entry to that section it will disable the ControlMaster:

[tunnels]
ssh = ssh -o ControlMaster=no

Type 1 fonts end-of-life nearing

I encountered a blog posting on the Adobe typography weblog on the phasing out of Type 1 fonts which recently got updated (October 2007) with some new statistics on the sale of Adobe's Type 1 fonts. Approximately 85%-90% of their current sales is in OpenType fonts.

If you're in the professional design business this means that if you still buy Type 1 you should start to see the writing on the wall. Not to mention that in order to support more and more scripts' features world-wide OpenType is kept updated, whereas Type 1 is dead functionality-wise.

MySQL to PostgreSQL

David Fetter informed me that he has some changes to a document I wrote back in 2005 about migration tips going from MySQL to PostgreSQL. As such I started to revamping the document, moving from DocBook 4.3 to 4.5 in the process. The result will be located at http://www.in-nomine.org/~asmodai/mysql-to-pgsql.html. I hope to have his comments merged in in the remainder of the week. Feel free to send me updates after it got properly updated with David's notes.

The Elephant (象)

I will bear criticism like an elephant in battle bears an arrow from a bow. Most people are bad behaviour. (<span lang="ja">戦場の象が、射られた矢にあたっても堪え忍ぶように、われらはひとのそしりを忍ぼう。多くの人は実に性質(たち)が悪いからである。</span>)

One can take a trained elephant even into a crowd. The king himself will ride a trained elephant. He who is disciplined is the best of men, since he can bear criticism. (<span lang="ja">馴らされた象は、戦場にも連れて行かれ、王の乗りものとなる。世のそしりを忍び、自らをおさめた者は、人々の中にあっても最上の者である。</span>)

Trained mules are excellent, and so are thoroughbred horses from the Sindh, and so are great battle elephants, but more excellent than them all is a disciplined man. (<span lang="ja">馴らされた騾馬は良い。インダス河のほとりの血統よき馬も良い。クンジャラという名の大きな象も良い。しかし自己をととのえた人はそれらよりもすぐれている。</span>)

There is no reaching the unattainable with mounts like these, but with himself well under control a disciplined man can get there. (<span lang="ja">何となれば、これらの乗物によっては未到の地(ニルヴァーナ)に行くことはできない。そこへは、慎しみある人が、おのれ自らをよくととのえておもむく。</span>)

Dhammapalo, the elephant, is hard to control in rut. Even when tied up, he refuses his food. The great tusker is thinking of the elephant forest. (<span lang="ja">「財を守る者」という名の象は、発情期にこめかみから液汁をしたたらせて強暴になっているときは、いかんとも制し難い。捕らえられると、一口の食物も食べない。象は象の林を慕っている。</span>)

Then a man is a lie-abed and over-eats, a lazy person who wallows in sleep like a great over-fed hog, a fool like that will be reborn time after time. (<span lang="ja">大食いをして、眠りをこのみ、ころげまわって寝て、まどろんでいる愚鈍な人は、大きな豚のように糧を食べて肥り、くりかえし母胎に入って(迷いの生存をつづける)。</span>)

My mind used formerly to go off wandering wherever it felt like, following its own inclination, but today I shall control it carefully, like a mahout does a rutting elephant. (<span lang="ja">この心は、以前には、望むがままに、欲するがままに、快きがままに、さすらっていた。今やわたくしはその心をすっかり抑制しよう、___象使いが鉤をもって、発情期に狂う象を全くおさえつけるように。</span>)

Take pleasure in being careful. Guard your mind well. Extricate yourself from the mire, like a great tusker sunk in the mud. (<span lang="ja">つとめはげむのを楽しめ。おのれの心を護れ。自己を難処から救い出せ。___泥沼に落ち込んだ象のように。</span>)

If you find an intelligent companion, a wise and well-behaved person going the same way as yourself, then go along with him, overcoming all dangers, pleased at heart and mindful. (<span lang="ja">もしも思慮深く聡明でまじめな生活をしている人を伴侶として共に歩むことができるならば、あらゆる危険困難に打ち克って、こころ喜び、念いをおちつけて、ともに歩め。</span>)

But if you do not find an intelligent companion, a wise and well-behaved person going the same way as yourself, then go on your way alone, like a king abandoning a conquered kingdom, or like a great elephant in the deep forest. (<span lang="ja">しかし、もしも思慮深く聡明でまじめな生活をしている人を伴侶として共に歩むことができないならば、国を捨てた国王のように、また林の中の象のように、ひとり歩め。</span>)

It is better to travel alone. There is no companionship with a fool. Go on your way alone and commit no evil, without cares like a great elephant in the deep forest. (<span lang="ja">愚かな者を道伴れとするな。独りで行くほうがよい。孤独(ひとり)で歩め。悪いことをするな。求めるところは少なくあれ。___林の中にいる象のように。</span>)

It is good to have companions when occasion arises, and it is good to be contented with whatever comes. Merit is good at the close of life, and the elimination of all suffering is good. (<span lang="ja">事がおこったときに、友だちのあるのは楽しい。(大きかろうとも、小さかろうとも)、どんなことにでも満足するのは楽しい。善いことをしておけば、命の終るときに楽しい。(悪いことをしなかったので)、あらゆる苦しみ(の報い)を除くことは楽しい。</span>)

Good is filial devotion to one's mother in the world, and devotion to one's father is good. It is good to be a sanyasi in the world and to be a brahmin too. (<span lang="ja">世に母を敬うことは楽しい。また父を敬うことは楽しい。世に修行者を敬うことは楽しい。世にバラモンを敬うことは楽しい。</span>)

Good is good behaviour up to old age, good is firmly established faith, good is the acquisition of understanding, and abstention from evil is good. (<span lang="ja">老いた日に至るまで戒しめをたもつことは楽しい。信仰が確立していることは楽しい。明らかな知慧を体得することは楽しい。もろもろの悪事をなさないことは楽しい。</span>)

English translation by John Richards. Japanese translation by <span lang="ja">中村元</span> (NAKAMURA Hajime)