Clean Debian Lenny KDE Install

(and quite a bit of biography..)

Over the years, I have had a lot of fun with highly customized Linux installs for my desktop and laptop computing, but in the last 3-4 years, I have grown to enjoy the simplicity of sticking as close to the default configuration of ${MY_CAREFULLY_SELECTED_DESKTOP_ENVIRONMENT}, only making a few minor changes in software and configuration choices to a) pull it all together for a relatively uniform user experience, b) have all the toys at my fingertips to sysadmin all the servers I take care of, and c) attempt to muddle my way through code to help out the developers and admins I work with.

I started using Linux in late 1997, I think, and have been through all the major Linux distributions, starting with Debian Bo, if I recall, then trying out all kinds of different distro flavors including all the *BSD’s, fresh installs sometimes monthly or more so I could get a feel for all the possibilities. I have fond memories of hour upon hour of configuration tweaking, various software and kernel compiling to get everything working right, and how quickly a borked X11 configuration could “smoke” a monitor.. At some point I stuck with Red Hat (pre-RHEL) for a good amount of time, while doing some “Lotus Notes for Linux” beta testing while at IBM as a contractor, then dabbling with Linux apps on AIX and some s390 Linux LPAR’s, after someone noticed I was using Linux on my desktop – “Are you using Linux? Would you like to have a little mainframe fun?” A sincere thanks to Greg Icantrememberyourlastname – right then, my path began to follow a new fork.. 🙂

Red Hat was what most people were using, but there was some Caldera and SuSE around the office, but since I settled with Red Hat as my primary desktop distro vendor for a while, I started learning a whole lot more about the internals of Linux systems, branching out from my intimate knowledge of the various installers. I found Smoothwall early on, too – a really slick, custom built distro for a firewall/router – I needed something to route all my thrift store hardware (most of which I still have and use..). I started working through the old “Securing and Optimizing Red Hat Linux” documentation, building everything from source on a crazy small initial install of about 20 packages.. as well as some Linux From Scratch (Gentoo didn’t exist yet, or I probably would have tried it..). Oh, the hours/days of fun!

I tried all the default desktop environments that the various distros provided, installed and played with all the big and little names, but mostly found that because of the lack of up-to-date hardware on most of my machines, that Window Maker, Blackbox, and Fluxbox were always the best performers, and that usually meant lots of tinkering time to get them “just right”. Many of my ancient boxen were purely console machines, so no GUI was necessary. I dumped Red Hat for good after 7.3 – even though I was the guy maintaining all our Red Hat / RHEL kickstart systems at work (as well as all our other Linux, FreeBSD, and Solaris network installers, but Red Hat was/is our primary “supported” OS, so I spent a lot of time in it’s bowels.. and grew to dislike it more and more for personal use..).

Slackware. I am to this day, and probably always will be a huge supporter and advocate Pat’s most excellent OS. Slackware, hands down, won my eternal favor by being the most stable Linux distribution over a long period of use on my servers and workstations through many version upgrades. When Pat became ill a few years ago, I donated a server in one of our data centers for the slacksec.org (now defunct) guys who wanted to help maintain security updates. I spent quite a few years Slack’ing, primarily with Fluxbox for my desktop, but eventually moved into a position of playing with lots of various obscure softwares, and grew tired of continuously maintaining my own tgz packages.

My friend and co-worker, Eric, is a Debian Developer, and convinced me to rediscover my fondness for Debian. I had always had at least one or two Debian servers at the house, dist-upgraded through the years. D-I had come a long way since my last floppy install of Slink, and I booted a Debian install CD for the first time – pretty sure it was Woody. I immediately dist-upgraded to Sid, and about a month later, I remember struggling thru a nasty C++ soname change that severely broke lots of software, including many desktop apps – I think that was my last blind, trusting, “it will just work” ‘apt-get dist-upgrade’ – I still had Slackware with Fluxbox running on my laptop, so at least I could continue to work 😉

The Ubuntu craze hit a while later, and someone at the office ordered literally hundreds of CD’s, passing them out like candy. It was nice – Debian underneath, a decent selection of default software, and non-free software for 3D video support out of the box. My sub-par hardware selection still suffered a bit under Gnome, and I subsequently found XFCE fit my needs very well – XFCE became my desktop environment of choice for the next few years. I didn’t last very long with Ubuntu because of some of their meta-package choices in there somewhere and a completely hosed “stable” (quoted purposefully) version dist-upgrade – wtf? I never had a Debian stable version dist-upgrade need anything more than a little (usually well documented) config file fiddling. At that point, I started to install Debian with XFCE on just about everything – there was no software that I needed to build myself, unless I was just testing something out, most everything I need is in the major apt repos, all the XFCE goodies I like are there, and to top if all off, I discovered many helpful Debian Developers that care, mailing lists that are informative and entertaining, and a great way to get my feet wet with a couple perl packages I could contribute.. I love it. I have a big Debian swirl tattoo to prove it.

Once I had a some relatively current hardware to use for desktops, and a nice new Lenovo T60, I continued to use XFCE, but I wanted to get a little better user experience – things like plugging a USB drive in and it auto-mounting – so I started using a default install of Debian testing with Gnome on my T60 about a year ago and liked it, although it has some annoyances, and about 6 months ago did fresh installs of testing with Gnome on my work and home desktops. After this amount of time, Gnome is ok – better than XFCE or any of the smaller-footprint window managers at integrating all the apps nicely, automating a lot of once manual tasks like auto-mounting just about anything plugged in, network-manager is cool, cut/paste between all applications (I remember this was a headache in Fluxbox), and general consistency of look and feel. Resource-wise, Gnome has been a non-issue with the beefier boxen.

About those Gnome annoyances..

Gnome’s terminal application has no single-line scrolling with the keyboard (shift+up/down). Eric has told me a number of times that this seems trivial, but I use it constantly, so it’s important. There have been numerous requests by other Gnome users upstream to incorporate this rather simple, mundane, but highly useful feature. Every other terminal I have used can do this by default, or with a simple .Xresources one-liner. Gnome terminal ignores the .Xresources file and it simply will not scroll one line at a time with the keyboard – you get full page scroll (shift+pgup/pgdown), or you have to use the mouse wheel or click on the scroll bar – that’s crap. Plain-jane xterm and roxterm for tabbed terminals have gotten lots of use – they work as expected, although roxterm has a couple of weird character renderings while using irssi, but it might be because of running in screen – I never cared that much to look into it fully.

Why in the hell does every single window, except the first one, opened in Gnome get forced to the top left of the desktop? Every one. Neatly piled up on top of one another. No concept of tiling and nowhere to change that behavior. Umm.. fail. This is likely my biggest bitch. Window tiling in most every window manager is sane by default, and many times is quite configurable. Gnome’s window placement is just brain dead and completely unconfigurable. In some window managers like awesome, tiling is the key to it’s appeal. I tried awesome a couple months ago, since it is a newish fad – very cool ideas, but wow.. awesome is like driving a car with your feet – I could probably get good at it, but it would take a long time to learn.

Gnome session management sucks – window size and placement are brain dead (guess where they all go?), firefox/iceweasel thunderbird/icedove are never started up. I tried all kinds of juju to save some relatively simple saved sessions – 4 terminals on desktop1, and one on desktop4 – never worked right.

Gnome is good – don’t get me wrong, here – I might end up going back to Gnome if my affair with KDE doesn’t work out. The default Debian desktop install of Gnome has a lot of the integration I was looking for, has really nicely tied together login manager and screensaver locking with thinkfinger support for my T60, app look and feel consistency, suspend with desktop locked on resume – all kinds of things that just work out of the box.

So this was going to be a KDE install post…

I can’t even remember the last time I tried KDE, but I do recall that whatever box I was running it on did not have half the hardware I needed to run it, and it was far too much software for the poor little thing.. But my friend Brandon loves it 😉 I did a quick ‘apt-get install kde’ on my existing Lenny Gnome laptop, and about ran myself out of disk space on the root partition, but it was a good test. Konsole works the way it should, kmail looks pretty sweet and I might try it out, and sessions! Sessions actually work! The stuff is right where I had it when I logged out, and firefox and thunderbird start! And the windows – they tile all by themselves! OK, enough of that – what the hell, let’s do a fresh install of Lenny with KDE – the menus in both KDE and GNOME were a mess of crap with two huge desktop environments installed, and besides, i have no disk left.. I decided to give KDE a good turn at trying to win me over. Remember, I like to stick with the defaults – change a few hot-key bindings, maybe a stock theme or two, select a screensaver, and that’s about it.

Dang, now I have some KDE annoyances, mainly related to installation.. to start with the Debian installer evidently should support an install of kde-desktop as a task at boot – well, it didn’t.. Using the RC1 Lenny netinst CD, I booted with:

install tasks="kde-desktop,standard"

and I got only a minimal install – not even standard. Something is wrong with netinst and tasks. Umm… ok, I’ll just log in and run tasksel..

tasksel install standard # installed ~90 packages
tasksel install laptop # installed ~30 packages
tasksel install kde-desktop # installed ~1000 packages (?! mkay..)

I walked away for a bit and came back to see evolution, gnome-this, gnome-that being installed – wtf? I let it finish and logged in to find all of Gnome and all of KDE installed.. which was exactly what I did not want.. Arrgg! Something is wrong with tasks!

