Friday, October 11, 2013

How to enable font subpixel smoothing in gnome-shell (Fedora 18)

The default desktop for Fedora 18, gnome-shell, does not offer an intuitive way to enable font sub-pixel smoothing for LCD monitor. Gnome 2 desktop had Fonts configuration utility for ages, but with gnome-shell, this useful capability is well-hidden.
  • Enable RPM Fusion repository. Click on RPM Fusion free for Fedora 18 link to install repository's configuration on your machine.

  • Install freetype-freeworld fronts package:
     
    $ sudo yum -y install freetype-freeworld
    
    

  • If doesn't exist, create $HOME/.Xresources file and turn subpixel rendering on:
     
    Xft.lcdfilter:  lcddefault
    
    

  • Start gnome-tweak-tool utility and configure:
    • "Font Hinting" to "None"
    • "Font Antialiasing" to "Rgba"



  • Reboot your machine.



  • Login back and validate the settings:
    $ xrdb -query
    
    Xft.antialias: 1
    Xft.dpi: 96
    Xft.hinting: 0
    Xft.hintstyle: hintnone
    Xft.lcdfilter: lcddefault
    Xft.rgba: rgb
    
    

  • You might also upgrade your version of liberation-fonts from Koji build for FC18. They are a good replacement for msttcorefonts.

    If all went as suggested, you should enjoy better-looking desktop.

    In conclusion, I might add that it is a crying shame for gnome-shell developers to destroy well-established Gnome desktop ecosystem in their relentless pursuit of the tablet market at the expense of poor Linux desktop users.

    Friday, September 27, 2013

    How to run GUI applications on Linux with sudo

    Linux graphical system configuration tools such as system-config-printer require running desktop environment. I find myself often in need to configure system from remote desktop (via VNC client) with only sudo privileges available to me. Often such systems don't offer GDM access and limit remote desktop access to a selected group of users with sudo privileges only. If we were to launch system-config-printer from shell prompt as a regular user, we would get Query dialog asking to enter root password:
     
    $ system-config-printer
    
    
    To get around this problem, we need to use 'sudo' command in combination with setting DISPLAY environment variable.
    First, find out your system hostname:
     
    $ hostname
    darkstar
    
    
    Then use sudo:
     
    $ sudo DISPLAY=darkstar:1 system-config-printer
    Enter your password to run commands as root@darkstar: xxxxx  
    
    
    You should see Printer configuration dialog pop-up on your screen.


    Note that I used 'darkstar:1' as my VNC session is :1 in this example. Your settings might differ.