1

I'm trying to create new Gnome Classic theme (gnome-session-fallback) on Ubuntu Precise. I want to include it into System Settings -> Background menu to offer that configuration to all users.

I'm searching information related but all I find is related with Gnome shell or Unity.

Thank you for help.

0

I think you should create a gtk3 theme (fallback compatible).

In the following Answer, fossfreedom explains how to search for gtk3 themes fallback compatibles.

I would recommend use "Ambiance" theme as template (Fallback Compatible too) to create your theme.

Here you have a useful Article about GTK3 theming.

Article's quote

Let's face it, you cannot a make GTK3 only theme. You have to provide a GTK2 theme which matches the GTK3 theme. Otherwise there will be no integration between GTK2 and GTK3 apps and it will look really bad. And you may also provide a matching window theme, like metacity, mutter, xfwm etc. GTK2 and metacity theming are a pain, but you have to do it if you want people to use your theme.

Info and tool about GTK themes

Adding theme to System Settings > Appearance list

To add a theme to the System Setting > Appearance you should to edit and recompile the gnome-control-center source. (The theme's list is hardcoded)

enter image description here

NOTE: This example is in Ubuntu 12.04 with gnome-control-center-3.4.2 to add the MediterraneanDark theme to the Appearance list.

1) Download the tar.gz file of MediterraneanNight Series to your Download directory.

2) Extract the tar.gz file and copy the theme to the /usr/share/themes folder.
Open a Terminal and type:

  • cd ~/Downloads
  • tar -xvzf MediterraneanNight-2.03.tar.gz
  • sudo cp -R ~/Downloads/MediterraneanDark/ /usr/share/themes/

3) Create and Edit the index.theme file for the MediterraneanDark theme.

  • sudo cp /usr/share/themes/Ambiance/index.theme /usr/share/themes/MediterraneanDark/

  • sudo sed -i 's/Ambiance/MediterraneanDark/g' /usr/share/themes/MediterraneanDark/index.theme

Content of the index.theme file: enter image description here

4) Install the necessary packages.

  • sudo apt-get install build-essential

5) Install build dependencies.

  • sudo apt-get build-dep gnome-control-center

6) Create a folder to download the source code.

  • mkdir ~/Downloads/src-center

  • cd ~/Downloads/src-center

7) Download the source code.

  • apt-get source gnome-control-center

8) Edit the Source Code.

  • gedit gnome-control-center-3.4.2/panels/background/cc-background-panel.c

Search for the lines 1232 and 1233 to edit them and add the theme.

Before:

enter image description here

After:

enter image description here

I changed from:

static gchar *themes_id[] = { "Adwaita", "Ambiance", "Radiance", "HighContrast", "HighContrastInverse" }; static gchar *themes_name[] = { "Adwaita", "Ambiance", "Radiance", "High Contrast", "High Contrast Inverse" };

To:

static gchar *themes_id[] = { "Adwaita", "Ambiance", "Radiance", "HighContrast", "HighContrastInverse", "MediterraneanDark" }; static gchar *themes_name[] = { "Adwaita", "Ambiance", "Radiance", "High Contrast", "High Contrast Inverse", "MediterraneanDark" };

9) Go to the gnome-control-center-3.4.2 folder to build the deb packages.

  • cd gnome-control-center-3.4.2/
  • dpkg-buildpackage -rfakeroot -uc -b

10) Install the deb packages.

  • cd ..

  • sudo dpkg -i *deb

11) Finally you can logout and Login to see the changes.

enter image description here

enter image description here

Hope it helps.

| improve this answer | |
  • Thank you, that can help me. I'll try and I give you feedback. It's curious that the Ubuntu logo that appears in the top panel dissapears. – ssoto Sep 1 '13 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.