The base OS of Debian is so fast to install, I just installed again, selected only standard and laptop in tasksel, and in 5 minutes I was done. And without getting into my to-do list of fglrx, fingerprint reader, suspend with desktop locking – here’s my fresh start with KDE:

aptitude install openssh-server sudo vim
update-alternatives --set editor /usr/bin/vim.basic
aptitude install xorg kdm kde desktop-base gtk-qt-engine
aptitude install iceweasel icedove pidgin pidgin-otr openoffice.org openoffice.org-kde x2x
aptitude install openvpn vpnc network-manager network-manager-kde
aptitude install ipython git-core etckeeper ntpdate psmisc rsync screen tcpdump

The fonts in konsole look way better than they did with KDE installed over top of Gnome – this is reason enough to have started from scratch. Besides I keep good backups of my stuff, so a fresh install with a fresh outlook for a good evaluation of a desktop environment that I have not tried in years, nor really ever spent any amount of time using, sounds like fun! We’ll see if it meets my needs after I get over the little bumps of finding things and getting my to-do list complete.

To-do:

fglrx (so I can play Enemy Territory)
fprint (which seems to support KDE well, where thinkfinger causes problems)
package building environment for Debian packages
python goodies for working with Cloud Files code
other things as I think of them – offlineimap, gimp, try out kflickr maybe

Silly VFAT Filesystem..

Case-sensitivity is painful with VFAT.. I would have put a real filesystem on my new external hard drive, but I thought it would be nice to plug it into anyone’s box and be able to read/write.. Syncing up my audio directory failed when many upper-case ‘CD1’, ‘CD2’, etc directories were created in lower-case, as well as rsync wanting to iterate through every file again.. The magic:

sudo mount -o uid=1000,gid=1000,shortname=mixed,iocharset=utf8 /dev/sdc1 /mnt/
rsync --modify-window=1 -rtv ~/media/audio/ /mnt/media/audio/

Zenoss Install on Debian Etch

Just a quick cheat-sheet for myself:

# aptitude install mysql-server libmysqlclient15-dev python-dev build-essential swig autoconf snmp bind9-host python-setuptools
# adduser zenoss
# mkdir /usr/local/zenoss
# chown zenoss /usr/local/zenoss
# su - zenoss

$ vi ~/.bashrc # add a few env vars:

export ZENHOME=/usr/local/zenoss
export PYTHONPATH=$ZENHOME/lib/python
export PATH=$ZENHOME/bin:$PATH

$ source ~/.bashrc
$ wget http://downloads.sourceforge.net/zenoss/zenoss-2.1.2-0.tar.gz
$ tar xzf zenoss-2.1.2-0.tar.gz
$ cd zenoss-2.1.2/
$ ./install.sh # logout as zenoss

# chown root:zenoss /usr/local/zenoss/bin/zensocket
# chmod 04750 /usr/local/zenoss/bin/zensocket

http://hostname:8080/zport/dmd 🙂

as the zenoss user to {start|stop|restart|status|list} the zenoss services:
$ $ZENHOME/bin/zenoss start
$ $ZENHOME/bin/zenoss status
...

Read zenoss-2.1.2/INSTALL.txt for further notes on sysctl settings, etc.. Other configurations *should* be done in a production environment – this was only a quick scratch install for testing.

Debhelper >=6

I have been working on my first couple perl module packages with the Debian Perl Group, and a change of debhelper to version 6 in [pkg]/debian/compat and building on Etch (version 5) gave me a few problems.. A bit of help from Roberto got me pointed in the right direction – this works:

$ cd [pkg]
$ svn-buildpackage --svn-dont-clean --svn-builder="pdebuild --use-pdebuild-internal"

Kind Regards.

Debian on Sunfire V120

I just dumped Solaris off my underutilized (because of Solaris..) Sunfire V120 and did a fresh install of Debian Etch for the Sparc64 architecture. I burned the sparc iso image and borrowed an IDE SuperSlim CDROM from another server for the install, but the V120 would not recognize the device, no matter what I tried, which seems to be a common issue with some Sun gear.. Sweet! Off to netboot-land 🙂

On a spare laptop (running Debian, of course):

aptitude install rarpd bootp tftpd

Set up rarpd with the MAC and IP addresses in /etc/ethers to hand the V120 its IP when it ARP broadcasts (grab the MAC for the Sun box from the console startup messages):

00:03:BA:16:85:6B 192.168.1.30

Set up bootp to tell the V120 where to go for the install image. The location of the tftp directory, the name of the image, the client IP and netmask, the boot server IP, and the client hardware (MAC) address go in /etc/bootptab:

client:\
hd=/srv/tftp:\
bf=boot.img:\
ip=192.168.1.30:\
sm=255.255.255.0:\
sa=192.168.1.26:\
ha=0003BA16856B:

