Ever wanted to install a new theme to your TRAC installation? Often we’ll want our development environments to look a little different from every other trac site on the Internet. We’d never tried to change the theme before, so decided to write a small tutorial on how it’s done for our archiving purposes, and for anyone else that wants to change their TRAC theme.
We’re using Ubuntu Linux, and this tutorial assume you’ve already installed TRAC on a global basis to your development server.
So, lets get some themes installed on our Trac 10.x installation shall we?
First, install the pre-requisites if not already installed.
# apt-get install python2.5-setuptools
We had to change a couple permissions as well so Trac and everything can read/write where it needs to
# chown -R www-data:www-data /var/www
Now we had to install WebAdmin for Trac 10.x:
# svn export <http://svn.edgewall.com/repos/trac/sandbox/webadmin/> # cd webadmin # python setup.py bdist_egg # easy_install -Z dist/*.egg
Note that WebAdmin is included with Trac 11.x if you’re bleeding edge, you probably don’t need this.
Now we had to install ThemeEnginePlugin for Trac 10.x:
# svn checkout <http://trac-hacks.org/svn/themeengineplugin> # cd themeengineplugin # cd 0.10 # python setup.py bdist_egg # easy_install -Z dist/*.egg
Now, lets install some themes for Trac 10.x:
# svn checkout <http://trac-hacks.org/svn/pydotorgtheme/> # cd pydotorgtheme/0.10/ # python setup.py bdist_egg # easy_install -Z dist/*.egg # cd ../../ # svn checkout <http://trac-hacks.org/svn/gamedevtheme/> # cd gamedevtheme/0.10 # python setup.py bdist_egg # easy_install -Z dist/*.egg # cd ../../ # svn checkout <http://trac-hacks.org/svn/consultanttheme/> # cd consultanttheme/0.10 # python setup.py bdist_egg # easy_install -Z dist/*.egg # cd ../../
Now we added the following to our Trac.ini within the project we want the themes to be used for:
# cd /var/local/trac/trac.yourdomain.com/conf/ # nano trac.ini
Add this to the components section of your configuration file
[components] webadmin.* = enabled themeengine.* = enabled
Then we restarted Apache and we were able to select themes to make available, and attach to our Trac Installation. Note that with each new theme added, you will have to restart Apache in our experience.
This should get you going with installing some themes for Trac on your Ubuntu Linux server. Have Fun!
Comment by antonio on 2009-06-05 16:36:28 -0500
It works perfect! thank you!!
Comment by spork on 2009-10-15 11:45:01 -0500
Thanks for posting. I installed a few themes and didn’t see the bit about restarting Apache anywhere in their documentation, and frustration at my ineptitude began to set in.