linux

You are currently browsing articles tagged linux.

KGTK is a wrapper utility that allows GTK applications to use the native KDE file open/save dialogs. I cannot stand the GTK/Gnome dialogs, and I this helps apps like Firefox maintain a consistent appearance with KDE.

I’ve packaged the latest release, 0.10.0, for Ubuntu Hardy amd64 and i386. It is available in my repository now. Source packages are provided, so any other Debian-based distro or architecture should be able to build it.

Tags: , ,

I’m a network engineer, and I run Kubuntu on the desktop. Which means I often run applications as root: Wireshark, Ettercap, Zenmap, etc. I prefer a seamless desktop experience, meaning I like my GUI customisations to apply to root applications, not just those running as my own user. Secondly, I like to directly launch GUI apps from a root terminal.

Read the rest of this entry »

Tags: ,

One of the reasons I started this blog is to write about problems I’ve solved that I can’t find answers to already on the web. Today, let’s talk about moving your linux install to linux software raid (md raid / mdadm). This post assumes you are running Ubuntu Linux 8.04, but any Debian-based distro from the past two years, or most other distros, will have similar commands.

We start with an install on a single 80 GB SATA drive, partitioned as follows:

/dev/sda1 as /, 10GB, ext3, bootable
/dev/sda2 as swap, 1GB
/dev/sda3 as /home, 69GB, ext3

We want to add a second 80GB SATA drive and move the entire install to use RAID1 between the two drives. So the final configuration will appear:

/dev/md0 as /, 10GB, ext3
/dev/md1 as swap, 1GB
/dev/md2 as /home, 69GB, ext3

Where the raid arrays are:

md0 : active raid1 sda1[0] sdb1[1]
md1 : active raid1 sda2[0] sdb2[1]
md2 : active raid1 sda3[0] sdb3[1]

Here there be dragons. As always, back up your data first. If you don’t know how to use rsync, now is an excellent time to learn.

Read the rest of this entry »

Tags: , ,

I’ve been using some form of Unix since I was introduced to the Internet my first year at University in 1995. I switched to Linux on the desktop full time in April 2005, and I’ve been managing my company’s mid-size network of servers and desktops for the past two years.

One thing I’ve noticed about Linux, even desktop-focused distributions, is that it’s largely tuned to the most desirable behaviour for a server. But what is desirable on a server isn’t necessarily desirable on a desktop. On Ubuntu Linux (or any Debian-based distro), add the following two lines to /etc/sysctl.conf:

vm.swappiness=1
vm.vfs_cache_pressure=50

These changes will be done automatically on reboot, but let’s load them now with:

sysctl -p

Now you’ll notice GUI applications feel more responsive and filesystem browsing will be faster when the disk is busy. What we have done is instruct the kernel to prefer to keep applications in RAM (swappiness) instead of disk cache, and to prefer to keep filesystem inodes and directory entries cached at the cost of files themselves. This means reading files from disk is slightly slower (IE, copying, moving, loading big files), but browsing the filesystem will be much faster.

Rudd-o.com wrote extensively on this last year. I recommend his write-up for anyone who wants to understand the issues in more depth.

For the record, I ran the tests in Rudd-o’s article. He advised creating a big file, then displaying the entire filesystem hierachy with find, and then copying that file. In my case, I went from 2 minutes, 6 seconds for the “find / > /dev/null” to just 17 seconds. That has made browsing in Konqueror a great deal faster.

Tags: ,