shin
December 22nd, 2005, 04:30 PM
I haven't really found any good howto about gtk1.2 theme switching so here it is.
0. What for?
Gtk1.2 is still used by some old apps like xmms, gmplayer and stuff. Changing gtk2 (or qt) theme doesn't affect them. Plus there is no font antialias.
While font aliasing can't be turned on in these in any known for me way, you can still change gtk1.x theme and make them look not so ugly.
Still not convinced? Run gmplayer or xmms. And then compare its look with my attached screenshot.
1. Let's do it - getting theme
Firstly, find some nice gtk1 theme. In fact - that's the hard part.
Check:
http://gnome-look.org/index.php?xsortmode=high&page=0
I tested (and I recommend) either:
Plastig (from screenshot)
http://gnome-look.org/content/show.php?content=9724
or Geramik
http://gnome-look.org/content/show.php?content=3952
but feel free to use other theme.
Download it, unpack, move whole dir to /usr/share/themes/
E.g. for Plastig:
run terminal (konsole or anything..)
assuming you're in your home directory (prompt like user@server:~$)
wget http://gnome-look.org/content/download.php?content=9724&id=1
tar jxvf 9724-Plastig.tar.bz2
sudo mv Plastig /usr/share/themes/
for Geramik:
wget http://gnome-look.org/content/download.php?content=3952&id=1
tar zxvf 3952-Geramik-0.27.tar.gz
cd Geramik-0.27
./configure
make
if there was somekind of an error in using make:
apt-get install make
and finally
make install
Geramik is installed different way than Plastig but the results are the same - dir with theme is being created in /usr/share/themes/.
2. Make it work
So we got some themes. To enable them you need one more thing - libqtpixmap. To install it:
sudo apt-get install gtk-engines-qtpixmap
One can also find useful gtk-theme-switch:
sudo apt-get install gtk-theme-switch
It's a tool that was SUPPOSE to switch gtk1.x theme. And in fact it generates some good settings but in .gtkrc file, which is ignored by gtk1.x apps. Still you can use it to generate your own font settings or test new styles.
In my opinion, it's not that useful.
Back to work.
echo "include \"$HOME/.gtkrc.mine\"" > ~/.gtkrc-1.2-gnome2
gedit .gtkrc.mine
and there paste something like:
include "/usr/share/themes/Plastig/gtk/gtkrc"
style "default-text" {
fontset = "-adobe-helvetica-medium-o-normal--10-100-75-75-p-57-iso10646-1,\
-*-r-*-iso10646-1,*"
}
class "GtkWidget" style "default-text"
first line is for our gtk theme, so for Geramik (or ThinGeramik) change:
include "/usr/share/themes/Plastig/gtk/gtkrc"
to
include "/usr/share/themes/Geramik/gtk/gtkrc"
or
include "/usr/share/themes/ThinGeramik/gtk/gtkrc"
I also used some font settings to make it a little nicer.
That's all.
3. Oh boy it looks so pretty..
No it doesn't. Don't be deceived. Gtk1 will never look as good as gtk2. Non-antialiased fonts still look ugly. If you're using mplayer - I recommend installing it from cvs (great howto - http://ubuntuforums.org/showthread.php?t=85190) to get it work with gtk2.
4. UPDATE - Anti aliasing fonts with GTK1.2
Thanks for this one, emersonfxbx.
It's possible to get antialiased fonts with gtk-1.2
check this site: http://gdkxft.sourceforge.net
Screenshot of nerolinux running with anti-aliased fonts (theme WindowMaker):
http://br.geocities.com/emerson_freitas/nerolinux.png
Havent tried that yet, but for those who doesnt like compiling anything found some deb packages:
http://mirror.anl.gov/debian/pool/main/g/gdkxft/
http://debian.mirror.frontiernet.net/debian/pool/main/g/gdkxft/
http://altruistic.lbl.gov/mirrors/debian/pool/main/g/gdkxft/
there are all the same mirrors.
To be honest - havent tried that yet, but to use it on i386 architecture all you need to do is download for example:
http://debian.mirror.frontiernet.net/debian/pool/main/g/gdkxft/libgdkxft0_1.5-4_i386.deb
install it by
sudo dpkg -i libgdkxft0_1.5-4_i386.deb
and that should do it.
Oh, these .debs are specifically for Debian, but stay calm, you can use it in Ubuntu, they will work.
If you're using GNOME, you may also want to download capplet gdkxft-capplet_1.5-4_i386.deb
This capplet allows you to edit gdkxft configuration file from within GNOME control-center.
Handy, isnt it?
If anything wont work, you may try emersonfxbx instructions for using it.
After install, you must edit the file /etc/gdkxft.conf and remove the comment on the first line.
To run a GTK 1.2 application with anti-aliased fonts you could use:
sh -c "LD_PRELOAD=/usr/lib/libgdkxft.so LANG=C application"
5. Credits
salvadhor from forum.ubuntu.pl (for the main idea but his howto was far from complete)
guys from this topic http://ubuntuforums.org/showthread.php?t=26354
especially felix.rommel whose font settings I used here
emersonfxbx for info about gdkxft
0. What for?
Gtk1.2 is still used by some old apps like xmms, gmplayer and stuff. Changing gtk2 (or qt) theme doesn't affect them. Plus there is no font antialias.
While font aliasing can't be turned on in these in any known for me way, you can still change gtk1.x theme and make them look not so ugly.
Still not convinced? Run gmplayer or xmms. And then compare its look with my attached screenshot.
1. Let's do it - getting theme
Firstly, find some nice gtk1 theme. In fact - that's the hard part.
Check:
http://gnome-look.org/index.php?xsortmode=high&page=0
I tested (and I recommend) either:
Plastig (from screenshot)
http://gnome-look.org/content/show.php?content=9724
or Geramik
http://gnome-look.org/content/show.php?content=3952
but feel free to use other theme.
Download it, unpack, move whole dir to /usr/share/themes/
E.g. for Plastig:
run terminal (konsole or anything..)
assuming you're in your home directory (prompt like user@server:~$)
wget http://gnome-look.org/content/download.php?content=9724&id=1
tar jxvf 9724-Plastig.tar.bz2
sudo mv Plastig /usr/share/themes/
for Geramik:
wget http://gnome-look.org/content/download.php?content=3952&id=1
tar zxvf 3952-Geramik-0.27.tar.gz
cd Geramik-0.27
./configure
make
if there was somekind of an error in using make:
apt-get install make
and finally
make install
Geramik is installed different way than Plastig but the results are the same - dir with theme is being created in /usr/share/themes/.
2. Make it work
So we got some themes. To enable them you need one more thing - libqtpixmap. To install it:
sudo apt-get install gtk-engines-qtpixmap
One can also find useful gtk-theme-switch:
sudo apt-get install gtk-theme-switch
It's a tool that was SUPPOSE to switch gtk1.x theme. And in fact it generates some good settings but in .gtkrc file, which is ignored by gtk1.x apps. Still you can use it to generate your own font settings or test new styles.
In my opinion, it's not that useful.
Back to work.
echo "include \"$HOME/.gtkrc.mine\"" > ~/.gtkrc-1.2-gnome2
gedit .gtkrc.mine
and there paste something like:
include "/usr/share/themes/Plastig/gtk/gtkrc"
style "default-text" {
fontset = "-adobe-helvetica-medium-o-normal--10-100-75-75-p-57-iso10646-1,\
-*-r-*-iso10646-1,*"
}
class "GtkWidget" style "default-text"
first line is for our gtk theme, so for Geramik (or ThinGeramik) change:
include "/usr/share/themes/Plastig/gtk/gtkrc"
to
include "/usr/share/themes/Geramik/gtk/gtkrc"
or
include "/usr/share/themes/ThinGeramik/gtk/gtkrc"
I also used some font settings to make it a little nicer.
That's all.
3. Oh boy it looks so pretty..
No it doesn't. Don't be deceived. Gtk1 will never look as good as gtk2. Non-antialiased fonts still look ugly. If you're using mplayer - I recommend installing it from cvs (great howto - http://ubuntuforums.org/showthread.php?t=85190) to get it work with gtk2.
4. UPDATE - Anti aliasing fonts with GTK1.2
Thanks for this one, emersonfxbx.
It's possible to get antialiased fonts with gtk-1.2
check this site: http://gdkxft.sourceforge.net
Screenshot of nerolinux running with anti-aliased fonts (theme WindowMaker):
http://br.geocities.com/emerson_freitas/nerolinux.png
Havent tried that yet, but for those who doesnt like compiling anything found some deb packages:
http://mirror.anl.gov/debian/pool/main/g/gdkxft/
http://debian.mirror.frontiernet.net/debian/pool/main/g/gdkxft/
http://altruistic.lbl.gov/mirrors/debian/pool/main/g/gdkxft/
there are all the same mirrors.
To be honest - havent tried that yet, but to use it on i386 architecture all you need to do is download for example:
http://debian.mirror.frontiernet.net/debian/pool/main/g/gdkxft/libgdkxft0_1.5-4_i386.deb
install it by
sudo dpkg -i libgdkxft0_1.5-4_i386.deb
and that should do it.
Oh, these .debs are specifically for Debian, but stay calm, you can use it in Ubuntu, they will work.
If you're using GNOME, you may also want to download capplet gdkxft-capplet_1.5-4_i386.deb
This capplet allows you to edit gdkxft configuration file from within GNOME control-center.
Handy, isnt it?
If anything wont work, you may try emersonfxbx instructions for using it.
After install, you must edit the file /etc/gdkxft.conf and remove the comment on the first line.
To run a GTK 1.2 application with anti-aliased fonts you could use:
sh -c "LD_PRELOAD=/usr/lib/libgdkxft.so LANG=C application"
5. Credits
salvadhor from forum.ubuntu.pl (for the main idea but his howto was far from complete)
guys from this topic http://ubuntuforums.org/showthread.php?t=26354
especially felix.rommel whose font settings I used here
emersonfxbx for info about gdkxft