If you read my last post you know I’ve been using Arch to give new life to an old PC. My experience with Arch has been rather positive but it’s not without issues. To be fair, I’m not sure if it’s Arch fault or nVidia’s. That’s right, I’m talking about graphic driver issues. It’s no big news that graphic drivers support in Linux are reasonable at best. The problem lies with closed-source drivers that are always playing catch-up with other OS versions. Nvidia in particular is not the worst and recent devices seem to have reasonably good drivers. But with older cards it’s a different story. I have a Nvidia GeForce2 MX 400, wich is quite old. Nevertheless I don’t see why I need to buy a new one, if I’m not planning to use any special 3D software. The problem is that even 2D rendering is too slow to be usable. And why ?
I don’t know all the details of the story but basically Nvidia doesn’t spend much time supporting old drivers. In my case, I cannot use the most recent drivers with my card, because it’s not supported. I have to use the old 96-xx version. The problem is that with every Xorg update, things change and drivers need to be updated too. Because Nvidia doesn’t spend much time updating 96-xx version, I’m having poorer performance now than I was 2 years ago….with the same card!!
I’m not going to bash Nvidia about this, as I still have hope that it’s a configuration problem (I think I tried every xorg parameter combination).
Nevertheless I had to quit using the Nvidia driver. Simply dragging a window across the screen was too slow. I’m now using Nouveau, the open source initiative to create an open driver for nvidia cards. It’s perfectely stable to me and it works a lot faster than nvidia’s driver. Now, I have aceptable performance (not perfect). I’m pretty sure 2 years ago I had better performance than today with nouveau. But, better nouveau than nothing. I just hope nouveau continues to improve and that nouveau’s developers don’t forget old nvidia cards.
As you may know, I’ve used lots of Linux distros over the years. Right now, I’m testing Arch Linux on an old PC. I’ve been curious about Arch for a long time and now finally I had the opportunity to try it out. Basically, I’m giving new life to an old PC and thus I’m exploring ways to use the most lightweight software possible. That means choosing the right applications and the right distribution. I’m not sure if Arch is the right distribution, but I like it.
So, what is Arch like ?
Arch is a very basic Linux distro, that you can easily customize. It reminds me of Gentoo, although it’s not source-based. Package management is based on tar.gz packages, with full dependency support. What stands out at first is the speed of pacman, the application used to manage software installation. After downloading the packages, installation is very very quick. And it’s as simple to use as apt-get.
So, at first, package management looks like apt-get but with tar.gz instead of debs. But it doesn’t stop there. Then you have the AUR platform, which is the part that resembles Gentoo. The AUR repository holds not the software, but special files (PKGBUILDs) that tell the installer where to get the software from and how to install it. It can be binaries or sources (they look a lot like Gentoo’s ebuilds). This AUR repositories are community-maintained and everyone can contribute with PKGBUILDs. Creating a package is very simple, the PKGBUILD is just a small script and you’ll probably just have to edit some variables. That’s why there’s so many software int the AUR. By using this simple mechanism you ensure that all software on your computer is installed through Arch package management system.
What do you get of an Arch installation ?
Arch installation is done through a text installer, but is quite simple. Installation is quick because there’s not much software to install. The base installation only has core libraries and binaries. There’s not even X. You’ll only get a console prompt, vi and not much more. And this is great, because you can customize it the way you like it and install only what you want. And if you want X, just issue "pacman -S xorg".
It’s not for everyone, but long-time Linux users that like to fiddle with their system will probably like Arch.
Over the next posts I plan to tell you more about my experience with Arch and with building a lightweight system.
Tip: using lshw to fecth hardware information
How many times have you searched in several places for information about your hardware ? This happens often when we are asking for a solution to some problem in a forum. The first thing you’re asked to do is tell what your hardware specs are. Instead of going through all the proc filesystem gathering the information, I find the ls* family of tools very useful. All of you know the "ls" command. These tools apply the ls to hardware.
- lspci - list all hardware information related to PCI
- lsusb - list all hardware information related to USB
- lspcmcia - list all hardware information related to PCMCIA
And the most informative and useful when sending hardware information to someone: lshw. It lists all of the above and more. Although powerful, this tool should be used with care, because MAC and IP addresses are also listed here. So be careful when posting this information to a forum.
Installing and configuring Davfs2
One of the cool things about today Internet is how we can use several computers in different locations as if we were our single home computer. Some time ago, I reviewed a desktop wiki called zim, which I still use. It has seen a lot of improvements but I’ll leave that for another post.
Personal wikis are great for organizing all our stuff. And if we want to use that wiki often, then it should be available on every computer we log in. Of course, the most obvious solution would a be an online wiki. The problem is I really don’t like online wikis that much. They’re great for some purposes, but using them as a post-it notes application (like I do) is not very convenient. A desktop application can have a better UI, like zim has. At least I don’t know of any wiki out there as productive and easy to use as zim.
However, now I have a problem: how do I make zim files available from everywhere ?
The solution I recently found was to create a free account at hasfiles.com. They give you 100Mb for free and let you access those files via webdav. Using davfs2, I can mount it as a partition on my system. I then have zim configured to fetch the files from the mount point path.
The process is pretty simple, but I found a few problems along the way.
First, I needed to find a way to connect to a webdav server. Hasfiles.com have a nice help page that explains how you can use nautilus for that. But I didn’t want to use Nautilus, so I searched for a more independent solution.
I found fusedav and davfs2. I couldn’t get fusedav to work behind a proxy, but davfs2 worked fine.
Here’s how you can configure davfs2 to mount a webdav server.
- First, install davfs2 the normal way. If you use debian-like systems, do apt-get install davfs2
- Next, create the directory that will serve as mount point (eg: /mnt/remote)
- Then, as root, do mount -t davfs2 http://<youraccount>.hasfiles.com/storage /mnt/remote
- It will probably ask you for a username and password. But if you don’t want to enter an username and password, edit the file /etc/davfs2/secrets and enter the line "/mnt/remote <account> <password>"
- You can also add a line to fstab, so that you can use only "sudo mount /mnt/remote" to mount the partition. Here’s an example:
http://account.hasfiles.com/storage /mnt/remote davfs noauto,user,rw 0 0
I had an issue with proxies, though. Everytime I tried to write some file it got truncated. A quick look into the log files revealed a strange HTTP error (409 - conflict). I found the solution in davfs2 forums, by adding the property "use_expect100 0" to the config file (/etc/davfs2/davfs2.conf).
Of course, you can now use that partition for anything you like. I just used zim as an example. I don’t know if I can trust their service in a long term. As with every other online service, one never knows if they’ll be up forever. So, you should always make a backup from time to time.