Samsung N210 netbook on Debian GNU/Linux

With the upcoming holidays in sight, I could not resist buying a netbook system to take along with me on my travel to Italy. So yesterday, I received a brand new Samsung N210.

I chose this system because it is not too expensive and it appeared about the best netbook in this price class according to many reviews. Especially the battery time, keyboard and matte screen are praised a lot. It also seemed to work nice in Linux, which was of course also an important requirement.

I have removed the Windows 7 Starter edition which was installed on this system and installed Debian GNU/Linux Squeeze (currently testing) on it. I decided to go for Debian because it is quickly becoming my favourite distribution, now that Mandriva has all kind of difficulties keeping up with innovation and I fear that its future does not seem too bright.

I booted the Debian installer using PXE. So on my DHCP server, I added this in dhcpd.conf:

group {
  allow bootp;
    filename "/pxelinux.0";
    host samsung-n210 {
        hardware ethernet xx:xx:xx:xx:xx:xx;

With being the address of the TFTP server (the same host as the dhcpd in my case).

I installed tftpd-hpa and xinetd, and created this tftpd file in /etc/xinetd.d:

service tftp
   socket_type   = dgram
   protocol   = udp
   wait      = yes
   user      = root
   server      = /usr/sbin/in.tftpd
   server_args   = -p -v -v -v -s /var/lib/tftpboot
   disable      = no
   flags        = IPv4

Then I dumped the contents of netboot.tar.gz of the Debian installer daily builds for AMD64 in /var/lib/tftpboot. Then set up the N210’s BIOS to enable PXE booting and set the network card as first boot device and you should get into the Debian installer.

I had some trouble with the network connection bailing out after some time, but after a few attempts at least I succeeded in installing the Debian base system without X and the system booted correctly. Maybe I was just using a bad network cable.

I installed the gnome-desktop-environment package with apt, which also pulled in X. The graphical environment was working perfectly fine out of the box without any manual configuration needed. Also the webcam was working fine out of the box with Cheese.

The wireless network card works fine once you install the firmware-linux-nonfree package from the non-free repository and to get a nice GUI to connect to wireless networks, I installed network-manager-gnome. Then connecting to my wifi AP protected by WPA2 was a piece of cake and the wireless connection works perfectly stable too.

Actually the only minor problem I met is that the brightness keys are not working. There is a documented solution available to change the brightness (execute # setpci -s 00:02.0 f4.b=ff for maximum brightness).

All in all, I am very happy with this system. Even though it has a 5400 RPM hard drive, which feels a bit slowish during the installation, and has only 1 GB RAM, the system is very fast during normal use in GNOME, especially if you use some more lightweight applications (for example Epiphany or Chromium as web browser). Also with a few adaptations to the desktop and application settings, the small resolution is not really a problem. But maybe I will write some more details about this in a later post.

Making your mixed KDE and GNOME desktop look cool

Most people use a mix of QT/KDE and GTK+/GNOME applications on their Linux system. Because both QT and GTK+ use their own widgets (which are all GUI elements, like buttons, toolbars, menus, checkboxes, etc…) and theme engine, QT and GTK+ applications look different from each other. This is especially bad if you use KDE in Debian: in that case by default no GTK+ theme is configured, making GTK+ applications, like Firefox, look like ugly Windows 95 applications. Mandriva on the contrary does use a common graphical theme for both GTK+ and KDE applications (called Ia Ora), but it’s not easy to change the GTK+ theme if you use KDE or the QT/KDE theme if you use GNOME.

Here’s a howto for Debian and Mandriva which explains how to make your desktop look nice if you’re using a mix of KDE and GTK+. Because Ubuntu is based on Debian, this howto might also apply to Ubuntu, but I have not verified this.


I assume that you are running either Debian Squeeze (testing) or Mandriva 2010.0 or a more recent version of these distributions. For Mandriva 2010.0, you also need to have activated the Backports repositories. You can activate them in the Mandriva Control Centre – Software Management – Configure media sources.

Using GTK+ applications in KDE

If you want to use a unified look for KDE and GTK+ applications, then I recommend using the QtCurve theme. Just like Mandriva’s Ia Ora, it consists of a theme engine for KDE and another one for GTK+ which looks exactly the same.

In Mandriva you install the kde4-style-qtcurve package. If you have urpmi’s “suggests” support enabled (it is by default), then this will automatically pull in both the KDE 4 and the GTK+ theme, and also systemsettings-qt-gtk, a tool which lets you choose the GTK+ theme to use in KDE.

In Debian you need the packages qtcurve and also system-config-gtk-kde to set up the GTK+ theme.

Once you have installed all packages, you can start KDE’s System Settings and go to Appearance. In the Style page, you can choose the theme to use in KDE applications, while in GTK+ Styles and Fonts, you select the theme used by GTK+ applications. If you choose QtCurve in both, KDE and GTK+ applications will look very similar and even use the same KDE icon set.

The QtCurve theme comes with different pre-defined styles. If you don’t like the default look of QtCurve, go to System Settings – Appearance – Style, and click on the Configure… button next to the QtCurve widget style box. Under the button Options there, you find the list of predefined styles.

Of course you can also further fine-tune the theme by going to the Colors and Windows pages in System Settings – Apperance, where you can choose a colour set and window manager theme to your liking (QtCurve has a matching colour set and window manager theme, but of course you can choose something else if you want).

Using QT/KDE applications in GNOME

If you are using GNOME and want to make QT and KDE applications look like all GNOME applications without using Ia Ora, you have to run the qtconfig application. In both Mandriva and Debian, you need to have the qt4-qtconfig package installed. Then in qtconfig you select GTK+ as the GUI style to use. If you run KDE applications, you will also need to set the KDE theme to GTK+. This can be done by running
$ kwriteconfig --file kdeglobals --group General --key widgetStyle gtk
in a terminal window. Before executing this command, you will need to have the kdebase4-runtime package installed in Mandriva or kdebase-runtime in Debian.

Debian Squeeze running KDE with the QtCurve theme.
Debian Squeeze KDE 4.3 running Dolphin and Iceweasel (Firefox) 3.5 with the QtCurve theme (Shiny Glass style), Slim Glow Plasma theme and desktop effects enabled.

Server migration

Since two days, I have merged the main servers used by two research laboratories at work. One server was an old Linux server which really needed a hardware upgrade, and the other one was a Mac Pro machine running a flaky OS X Leopard. The new server is of course running Linux: Debian Lenny.

It was a very interesting experience: working out procedures to migrate the mailboxes (from Dovecot on the Linux server and Cyrus on the Mac server to Cyrus on the new server), finding out how to set up one NIC in two different subnets (especially the routing is a little bit tricky), getting all services hooked up to LDAP and managed by GOSA, getting dhcpd to do exactly what we want in a shared-network set up, and much more.

The new server is a HP DL185 G5 with an AMD Opteron quad core CPU and 8 GB of RAM and hosts two KVM virtual machines, one for public services and another one running internal services. You can visit the two websites, which are also hosted on this machine of course, of the concerned research labs:

Maybe in the not too far away future, I should try to move the services hosted on the underpowered desktop machine running this website, also to a virtual machine…

Why prefer Mandriva over another distribution?

Yesterday someone asked on a Dutch website the same question which comes back on sites like Slashdot every time a new Mandriva release is announced: what is the the advantage of Mandriva above other distributions like Ubuntu, OpenSUSE and Fedora.

This made me think and so I wrote down a couple of reasons why I use Mandriva on my desktop systems.

10 advantages of Mandriva above other Linux distributions

  • The default graphical theme in Mandriva looks much better than Ubuntu’s brown mess.
  • All graphical configuration tools are centralized in the Mandriva Control Centre.
  • Mandriva has some unique configuration tools, such as msec which permits you to change advanced security settings from the GUI.
  • Mandriva makes it very easy to install 32 bit libraries and applications on the x86_64 version. In Ubuntu some of the more important 32 bit libraries can be found in the ia32-libs packages, but if you need something else which is not in there for whatever reason, things become more complicated and messy: you can for example extract the libraries by hand from the 32 bit deb package and install them in /usr/lib32, or you’ll have to create a complete 32 bit chroot. In Mandriva you can simply install packages from the 32 bit distribution on the x86_64 release by means of the standard console or GUI installation tools.
  • (shameless plug) The program menu is much nicer if you have installed KDE and GNOME together on your system (in Ubuntu and other distributions you will get very long menus containing lots of KDE and GNOME applications mixed together.
  • Mandriva’s booting times is about the fastest possible for a generic distribution thanks to Speedboot
  • KDE as shipped by Mandriva is generally a bit more stable and polished than in Ubuntu
  • Mandriva’s GNOME corresponds more to the default upstream GNOME than for example in OpenSUSE (e.g. by default it does not use that messy Slab menu)
  • Very flexible graphical installer in the Free and Powerpack editions for people who want a more complete and custom installation than the one from a standard live cd
  • Mandriva’s development community is very open and accessible, eg. via IRC and mailing lists. If you do a little bit of effort, it’s pretty easy to become a Mandriva package maintainer yourself and to integrate your contributions yourself in the distribution.

Some disadvantages of Mandriva

  • Security updates are sometimes a bit later than other distributions and for some packages even completely missing. It has to be said that these are mostly not too important security problems and I’m not aware of any problems this has caused for anyone in practice. Also bugfix updates for some reported problems are sometimes late or not done at all.
  • While the graphical themes are much better than Ubuntu’s in my opinion, I still think they cannot beat the upstream KDE and GTK+ themes.
  • The Mandriva configuration tools sometimes have annoying bugs or do not have the best looks possible.

Personally, I consider Mandriva and Debian as the best distributions available. I think Ubuntu is overhyped a lot and does not offer much (if anything?) you cannot do with Debian. I also think Debian’s distribution model consisiting of the Stable, Testing and Unstable distributions is great and makes it possible to have a pretty stable and “rolling” distribution with fairly up to date software at any time. However, the fact that I can directly contribute my own improvements to Mandriva and the fact that installing 32 bits stuff on x86_64 is dead easy, make tthat Mandriva is still my preferred choice on desktop systems.

Anyway, the choice is up to you!

Updating to Debian Lenny

Last week-end, Debian Lenny 5.0 was finally released. I use Debian on most servers I manage at work. A few of them were already using Lenny when it was still the testing branch, but most are still on Debian Etch. So this morning I decided to test upgrade one of the less critical Etch systems to Lenny. That system is only used to store back-up files from other systems, so it would not be a problem if that machine was off line for a couple of hours.
According to the release notes, you should rather use aptitude instead of apt to upgrade, so that’s what I did. All went well, until suddenly the package upgrade hung while installing new udev configuration files. I could Ctrl-C the process to continue, but from that moment on, more and more post installation scripts started hanging and had to be interrupted.

I noticed that also simple commands, such as ps and getent passwd were hanging too and that I could not log in via SSH anymore. Fortunately, the existing SSH connections continued to work, so I was not locked out yet.

I straced getent passwd and noticed that it hung while trying to connect to the remote LDAP server. The problem was apparently that Lenny’s libnns_ldap tried to connect via LDAPS to port 389, while LDAPS uses port 636 by default. It seems that you need to specify the port number 636 now to make LDAPS work right, so for example: ldaps:// I fixed this in libnss-ldap.conf and pam_ldap.conf, and then I could finish the upgrade without any problem. Apparently this is a known problem.

So definitely modify your configuration first if you are using LDAP authentication and want to upgrade to Lenny. I should probably also fix my nsswitch.conf so that applications don’t start to hang if the LDAP server is unreachable…

In spite of this problem, the whole upgrade was done in less than 1 hour. Without that problem, I guess it would have taken about 20 minutes less. Quite impressive!

Getting nice anti-aliased fonts in Debian

Since about a year I’m using Debian on an Apple Powerbook G4 PowerPC laptop. Mandriva does not have an active PowerPC port anymore, I don’t really like Ubuntu (and their PowerPC port does not get the same priority anymore as the x86 ports), so Debian was an obvious choice for me, and I have never regretted this.

One of the things that annoyed me however, was the default looks of fonts. Some fonts (especially in Firefox) did not look anti-aliased, while those that were, did not look as nice as I’m used to from Mandriva. At that time, I did not found anything better than compiling a more recent version of freetype (just standard ./configure, make, make install, no patches for enabling any patented stuff) and replacing the contents of /etc/fonts/conf.d by the one from a Mandriva system. And installing the Liberation fonts from Red Hat’s tarball.

Today, things are a bit easier: a Liberation package is now available in the Debian repository as are up to date packages of Freetype. And I learned a bit more about Debian’s Freetype configuration, so I was able to tweak the default settings now, instead of just replacing everything by Mandriva’s.

Here’s a quick howto. I assume you are using Debian Lenny, and have the unstable/sid repositories added to apt’s sources.list (use apt pinning so that testing is preferred over unstable).

  • Make sure you have the basic font packages installed: apt-get install ttf-dejavu ttf-liberation (the latter currently only exists in unstable)
  • Make sure you have a recent version of freetype installed. Run apt-cache policy libfreetype6 to see which versions are currently available in Debian. I installed version 2.3.6 from Unstable: apt-get install -t unstable libfreetype6
  • Install a recent fontconfig version. Run apt-cache policy fontconfig to see which versions are available. I installed version 2.6.0 from unstable: apt-get install -t unstable fontconfig libfontconfig1 fontconfig-config
  • Go the the directory /etc/fonts/conf.d. You’ll see that it contains all symbolic links to /etc/fonts.conf.avail which contains some more interesting configuration files which we’ll activate by adding a symbolic link. Especially I want to use the autohinter, enable RGB subpixel hinting and don’t want to use bitmap fonts:
    ln -s ../conf.avail/10-autohint.conf
    ln -s ../conf.avail/10-sub-pixel-rgb.conf
    ln -s ../conf.avail/70-no-bitmaps.conf
  • Now in GNOME go to the menu System – Preferences – Appearance and go to the Fonts tab and play a bit with the settings until you are happy with them. I used Deja Vu Sans Book 9pt for desktop and application fonts and Liberation Mono 9pt as fixed width font. Rendering is set to subpixel smoothing, and in the details panel I chose suppixel (LCD) smoothing, full hinting and RGB subpixel order. If you are using KDE 3, you can make similar settings in KDE’s Control Center under Look & Feel – Fonts (make sure anti-aliasing is enabled and click on the Configure button).
  • In Firefox/Iceweasel 3 go to Edit – Preferences – Content and click on the Advanced button in the Fonts & Colors section. Configure the fonts you like best (I chose Liberation fonts, and set sans-serif by default) and play a bit with the default and minimum font size (I chose 15 pt as default size, and 9 pt as minimum).

Enjoy your nice fonts!