Skip navigation

Monthly Archives: May 2008

In perusing the Ubuntu forums, I have run into a ton of posts asking how to install gnome themes (gtk themes / metacity themes, icon themes, emerald).  I have decided to share what I’ve gathered over the last couple years.  Although it’s rather simple, I couldn’t find this information anywhere.

GTK / Metacity Themes

To install GTK and Metacity themes, all you need to do is extract the archive to the correct place.  Both GTK and Metacity themes can go into the same themes folder.  The thing most people don’t realize, and nobody mentions for the most part, is that to properly install a theme you need to put it in the /usr/share/themes directory.  The reason is so that it’s installed for all users.  The reason you want to install it for all users is so that when you run an application with root privelages it uses your theme.  So, pretty much anything in the System -> Administration will not use the theme if you do not install it into the /usr/share/themes directory.  Before you install, you need to determine the type of archive.  Most archives are in tar.gz format.  There are some that are in tar.bz2 format as well though.  To install a theme that’s packaged in a tar.gz file run the following command:

sudo tar xzvf name-of-archive.tar.gz –directory=/usr/share/themes

To install themes packaged in a tar.bz2 file run this command:

sudo tar xjvf name-of-archive.tar.bz2 –directory=/usr/sahre/themes

Once the extraction is complete, all you need to do is go to System -> Preferences -> Themes, click customize and pick the new GTK / Metacity theme.

Icon Themes

Installing an icon theme is equally simple.  The same deal applies, you just need to extract to the correct location so that programs run as root use the correct icons.  Also, see my post about Nautilus and emblems, it will make your icon themes much prettier.  The correct directory for icon themes is /usr/share/icons.  To install a theme that’s packaged in a tar.gz file run the following command:

sudo tar xzvf name-of-archive.tar.gz –directory=/usr/share/icons

To install themes packaged in a tar.bz2 file run this command:

sudo tar xjvf name-of-archive.tar.bz2 –directory=/usr/share/icons

Emerald Themes

If you don’t know what Emerald is, you should check it out.  It’s a window decoration manager that does a really nice job.  To use it you’ll need a compositing manager such as compiz.  To install emerald simply run this command:

sudo aptitude install emerald

To install a theme for Emerald go to System -> Preferences -> Emerald Theme Manager, click the Import button, and select the .emerald file.  Your new theme will show up in the Emerald Theme Manager theme list, to apply it just click on it.

That’s pretty much it, installing a theme is really easy but again I didn’t see any comprehensive guides so I figured I’d share what I know.  Hopefully this helps people customize Ubuntu to their liking.

I use Ubuntu, and for anyone who hasn’t tried it (especially if you use windows) give it a shot.  You will be very impressed.  This weekend I was looking for a really good icon pack.  After the upgrade to hardy I stopped using Thunar for my file manager.  This is because the new version of Nautilus has fixes for a lot of the things I had problems with.  However, there were a few issues with the icon themes I have been trying.  I’m actually using an icon theme that’s in the ubuntu repositories.  The icon theme is used by Ubuntu Studio, which is a version of Ubuntu aimed at multimedia development.

Obviously when picking an icon pack the most important thing is how they look graphically.  A lot of new icon themes have issues with emblems.  Most noticeably the desktop emblem which you see in your home folder on the desktop folder.  A lot of icon themes are missing this emblem, so what you see is the default gnome desktop emblem.  A lot of times the default emblem just doesn’t fit well.  What I’ve found is that most icon themes actually have a desktop icon, they just aren’t duplicated in the emblems directory.

Lame Desktop Emblem

So, what you can do is copy the desktop icon into the emblems folder and rename it to emblem-desktop.svg (or png depending on the type of theme).

After this change, it looks like this:

Much Better Desktop Emblem

There’s also a bug in Nautilus that will cause the emblems to be cut off if the icons are sized above 100%. You can see this in action here:

Cut Off Emblems

There’s a pretty simple fix for this problem.  All that is needed to fix this issue is to create a single file that instructs Nautilus to render the emblems on the righthand side of the icons.  The bug seems to only occur when the emblems are close to the right edge of the icons.  The file needs to be called folder.icon, and it needs to go in your /usr/share/icons/{ThemeName}/{IconSize}/places/ folder.  The file should look like this:

[Icon Data]
AttachPoints=0,0|0,400|0,800

After the fix the emblems will look something like this:

Nice Full Emblems

You can tweak the attach points to your liking, but keep the x value near the left side.  The braces separate the position of each of the potential emblems.  Three should be enough, most icons won’t have more than two emblems.  Like I said, tweak away.  Hopefully this picky people out there (like me).

Recently I was tasked with helping to integrate Sitecore into my company’s website. Currently we are using Microsoft CMS 2002, which for the most part works well. It does exactly what we need it to at this point. The problem is that it is so old, I believe the support is being dropped. Our lead content developer went through a long process of trying to find the right product for us. She finally came to the conclusion that Sitecore would work best for us.

Our website is written in 100% ASP.NET 2.0 with C#. Sitecore is an all .NET CMS, so it makes sense. We were able to get our hands on a trial product so that we could begin work on a POC. After having gone through the Sitecore documentation we realized that the way they want website setup really doesn’t play nicely with our project. They want their site to be the root, and all of your sites files to be a subfolder. This is not very practical for us because we run multiple sites on one code platform. Also, in development we generally are working on multiple branches. The sitecore files are around 300MB, and with multiple sites and branches, copying that amount of data around wouldn’t be practical.

So, a coworker and I tried many different scenarios and finally came up with a pretty good solution. What we originally had in mind was to just reference the Sitecore assemblies and set up all the configuration for Sitecore in our web.config. After we did that we ran into a couple of snags. The first thing is, even just to run their HTTPModule, you need to give their assemblies access to the sitecore install/sitecore directory. So, we created a virtual directory that pointed to sitecore install/sitecore. This virtual directory must be just a plain old virtual directory, not an application.

One issue is you need all of the assemblies from Sitecore’s bin directory, not just the Sitecore assemblies. Also, there are a couple of other required directories. Below you can see what is required, sitecore folder is a virtual directory. All the other directories were copied from the sitecore install.

/YourWebSite/

sitecore (vd)

App_Config

data

sitecore modules

temp

Another thing worth mentioning is that the Sitecore installer doesn’t set up the configuration for your database even if you specify your database information. You have to go into the App_Config/SqlServer/Connections.config file and manually specify your connection information. In your web.config you must also make sure the connections node’s serverMode attribute is set to blank. This node can be found under the sitecore node.

In the web.config there are also a bunch of folder paths that will need to be updated. For instance, <sc.variable name=”dataFolder” value=”../data” />. Make sure these variables map to the correct paths.

After all of that, the site runs pretty well with Sitecore, and we didn’t have to change the structure of our project.