Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Xubuntu, (actually linux mint with xfce on top, but I suppose it's essentially the same thing)

I set my appearance theme to (a modified version of) MurrinaStormCloud, but if I run gitk, it uses ugly font rendering, ugly colors, ugly widgets.

I think tcl is the thing to blame here, but can I fix it?

Here's a picture for comparison between what firefox looks like under the current theme and what gitk looks like:

gitk ugly theme

share|improve this question
nice that we have gitg, but I still vote this question up to see if anyone can solve tcl/tk ugliness. gitk is still more compact than gitg. – u0b34a0f6ae Aug 27 '09 at 20:07
up vote 21 down vote accepted

gitk is implemented in tcl/tk. I've searched around but there doesn't seem to be much you can do; it is scolded as ugly on Linux everywhere. And apart from using a hideous toolkit, gitk has been growing worse for me as they put in more functions (mostly not used) the UI becomes even more confusing.

So I instead of a solution I recommend gitg, which is a similar tool, less mature, using GTK+.

share|improve this answer
+1 gitg didn't know about thatone – Joakim Elofsson Aug 26 '09 at 20:43
I've heard about gitg. Sounds promising. Though, the thing is, gitk looked OK on windows, if I remember correctly. – hasen Aug 27 '09 at 0:14
gitg is much nicer. +1 for that! – crazy2be May 14 '11 at 17:58
All tcl/tk apps look hideous, unfortunately. – jpaugh Dec 3 '11 at 19:07
@jpaugh No, not all, just those that don't use ttk styles, the Tk 'theme' system. – Lloeki Dec 5 '12 at 15:00

To fix this the Debian (Ubuntu) way:

$ sudo apt-get install tk8.5
$ sudo update-alternatives --config wish

And then pick the wish8.5 alternative.

share|improve this answer
That's much nicer looking, although it still doesn't follow the Gtk+ or Qt theme. +1 – crazy2be May 14 '11 at 17:54
Thank you, I didn't expect perfect desktop integration but 8.5 does look much much better that the ones in 8.4. – Lucian Adrian Grijincu May 20 '11 at 20:36
This answer should be up there! Simply changing tk to 8.5 greatly improves the looks of gitk. – pedromanoel Apr 2 '13 at 13:17
This is what I get on Ubuntu 14.04: update-alternatives: error: no alternatives for wish – Luís de Sousa Apr 12 at 9:28

Gabriel Morin's post is good, but tile-qt doesn't build anymore with those instructions and, though the blog post he linked to (mine, by the way) still works, it's no longer the best solution I know.

For people who want something better than the "clam" theme, PySolFC includes a Clearlooks theme for Ttk and I wrote another blog post which explains how to install it.

Here are the relevant parts of it, adapted for a Lubuntu user (which I now am):

# Get the theme
sudo apt-get install pysolfc

# Copy it into your user profile to not rely on PySolFC's presence
mkdir -p ~/.local/share/tkthemes
cp -r /usr/share/games/pysolfc/themes/clearlooks ~/.local/share/tkthemes/

# (optional) Remove PySolFC now
sudo apt-get remove pysolfc
sudo apt-get autoremove

# Add it to Ttk's search path
echo "export TCLLIBPATH=~/.local/share/tkthemes" >> ~/.xsessionrc

# Set the theme
echo "*TkTheme: clearlooks" >> ~/.Xresources

# Test it in this specific terminal window
export TCLLIBPATH=~/.local/share/tkthemes
xrdb -merge ~/.Xresources
git gui     # gitk's "this isn't a repo" dialog is always ugly

# ...and then log out and back in to apply .xsessionrc for the whole desktop

There are some widgets which are still ugly (the menu bar and the SHA1 ID: text, which needs to be patched in gitk to be themable) but I don't know enough Tcl/Tk to patch things.

(And I've heard rumors that the menu bar wasn't made themable because it's delegated to the OS to draw on Windows and MacOS)

share|improve this answer
I like the fact that you noticed the link to your blog and came back with an improved solution :) . If I find some time to set myself up again I might update the build instructions for tileqt, since I imagine it's still a viable alternative to what you propose. – Gabriel Morin Aug 25 '14 at 15:28
This script indeed does something, it is just not visible. Still get the ugly light coloured theme. Tested on Ubuntu 14.04. – Luís de Sousa Apr 13 at 9:13
Well, I'm on a Lubuntu 14.04 system that got frankenstein'd into a partly Kubuntu 14.04 system and I can say that this works perfectly with git gui (which I use daily), so I have no idea what might be wrong on your end. This should fall firmly within the common core shared by all *buntu distros. – ssokolow Apr 14 at 3:23

tcl/tk 8.5 is actually themeable and looks rather native on Windows 7 and apparently on Mac. Less care seems to have been given to write theme engine bridges for it under linux, but you can do one of three things:

To have it persist between reboots add the line *TkTheme: clam to ~/.Xresources, but I'm not sure if that's read whether you launch your desktop environment with startx or not.

Under Ubuntu 11.04 it was pretty easy, adapt the tcl/tk library paths as needed (some people have reported that those instructions are outdated):

$./configure --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5/


$sudo checkinstall

checkinstall being for creating a quick .deb instead of installing directly, keeps the system tidy.

Then afterwards as above, get tk to use your qt themes:

$echo '*TkTheme: tileqt' | xrdb -merge -
  • There's also a tile-gtk in the same sourceforge repo as tile-qt, but it's thouroughly out-of date. I did manage to build it and install it after much fiddling but the visual results were messy - not recommended.
share|improve this answer

as said gitk (and also git gui) is implemented using tcl/tk, tk is the widget toolkit and do not care about gtk-based themes (or any at all afaik). And no this is not something you can fix (well rewriting gitk to use gtk widget's is ofc not impossible but hardly a 'fix') other than replacing it with something else.

You can change the font's in the preferences to make it slightly better, I use:
Main font: Helvetica 9
Diff display font: Courier 9
User interface font: Helvetica 9

This looks a little better and not as broken as the default's, well for me.

share|improve this answer

I have built tile-gtk (on Mint 17.2) with following commands:

sudo apt install tcl-dev tk-dev glib2.0-dev libglib2.0-dev
git clone git:// tktable-tile-gtk
cd tktable-tile-gtk
./configure --with-glib-lib-inc=$(pkg-config --cflags glib-2.0) --with-gtk-lib-inc=$(pkg-config --cflags gdk-2.0)
sudo make install
echo '*TkTheme: tilegtk' | xrdb -merge -

Works good, looks good; unfortunately I can run only one instance of gitk at time due to tilegtk.

share|improve this answer

After some of the suggestions here and elsewhere, I came to the conclusion this whole Tcl/Tk business is an helpless case - it never manages to use the DE theme.

Therefore I decided to try other GUIs for Git. The Git Wiki lists a number of GUIs, some of which are quite able:

  • git-cola - based on PyQt4 and seems to be most powerful in term of functionality.

  • QGit - based on Qt, looks great but lacks some functionality, especially in what concerns branches.

  • GitKraken - a powerful and elegant interface based on Electron and loaded with features; free, but requires user registration with the vendor.

My advice for users struggling with git-gui/gitk is to simply switch to one of the above.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .