// How to change Fedora's font rendering to get an Ubuntu-like result [Update]

Font rendering is a matter of taste. However, I personally think Ubuntu's default font rendering is the most eye-pleasing one of the whole Linux eco-system. And if a website's CSS font stack is looking good on Ubuntu, you can be relatively sure that it also works for Mac or MS Windows as long as the used fonts are available on these platforms. It is not hard to get the same font rendering on Fedora. This text is just a bit longer than a few commands because I try to provide additional background information and useful web-search-keywords which you may need if you have other targets than a 100% Ubuntu-like rendering.

The basics

To achieve the desired result, you have to know which parameters exist and how to change them. The most important things are:

  • Resolution (DPI).
  • Font hinting and the used font hinting method.
  • Font rasterization. Especially the used anti-aliasing method and its strength.
  • The used font rendering engine. The one shipped with Fedora comes without subpixel rendering (more on this later).

So let's look at the defaults applied on Ubuntu 10.10. You can do this on the terminal with xrdb -query:

Xft.dpi:	96
Xft.antialias:	1
Xft.hinting:	1
Xft.hintstyle:	hintslight
Xft.rgba:	rgb
Xft.lcdfilter:	lcddefault

As you can see, Ubuntu is using RGB anti-aliasing with subpixel rendering (lcd-default means “subpixel (LCD)” method) and slight font hinting. Now compare this with the default values on Fedora 15 Lovelock:

Xft.antialias:	1
Xft.dpi:	96
Xft.hinting:	1
Xft.hintstyle:	hintmedium
Xft.rgba:	none

This shows that Fedora does use grayscale anti-aliasing, a stronger font hinting style and no subpixel rendering by default. This is the reason why the same fonts look different on Fedora and Ubuntu.

What to do

  1. Install the freetype-freeworld package. You need subpixel rendering the achieve the same results as on Ubuntu. The FreeType rendering engine shipped by default comes without it but you can install the freetype-freeworld package out of the RMPfusion-free repository to get a version with subpixel rendering. If not already happend, enable RPM Fusion on your system. Open a terminal and install the freetype-freeworld package:
    su -c "yum install freetype-freeworld"

    You should know that subpixel rendering is patented and therefore not completely free (as in speech). Using this package might not be legal in your country. The choice is yours and it is your legal responsibility to make sure that the software you are installing can be legally used.

  2. Adjust the hinting style and enable RGB anti-aliasing. Ubuntu it using hintslight hinting by default, Fedora comes with hintmedium. Additionally, we need RGB instead of grayscale anti-aliasing. Open a terminal and execute the following commands to set the anti-aliasing and hinting style:
    gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "hinting" "slight"
    gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "antialiasing" "rgba"
  3. Activate the lcddefault lcdfilter. Unfortunately, there is no GSettings key for it (at least as I'm writing this), therefore you have to create a hidden .Xresource file with the Xft.lcdfilter: lcddefault setting in your home directory. Open a terminal and execute the following command to do so:
    echo "Xft.lcdfilter: lcddefault" > ~/.Xresources
  4. Some settings need a restart to take effect, so reboot your system. If everything worked you should get the following xrdb -query output (the output order does not matter if the values are the same):
    Xft.antialias:	1
    Xft.dpi:	96
    Xft.hinting:	1
    Xft.hintstyle:	hintslight
    Xft.lcdfilter:	lcddefault
    Xft.rgba:	rgb

Additional notes

  • You may find the gnome-tweak-tool interesting. E.g. it provides an option to switch the window-title-bar font. Use the following command to install it:
    su -c "yum install gnome-tweak-tool"
  • I used the command line tool gsettings to adjust the GSettings key values above. If you want to influence and explore available keys by using a GUI, have a look at the dconf-editor. Use the following command to install it:
    su -c "yum install dconf-editor"
  • You may want to use the Ubuntu fonts, too. They are not included in the main repositories right now,1) therefore I wrote the install-ubuntufonts-fedora.sh bash script to make the font installation faster and easier. There is a high probability that this script will never be useful to someone else than myself. But you never know. If you want to use it, open a terminal and run the following commands to download and execute it (copy and paste recommended):
    wget "http://blog.andreas-haerter.com/_export/code/2011/07/18/install-ubuntufonts-fedora.sh?codeblock=1" -O "/tmp/install-ubuntufonts-fedora.sh"
    chmod a+rx "/tmp/install-ubuntufonts-fedora.sh"
    su -c "/tmp/install-ubuntufonts-fedora.sh"

    Please read the Ubuntu Font Licence for all the rules that govern the use of the fonts.

  • If you want to go any further, you should know some things about the fontconfig system. First of all, it is controlled by *.conf files. Fedora is looking for them at the /etc/fonts/conf.d/ directory and they get imported in alphabetical order.2) Please note that every file in this directory should be a symlink pointing to a real config file located in /etc/fonts/conf.avail/. This makes it possible to deactivate settings by deleting the symlink in /etc/fonts/conf.d/ without loosing the corresponding config file in /etc/fonts/conf.avail/. It is also recommended to follow the rule “one setting, one file”. This makes sure you always know which files configures what.
    All settings at /etc/fonts/conf.d/ are affecting all user accounts and therefore you need root privileges to create or edit the files. If you want to influence only a specific user account, it is also possible to place files in the user's ~/.fontconfig/ directory (simply create it if it is not already existing).
  • I assume that your display is using RGB pixels (the subpixel layout test page can help you to verify this). If your monitor is using BGR, V-RGB, or V-BGR pixels, you might want to use another anti-aliasing setting than rgba.


Edit 2011-07-21: Here are the demanded screenshots. You can use your keyboard to navigate trough them ( and key). The last one shows a terminal with Ubuntu fonts.

There is only a ubuntu-title-fonts package which does not install the normal Ubuntu font
Numerical prefixes are used to adjust the import order. See /etc/fonts/conf.d/README for details

// Full disk encryption with Ubuntu (9.04 Jaunty or newer), LVM and LUKS

This article provides a step-by-step guide on how to install an Ubuntu Linux system with full disk encryption (new installation). However, you should take a relaxed day as topical newbie for further reading. You don't have to keep everything in mind but it is never an error to acquaint oneself with something new.

// Vollverschlüsseltes System mit Ubuntu (ab 9.04 Jaunty), LVM und LUKS

Dieser Artikel beschreibt, wie ein vollverschlüsseltes :lang_en: System mit Hilfe von Ubuntu-Linux eingerichtet wird (Neuinstallation). Der gesamte Artikel kann dabei Schritt für Schritt nachvollzogen werden um ans Ziel zu kommen. Dennoch sollte man sich als Neuling einen ruhigen Tag Zeit nehmen, um die Thematik zu erfassen. Man muss sich bei weitem nicht alles merken, sich aber einmal eingelesen zu haben schadet nie.

// Time synchronisation with NTP on Ubuntu (and Debian)

The Network Time Protocol (NTP) is a protocol for synchronising the clocks of computers over TCP/IP networks. I don't go into detail here,3) but NTP is helpful if you need a really4) exact system time (e.g. on special Database servers) or just to get a correct clock setting on your common desktop. There are two ways to use NTP to set your system's clock:

  • ntpdate – Simple NTP client, syncs your system's clock instantly by polling specified NTP server(s) every time it is called.
  • ntpd – NTP server daemon, calculates the drift of your system's hardware clock and continuously adjusts it. Can act as NTP server for other NTP servers and clients.

The whole system and the client software is a lot more complex than you might think. Look at the Weblinks and/or search the www if you are interested.
we are talking about ~200 milliseconds

// VPN KIT (former Uni Karlsruhe): use it with Ubuntu Linux

Connecting to university VPNs is always… fun. This is also true for the KIT VPN, especially because there is so much outdated information out there. E.g. there is no more Cisco compatible endpoint5) but tons of vpnc tutorials! You have to use the Juniper Networks software jnc now.