Download the sparc64 boot image to the tftpd directory:

# cd /srv/tftp/
# wget http://http.us.debian.org/debian/dists/etch/main/installer-sparc/current/images/sparc64/netboot/2.6/boot.img

When the V120 netboots, it ignores the file, boot.img, we told it to look for and asks tftpd for a file based on the IP address that it currently has (see Preparing Files for TFTP Net Booting for more info), so I just cheated, and tailed syslog to see what was being requested:

# tail -f /var/log/syslog

Now, netboot the V120 from the Openboot “ok” prompt on the console:

ok boot net

Going back to the syslog tail, I found:

# tail -f /var/log/syslog
Dec 19 20:41:31 apollo rarpd[4751]: RARP request from 00:03:ba:16:85:6b on eth0
Dec 19 20:41:31 apollo rarpd[4751]: link lo
Dec 19 20:41:31 apollo rarpd[4751]: addr 127.0.0.1/8 on lo
Dec 19 20:41:31 apollo rarpd[4751]: link eth0
Dec 19 20:41:31 apollo rarpd[4751]: addr 192.168.1.26/24 on eth0
Dec 19 20:41:31 apollo rarpd[4751]: RARP response to 00:03:ba:16:85:6b 192.168.1.30 on eth0
Dec 19 20:41:31 apollo in.tftpd[10704]: connect from 192.168.1.30 (192.168.1.30)
Dec 19 20:41:31 apollo tftpd[10705]: tftpd: trying to get file: C0A8011E
Dec 19 20:41:31 apollo tftpd[10705]: tftpd: serving file from /srv/tftp
Dec 19 20:41:35 apollo in.tftpd[10708]: connect from 192.168.1.30 (192.168.1.30)
Dec 19 20:41:35 apollo tftpd[10709]: tftpd: trying to get file: C0A8011E
...

Nice! A quick symlink is all we need, while the V120 is repetitively requesting the file C0A8011E:

# ln -s boot.img C0A8011E

And then I see on the V120 console that it is happily downloading its boot image file. (happy debian sparc dance ensues!)

From there on out, the text debian-installer should be quite familiar.

Gotcha’s:

I ran into an issue when running the disk partitioner – regardless of even creating an empty partition table, the partitioner failed with an error message along the lines of (from memory), “you may have too many primary partitions”, and refused to create any partitions. Somewhere in my digging around, I came across a web page or mailing list post on the fact that if there was a previous Solaris install, debian-installer may fail, and that the cure was to wipe the master boot record from the disk. Backing out to the main menu dialog, there is a “start a shell” option – pick that! In the shell, just dd over the 512byte MBR of the drive, exit, and go back to the partitioning option, and all should be well.

# dd if=/dev/zero of=/dev/sda bs=1 count=512

Another little consideration was that the Linux kernel (not just debian) iterates the ethernet devices differently than labeled on the back of the server – eth1=Net0 and eth0=Net1. Since I would prefer the physical labels to be “correct”, in the sense that I may ask some other person in a data center to plug the primary interface of the server into a switch, then I commented my /etc/network/interfaces file appropriately:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

## eth1 really is the primary interface!
## eth1 is the port labeled "Net0" on the SunFire V120
# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.30
netmask 255.255.255.0
gateway 192.168.1.1

## eth0 really is the secondary interface!
## eth0 is the port labeled "Net1" on the SunFire V120
# The secondary network interface
auto eth0
iface eth0 inet static
address 192.168.10.30
netmask 255.255.255.0

After the install was complete and Debian is booted, I found an annoying repetition of console messages about the disconnected eth0 (Net1) device switching between 10baseT and 100baseT while trying to find connectivity:

Debian GNU/Linux 4.0 sol ttyS0

sol login: eth0: switching to forced 10bt
eth0: switching to forced 100bt
eth0: switching to forced 10bt
eth0: switching to forced 100bt
eth0: switching to forced 10bt
...

Many thanks to a 2003 post by Marta Pla i Castells to the debian-powerpc mailing list, I found my console-saving grace in the form of an update to /etc/default/klogd to set a higher priority of kernel messages sent to the console, which restricted the annoying and unimportant (to me) eth0 message from being sent to the serial terminal. The default logging level to the console is 7 – dropping the console log level to 6, meaning anything with a priority of “notice” (5) or higher gets logged on the console, keeps these messages from appearing – so, by elimination, it appears that this particular message is of “info” (6) priority.

#KLOGD="-x"
KLOGD="-x -c 6"

My fix to suppress the same messages from /var/log/syslog was to change the kernel priority in /etc/syslog.conf allowing them to still be logged go to /var/log/messages:

#*.*;auth,authpriv.none -/var/log/syslog
*.notice;auth,authpriv.none -/var/log/syslog

Happy Sparc Hacking!