2011-07-18 // 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
- 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 thefreetype-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.
- Adjust the hinting style and enable RGB anti-aliasing. Ubuntu it using
hintslight
hinting by default, Fedora comes withhintmedium
. 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"
- 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 theXft.lcdfilter: lcddefault
setting in your home directory. Open a terminal and execute the following command to do so:echo "Xft.lcdfilter: lcddefault" > ~/.Xresources
- 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 thedconf-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
.
Weblinks
Screenshots
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.
2011-06-18 // 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.
2011-06-18 // Vollverschlüsseltes System mit Ubuntu (ab 9.04 Jaunty), LVM und LUKS
Dieser Artikel beschreibt, wie ein vollverschlüsseltes 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.
2011-06-12 // 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.
2010-10-06 // 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.
Installation
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:
- Make sure you got a working Java RE. I used
sun-java6-jre
, therefore I don't know if it runs with OpenJDK. - 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
- 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
- Extract the archive and remove it afterwards:
tar -xzf linux_vpn_7.0.tar.gz rm linux_vpn_7.0.tar.gz
- There should be a
juniper_linux
directory within your home dir now. Change into it and run the includedvpn-install.sh
script:cd ~/juniper_linux ./vpn-install.sh
Simply follow the instructions (e.g. you have to enter your RZ username).
- Make sure
jnc
is executable:sudo chmod a+xr /usr/local/bin/jnc
- You can remove the temporary
juniper_linux
directory now:rm -rf ~/juniper_linux
That's it.
Usage
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. Password: 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: 141.3.193.37
You can use jnc stop
to close the VPN connection. Example output:
user@computer:~$ jnc stop ncsvc is running, sending signal... terminated. user@computer:~$
2011-10-25: Updated the installation instructions, there is a new VPN software version (7.0).
2010-09-16 // 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.
2010-08-18 // 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.
2010-08-11 // 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:
- Deactivate the currently used proprietary ATI Radeon driver (System→Administration→Hardware Drivers) and reboot afterwards to be on the safe side.
- 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)
- 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
- 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.
2010-08-04 // 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:
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.
2010-07-28 // 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):
This happens because nvidia-settings
10) 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…
2010-05-14 // 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… . 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:
- Install VPNC:12)
sudo apt-get install network-manager-vpnc
Please restart your network or reboot after installation, otherwise it may not work. - “Username” is your RZ account username.
- “Password” is your RAS password (
NOT your common RZ account password).
- Fill out the gateway13) and groupname + grouppassword:
- if you are using the campus network (WLAN/red LAN boxes):
ipsec-rz.vpn.uni-freiburg.de
andcampus
+campus
- if you want to connect via internet:
home-rz.vpn.uni-freiburg.de
andhome
+home
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