However… it worked after all. The IT guys were friendly enough to put helpful information at the online help. :-) But to make it even easier, here are a my hints to get the KIT University Karlsruhe VPN connection running:

  1. Make sure you got a working Java RE. I used sun-java6-jre, therefore I don't know if it runs with OpenJDK.
  2. If you are running a 64bit Ubuntu,6) you need some 32bit wrapper libraries for jnc:
    sudo apt-get install libc6-i386 lib32z1 lib32nss-mdns
  3. Open a terminal, download and untar the jnc archive the KIT VPN help provides for Linux:
    cd ~
    wget https://www.scc.kit.edu/scc/sw/juniper/7.0/linux_vpn_7.0.tar.gz
  4. Extract the archive and remove it afterwards:
    tar -xzf linux_vpn_7.0.tar.gz
    rm linux_vpn_7.0.tar.gz
  5. There should be a juniper_linux directory within your home dir now. Change into it and run the included vpn-install.sh script:
    cd ~/juniper_linux

    Simply follow the instructions (e.g. you have to enter your RZ username).

  6. Make sure jnc is executable:
    sudo chmod a+xr /usr/local/bin/jnc
  7. You can remove the temporary juniper_linux directory now:
    rm -rf ~/juniper_linux

    That's it.


To establish the connection, open a terminal and type jnc -n kit. The program should start and prompt you for your account's password. Example output:

user@computer:~$ jnc -n kit
Server certificate verified and CN is vpn.kit.edu. Saving in /home/user/.juniper_networks/network_connect/config/vpn.kit.edu.der.
Connecting to vpn.kit.edu : 443.
Waiting for ncsvc for 3 seconds... done
ncsvc is running, but tunnel is not established yet. Waiting for 3 seconds... done.
ncsvc is running in background (PID: 2448):
tunnel interface tun0, addr:

You can use jnc stop to close the VPN connection. Example output:

user@computer:~$ jnc stop
ncsvc is running, sending signal... terminated.

2011-10-25: Updated the installation instructions, there is a new VPN software version (7.0).

This means the Cisco compatible vpnc does not work!
You can check this by opening a terminal: If uname -m prints out x86_64, you are running a 64bit Ubuntu

// Adobe Flash 64bit for Linux returns

Adobe dropped the experimental, native 64bit Linux support officially in the mid of 2010.7) Therefore, there was no alternative to the slow but safe 32bit wrapper, provided by the flashplugin-installer package.

But there's life in the old dog yet: Adobe released a new 64bit Labs version yesterday. If you want to use it, you may be interested in some manual installation instructions and/or a 64bit Flash installation/update script for Ubuntu Linux.

The last released version got serious security vulnerabilities.

// Full disk encryption with Ubuntu (9.04 Jaunty or newer), LVM and LUKS

I wrote a detailed guide on how to install an encrypted Ubuntu Linux:

The setup is using LUKS and Logical Volume Manager (LVM) to get a secure and flexible system. And to make nearly everybody succeed, there is even a crypt-setup bash script, making the installation faster and easier.

Have fun. :-)

// Fixing not working backlight controls on Ubuntu 10.04 Lucid @ HP Compaq 615 notebook

Ubuntu generally works like a charm on the HP Compaq 615 low-budget notebook. I own one since ~1 year, using the proprietary ATI Radeon driver provided by Ubuntu's Hardware Driver Assistant for the on-board Radeon HD 3200 graphic card. Never had any problems with it.

However, since Ubuntu 10.04 Lucid the display background lighting controls/buttons do not work properly with the proprietary driver recommended by Ubuntu's Hardware Driver Assistant (System→Administration→Hardware Drivers). To fix this problem, simply upgrade to the newest ATI Radeon Driver provided by AMD:

  1. Deactivate the currently used proprietary ATI Radeon driver (System→Administration→Hardware Drivers) and reboot afterwards to be on the safe side.
  2. Download the newest driver from http://support.amd.com/: Download graphics drivers → Integrated Motherboard Graphics → Radeon HD 3xxx Series → Radeon HD 3200 Series → Linux x86_64 (for 64bit systems) or Linux x86 (for 32bit systems)
  3. Open a terminal, make the downloaded ati-driver-installer-<version>.run file executable and start it with superuser privileges:
    chmod a+rx /path/to/ati-driver-installer-<version>.run
    sudo /path/to/ati-sriver-installer-<version>.run
  4. An installation wizard will start → Install Driver → Automatic. After rebooting your system, everything should be fine. You may delete the downloaded file now.

