How to make GNOME Icon Theme

How to make GNOME Icon Theme

Postby xwin78 on Sat Jul 26, 2008 5:38 pm

All,


I have so many cool (IMO) icons and I would like to build an icon set. Are there tools to do this?


Thanks
live for what you'd die for
xwin78
Level 1
Level 1
 
Posts: 40
Joined: Mon Dec 17, 2007 6:11 am
Location: Mid-West, USA

Linux Mint is funded by ads and donations.
 

Re: How to make GNOME Icon Theme

Postby cathbard on Mon Jul 28, 2008 4:52 am

Not really. I'll tell you how to do it the easiest way I know how and basically how I create my sets. http://cathbard.com/icons.html
First find an iconset that is close to what you want to create. Mostly one that has things that you like that you don't have versions of your own for. Copy this set somewhere in your home folder so you can see all the folders that make up the set. You will find the system wide icons in /usr/share/icons or if you have a set you have downloaded it will probably be an archive that you have to expand. Either way, you will want a copy of this set somewhere in you home folder so you can play with it.
Now go through all these folders to familiarise yourself with what lives where. You will notice that a lot of icons are actually symbollic links to other icons. You can spot these because they have a little arrow attached to them. That means all you have to do is replace the icon that that link points to. To find where it points simply right click on the symbolic link and go into properties and you'll see what the link target is.
You will have to go through all the different folders and replace the icons you want. If you have created your icons with inkscape it is a little easier because you can simply export them in the size you need into each folder by changing the folder destination and export size in the export dialog. Of course you have to know what you are doing. :wink:
Now that you have all your icons in the correct folders it is time to create the set.
First thing to do is rename the parent folder of the set (for example, let's call the set xwin). So rename the parent folder xwin.
Now you have to edit the file called index.theme so gnome knows what to do with your new set. Open this file with gedit and look for the first entry. It will look something like:

[Icon Theme]
Name=Cathbard Mint GTK

change this to

[Icon Theme]
Name=xwin

Save the file.

Gnome handles the installation of new iconsets atrociously. It's one of the areas where kde really kicks gnome's butt. I turn mine into deb packages so people can easily just install them and have them appear in the theme manager when they edit a theme. However I'm not going to tell you how to do that here. For your purposes all you need to do is copy this new set you have created to the ~/.icons folder (~ is shorthand for your user's home folder)
Now when you edit a theme the iconset "xwin" will be available.
If you want to share the set around simply archive it (including the parent folder) as a tar.gz file.

Have fun.
Image
"A bachelor is a selfish, undeserving guy who has cheated some woman out of a divorce." - Don Quinn
User avatar
cathbard
Level 3
Level 3
 
Posts: 148
Joined: Thu Apr 17, 2008 4:50 pm
Location: Australia

Re: How to make GNOME Icon Theme

Postby akaNed on Tue Jul 29, 2008 1:00 am

Thanks for the info Cathbard! :D

I've been interested in delving into icons, but it is a bit overwhelming...maybe soon.

Do you have any hints on creating GDM login themes?

Michael
Check out my other wallpapers here
GOYAKOD - (Get Off Your A** and Knock On Doors)
User avatar
akaNed
Level 3
Level 3
 
Posts: 188
Joined: Tue Aug 21, 2007 3:27 am
Location: Landrum, SC

How to make GDM Themes

Postby cathbard on Tue Jul 29, 2008 4:36 am

Again, the way I do it is to hack. Nowdays I am hacking my own things so they are hacks of hacks and are pretty much unrecognisable from the original. WHether they are GDM or KDM the process is the same, the code for both is very similar. Take one that is close to what you have in mind and replace all the components and then hack the greeter and the xml.
The first thing to do is hack the greeter. It will look something like this:
Code: Select all
[GdmGreeterTheme]
Greeter=mint-buntuleaves.xml
Name=Mint Buntuleaves
Description=Mint Buntuleaves gdm
Author=Cathbard <cathbard@gmail.com>
Copyright=(c) 2008 GPL2 Cathbard
Screenshot=screenshot.png
Edit it to suit the one you are creating. You will see the definition for the xml file in there. That is the file where everything happens.
The xml code will be broken up into nested sections that will begin with something like <item> and end with a </item>. Each section should have tab delimitors so they line up. For example, the section that defines the timed login section would look like this:
Code: Select all
<item type="rect" id="timed-rect">
    <show type="timed"/>
    <normal color="#FFFFFF" alpha="0.5"/>
    <pos anchor="c" x="50%" y="75%" width="box" height="box"/>
    <box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
      <item type="label" id="timed-label">
        <normal color="#000000" font="Sans 14"/>
        <pos x="50%" anchor="n"/>
   <stock type="timed-label"/>
      </item>
    </box>
</item>

The outside section (first and last) defines the rectangle that everything is referenced to and within that are sections that define where inside that rectangle the timer lives and how it looks. You will often see these coordinates in absolute terms. (ie <pos anchor="c" x="200" y="100" width="box" height="box"/>) This is not a good thing to do because the relative positions will change depending on the resolution used by the user. I convert all these figures into relative %'s as you can see in my example. This way everything will always be where you want them to be.
The position locaters are taken from the left (x) and the top (y)

