Although I have never laid my hands on an Apple computer, I have seen people going crazy about them. I remember seeing some kids shouting hysterically in front of Apple store on the release day of Tiger a few years ago. The user interface of Apple's OS is said to be one of the selling points. So when I was feeling tired of Mepis Linux's default look last night, I decided to try an OS X look for a change. It turned out to be relatively easy to do.

KDE widget Basically, getting an OS X Tiger look and feel on KDE involves installing a theme that imitates its look and feel. There is a KDE theme called Baghirathat does just that. It's so popular that Debian sid has it in the pool, so

apt-get install kwin-baghira

as root should get it installed. Once it's installed, launch KDE Control Center -> Appearance and Themes -> Style, and change Widget Style to Baghira. Also, go one step up to Colors, and change Color Scheme to Aqua Blue. Now you should get Tiger look and feel for all the KDE widgets. This theme can be further configured using a tool called bab. One can launch bab from from command line and find it in the system tray. Right click it to open configuration screen.

Compiz window decoration Since I use compiz-fusion as my default window manager, Baghira theme's own kwin decoration settings does not work. Of course, compiz-fusion can use kwin as window decorator, but it's less stable than emerald, compiz's own window decorator. It would be great if emerald has an OS X looking theme. Sure enough, there are quite a few emerald themes that can do that. Launch emerald-theme-manager tool, one can download GPL or non GPL'ed themes. I tried them one by one, and found at least three OS X imitators. In the end I chose "dreamtiger-baghira" as it matches Baghira theme.

OS X style menubar One can set up an OS X style menubar on top of screen in KDE Control Center -> Desktop -> Behavior. I did that, but the old KDE panel was still around and it was not possible to remove it. So I removed all of the panel's content, and set it to auto hide at a corner so it won't bother me any more. Following Baghira theme's instruction, I added Baghira's Starter to the menubar. Now the menu of KDE application with current mouse focus will show up in the menubar. This behavior took some used to, but I think I am liking it because it makes application windows look cleaner and takes less screen space. There are some caveats using OS X style menubar in KDE. Icons in system tray does not scale, so their bottoms are cropped off. This is not a big deal since I hide most of the system tray icons. Another issue, is that full screen mode in VirtualBox is no longer really full screen because the menubar is always visible. This is a bit annoying especially if you want to do a presentation or playing full screen games in the virtual machine. I have yet to find a way to hide the menubar. Also, I have been using a Mac like docker, kxdocker, for years, so there's no need to change here.

GTK application Baghira theme does not apply to GTK applications, which I have plenty: firefox, synaptic, openoffice, gvim, etc. To have a consistent look across all applications, I needed to set up OS X like theme for GTK application too. Again, there are several GTK themes can do that. I chose to download OSX-Tiger theme because it's small. I unpacked it and moved the unpacked directory to /usr/share/themes. Since a full installation of gnome desktop wasn't something I wanted to do, I needed a small tool to let GTK applications aware of and use this theme. A command line tool called switch2 can be installed from Debian pool (package name is gtk-theme-switch) to do that:

switch2 /usr/share/themes/OSX-theme

Icons It doesn't help if one uses an OS X theme without OS X like icons. I chose to install OS-L icon set. It includes a script to build the icon set, one can then pick it in KDE Control Center -> Appearance & themes -> Icons.

Fonts To do a full blown imitation of OS X look, matching fonts are required. Unfortunately, we have to use the real thing here. Download Mac fonts, unpack and put the directory under /usr/share/fonts/truetype. To easily achieve font consistence across all GUI applications, I changed /etc/fonts/local.conf to make these Mac fonts as X server's preferred fonts. My /etc/fonts/local.confis here:

<fontconfig>
  <!-- Disable anti-alias for Chinese fonts less or equal to 12px -->
  <match target="font">
    <test qual="any" name="family" compare="eq">
      <string>WenQuanYi Bitmap Song</string>
      <string>AR PL Mingti2L Big5</string>
      <string>AR PL KaitiM Big5</string>
      <string>AR PL KaitiM GB</string>
      <string>AR PL SungtiL Big5</string>
      <string>AR PL New Sung</string>
      <string>AR PL ShanHeiSun Uni</string>
      <string>AR PL ZenKai Uni</string>
    </test>
    <test name="pixelsize" compare="less_eq">
      <double>12</double>
    </test>
    <edit name="antialias">
      <bool>false</bool>
    </edit>
    <edit name="hinting">
      <bool>true</bool>
    </edit>
  </match>
  <alias>
    <family>serif</family>
    <prefer>
      <family>AppleGaramond</family>
      <family>DejaVu Serif</family>
      <family>Bitstream Vera Serif</family>
      <family>Times New Roman</family>
      <family>Times</family>
      <family>AR PL New Sung</family>
      <family>AR PL ShanHeiSun Uni</family>
      <family>AR PL Mingti2L Big5</family>
      <family>AR PL SungtiL GB</family>
      <family>SimSun</family>
    </prefer>
  </alias>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Lucida Grande</family>
      <family>DejaVu Sans</family>
      <family>Bitstream Vera Sans</family>
      <family>Arial</family>
      <family>Verdana</family>
      <family>Helvetica</family>
      <family>AR PL New Sung</family>
      <family>AR PL ShanHeiSun Uni</family>
      <family>AR PL kaitiM Big5</family>
      <family>AR PL kaitiM GB</family>
    </prefer>
   </alias>
   <alias>
     <family>monospace</family>
     <prefer>
       <family>DejaVu Sans Mono</family>
       <family>Bitstream Vera Sans Mono</family>
       <family>Courier New</family>
       <family>Courier</family>
       <family>AR PL New Sung</family>
       <family>AR PL ShanHeiSun Uni</family>
     </prefer>
  </alias>
</fontconfig>

Here, I chose "AppleGaramond" as the default serif font, "Lucida Grande" as the default san-serif font. I kept my original monospace font intact since I like it. For menu and toolbar fonts, I changed them to "Lucida MAC" in KDE Control Center -> Appearance & Themes -> Fonts. They make menus look very clear to read.

Firefox Firefox doesn't respect KDE's font size setting so its UI font often looks much bigger than other applications. We have to manually set its UI fonts to have consistency. Create a file ~/.mozilla/firefox/xyzxyz.default/chrome/userChrome.css (or just copy the example from the same directory, replace "xyzxyz" with the actual directory name), and change the font size. Finally, get a Mac-looking compatible firefox theme should make firefox looks better. There are many options, I chose macfox II for its clean look.

Update: 12/06/2007 09:42:07 AM (EST) It turned out I don't like "AppleGaramond", it's too much newspaper like. I eventually rolled back to "DejaVu Serif" as my default serif font (mostly used in Web content viewing). Also, Baghira theme crashes basket note pads application. I sent a bug report to basket developer, haven't heard back yet.



Comments

comments powered by Disqus