Please note: you have to do this again after you are installing a kernel update. If the new driver is not compatible to your kernel, you can always switch back to the one shipped with Ubuntu.

Update 2010-11-03: backlight controls are working out of the box on Ubuntu 10.10 Maverick and the proprietary ATI driver provided by Ubuntu's additional driver wizard.

// Ubuntu: remove the envelope icon (messages indicator) from the indicator applet

If you want to get rid of the envelope/message indicator on Ubuntu 9.10 Karmic or 10.04 Lucid, you can't do this by removing the applet from the panel – at least not without loosing tray icons and sound control. This is because the icon is embedded within the indicator applet8) which fulfills more than a single function, including the graphical volume control.

To remove only the envelope, open a terminal and uninstall the indicator-messages package:9)

sudo apt-get remove indicator-messages

After logging out and in, the envelope is gone:
Screenshot - before and after the removal of the indicator-messages package

As you can see, the envelope icon is provided by the indicator-messages package. It should display information from various applications. But I currently don't use any program which works with it so it is useless for me right now. IMHO separate applets or a way for the user to configure the indicator applet would be preferable to the need for removing packages with superuser privileges. Hope this changes in the future.

“Benachrichtigungsanzeige” in German

// Ubuntu: Failed to parse existing X config file '/etc/X11/xorg.conf'

If you are using the proprietary NVIDIA graphic driver on Ubuntu 9.10 Karmic or 10.04 Lucid, you may get an error when trying to save your display configuration (especially on a freshly installed system):

Failed to parse existing X config file '/etc/X11/xorg.conf'

This happens because nvidia-settings10) tries to parse the existing configuration file before storing a new version of it. And it is not able to handle the xorg.conf shipped with Ubuntu by default. Open a terminal and use the following command to fix this:

sudo nvidia-xconfig

The command creates a basic /etc/X11/xorg.conf suitable for your graphic card. The NVIDIA X Server Settings tool should be able to store your display settings the now.

Update 2010-11-03: It is still the same on Ubuntu 10.10 Maverick…

listed as “NVIDIA X Server Settings” in the GUI menu

// VPN Uni Freiburg: use it with Ubuntu Linux

I helped my girlfriend's sister to configure the university's VPN on her Ubuntu notebook a few weeks ago. The available documents simply… :-x. Only two PDFs are containing some hints. Additionally, the IT guys can't help you.11)

However… it worked after all. If someone has the same problem, here are a my hints to get the University Freiburg VPN connection established:

  1. Install VPNC:12) sudo apt-get install network-manager-vpnc
    Please restart your network or reboot after installation, otherwise it may not work.
  2. Open the network manager/VPN applet:
  3. Click on “Add…”. A wizard opens, helping you to create the needed VPN profile. Please choose “Cisco compatible VPN client (vpnc)” and click on “Create…”.
  4. “Username” is your RZ account username.
  5. “Password” is your RAS password (:!: NOT your common RZ account password).
  6. Fill out the gateway13) and groupname + grouppassword:
    • if you are using the campus network (WLAN/red LAN boxes):
      ipsec-rz.vpn.uni-freiburg.de and campus + campus
    • if you want to connect via internet:
      home-rz.vpn.uni-freiburg.de and home + home
  7. Choose NAT-T as NAT-Traversal.

Now you should be able to establish/close the connection by a simple click on the VPN profile using the network manager applet (look at the first screenshot, there you can see the profile “VPN Uni Freiburg Home” I created before writing this post). Hope that helps :-)

really, the RZ support is not able to help 'cause the guys there simply don't know what to do.
VPNC will be embedded into the common VPN GUI of the GNOME network manager, you will find some more options after installing it.
I'm no native speaker (English)
Please let me know if you find any errors (I want to improve my English skills). Thank you!
QR Code: URL of current page
QR Code: URL of current page start (generated for current page)