There are a couple of ways to test what you are doing along the way but with gnome I find the easiest way is to rename the parent folder of the theme you are working on (once you have replaced all the images and edited your greeter) and copy the whole lot to /usr/share/gdm/themes.
You can then simply select the new theme in "Administration > Login Window > Local" and just go to "Logout > switch User" from the menu and then exit once you see what it looks like. Just be aware that there is an extra icon called quit when you go to switch user so try to take that into account. You can also do this with xnest (see below in the screenshot section)
Now just open the xml file in /usr/share/gdm/themes/newgdm with "gksu gedit" and start hacking until it is all sorted how you like it.

What I do is adjust the entire sections (the defined rectangles) so they are where I want them to be and then make fine adjustments with the location of the individual elements once the rectangle is in the correct place. You can change the alpha (transparency) while doing this so you can see the actual rectangle easily and then change it to the desired value once you have it in position.

Screenshot
The screenshot can be taken a few ways but xnest is probably the best method. First you have to install xnest -
sudo apt install xnest
Now just open a terminal and enter:
gdmflexiserver --xnest

The "gdmflexiserver --xnest" item is actually in the system tools menu (which will appear in "administration" in mintMenu) as "New Login In a Window" but it is unchecked so you need to go into the menu editor and turn it on.

Hit the "print scr" key on your keyboard and take the screeny. Edit it with gimp and stick it the theme folder.

Now all you need to do is archive the new theme you have created (including the parent folder) as a tar.gz and bada bing bada boom - all done!

Enjoy.
Image
"A bachelor is a selfish, undeserving guy who has cheated some woman out of a divorce." - Don Quinn
User avatar
cathbard
Level 3
Level 3
 
Posts: 148
Joined: Thu Apr 17, 2008 4:50 pm
Location: Australia

Re: How to make GNOME Icon Theme

Postby kanishka on Tue Jul 29, 2008 7:45 am

Wow that's so interesting! These HowTOs should go in a wiki or something
User avatar
kanishka
Level 5
Level 5
 
Posts: 705
Joined: Sat Feb 10, 2007 10:59 am

Re: How to make GNOME Icon Theme

Postby akaNed on Tue Jul 29, 2008 11:46 am

kanishka wrote:Wow that's so interesting! These HowTOs should go in a wiki or something


I have to agree :!: Thanks for the wonderful info :D :D :D

Michael
User avatar
akaNed
Level 3
Level 3
 
Posts: 188
Joined: Tue Aug 21, 2007 3:27 am
Location: Landrum, SC

Re: How to make GNOME Icon Theme

Postby cathbard on Tue Jul 29, 2008 2:03 pm

Thanks, I'm glad you found this interesting but it's a liitle bit scant to be an actual wiki. They are more hacker's hints than wiki's. Maybe if I get a chance to write something more comprehensive I'll create a wiki or a proper howto. Problem is that I'm not a coder, I am a hacker. I don't know xml, I just know how to hack it. :wink:
Image
"A bachelor is a selfish, undeserving guy who has cheated some woman out of a divorce." - Don Quinn
User avatar
cathbard
Level 3
Level 3
 
Posts: 148
Joined: Thu Apr 17, 2008 4:50 pm
Location: Australia

Re: How to make GNOME Icon Theme

Postby Zwopper on Mon Aug 04, 2008 10:57 am

...about screenshots...
I recently discovered...
Code: Select all
gdmthemetester console /PATH_TO_UNPACKED_THEME/

Works great! 8)
Then just hit "PrtScn" - and there you go!
Image
My artwork at deviantART - Last FM - My Tweet - My Blog
Nulla dies sine GIMP!
ASUS Eee PC 1005 HA
User avatar
Zwopper
Level 9
Level 9
 
Posts: 2805
Joined: Fri Nov 30, 2007 5:20 pm
Location: On the countryside in the southeast of Sweden

Re: How to make GNOME Icon Theme

Postby cathbard on Wed Aug 06, 2008 4:21 pm

Nice find there zwopper.
Image
"A bachelor is a selfish, undeserving guy who has cheated some woman out of a divorce." - Don Quinn
User avatar
cathbard
Level 3
Level 3
 
Posts: 148
Joined: Thu Apr 17, 2008 4:50 pm
Location: Australia

Re: How to make GNOME Icon Theme

Postby Zwopper on Wed Aug 06, 2008 6:09 pm

cathbard wrote:Nice find there zwopper.

Well you got me started! :wink:
It's all about choices!
Image
My artwork at deviantART - Last FM - My Tweet - My Blog
Nulla dies sine GIMP!
ASUS Eee PC 1005 HA
User avatar
Zwopper
Level 9
Level 9
 
Posts: 2805
Joined: Fri Nov 30, 2007 5:20 pm
Location: On the countryside in the southeast of Sweden

Re: How to make GNOME Icon Theme

Postby dionizioaf on Wed Feb 25, 2009 7:01 pm

Hello Everybody,
i send a e-mail to Cathbard, but i dont know if he would be able to help me, so i'm post here too

I went to /usr/share/icons, copy a existing folder(Crux) and go to every "place" folder in every sizes, and change de folder.png to another png file with the same size.

When i go to System > Preferences > Themes
Click in Customize > Icons and choose a folder that i called Frappuccino, but the icons just change to the ones that i copied the folder (Crux).

So i came back here and saw that you say to copy the files to ~/.icons, so i did that but happen just the same.

I have to delivery this Linux from Scratch to my son's boss delivery at school, and i dont know what else to do, can you help me?


Thanks for any help
dionizioaf
Level 1
Level 1
 
Posts: 1
Joined: Sun Feb 15, 2009 6:03 pm

Linux Mint is funded by ads and donations.
 

Return to Other artwork

Who is online

Users browsing this forum: No registered users and 1 guest