Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: HOWTO: Gtk1.2 not so ugly

  1. #1
    Join Date
    Dec 2005
    Location
    where polar bears live - poland.
    Beans
    67
    Distro
    Kubuntu 6.10 Edgy

    Lightbulb

    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:~$)
    Code:
    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:
    Code:
    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:
    Code:
    apt-get install make
    and finally

    Code:
    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:

    Code:
    sudo apt-get install gtk-engines-qtpixmap
    One can also find useful gtk-theme-switch:

    Code:
    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.

    Code:
    echo "include \"$HOME/.gtkrc.mine\"" > ~/.gtkrc-1.2-gnome2
    gedit .gtkrc.mine
    and there paste something like:

    Code:
    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.

    Quote Originally Posted by emersonfxbx View Post
    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...main/g/gdkxft/
    http://altruistic.lbl.gov/mirrors/de...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...1.5-4_i386.deb

    install it by

    Code:
    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.
    Quote Originally Posted by emersonfxbx View Post
    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
    Attached Images Attached Images
    Last edited by shin; November 26th, 2006 at 06:27 PM. Reason: update

  2. #2
    Join Date
    Feb 2005
    Location
    EU
    Beans
    549
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Gtk1.2 not so ugly

    Very nice, thanks!

    Man, with warty it took me ages to figure out a way for doing this. A very nice guide.

  3. #3
    Join Date
    Nov 2005
    Location
    Canada
    Beans
    137
    Distro
    Kubuntu Breezy 5.10

    Re: HOWTO: Gtk1.2 not so ugly

    I followed exactly your guide and nothing change in my xmms look.
    I'm looking for long time to change this big ugly fonts in xmms preference, so far I couldn't do anything. This is a shot with both xmms and gmplayer


    PS And another thing: in ~/.gtkrc.mine if you insert that line as: /usr/share/themes/Plastig/gtk/gtkrc and open up the file gtkrc from that path you'll find out that first line is:
    pixmap_path "~/.themes/Plastig/gtk"

    but following your guide in ~/.themes/Plastig/gtk we don't have any file of this theme...
    Probably would be more indicated to install the theme in home directory than in /usr/share/theme path or copy the theme in home directory or just modify that path...anyway...none of the solutions work for my xmms look.
    Attached Images Attached Images
    Last edited by limit223; January 9th, 2006 at 10:29 PM.
    ...optimize, clarify, open, Share....knowledge.

  4. #4
    Join Date
    Sep 2005
    Location
    Denmark Copenhagen
    Beans
    35
    Distro
    Ubuntu 5.10

    Re: HOWTO: Gtk1.2 not so ugly

    thanks alot.. Not perfect but WAY better than before

  5. #5
    Join Date
    Mar 2006
    Location
    Staffordshire, England
    Beans
    2
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Gtk1.2 not so ugly

    Thanks so much shin - that looks so much better. I don't use many gtk1.2 apps anymore, but it's really annoying when you come across one looking so hideous as they do by default.

    limit223 - I might have a solution. Using the (very nice) Plastig theme, I edited /usr/share/themes/Plastig/gtk/gtkrc, changing the top line to point instead of ~/.themes/ to /usr/share/themes/Plastic/gtk/grkrc - in full. That got it working for me. If you still aren't getting the font look you want, try editing ~/.gtkrc.mine

    Here is mine, edited to use the Bitstream Vera Sans font.

    Code:
    include "/usr/share/themes/Plastig/gtk/gtkrc"
    style "default-text" {
           fontset = "-bitstream-bitstream vera sans-medium-r-*-*-12-*-*-*-*-*-iso8859-*,\
                      -bitstream-bitstream vera sans-medium-r-*-*-12-*-*-*-*-*-iso8859-*,\
                      -bitstream-bitstream vera sans-medium-r-*-*-12-*-*-*-*-*-iso8859-*,\
                      -bitstream-bitstream vera sans-medium-r-*-*-12-*-*-*-*-*-iso8859-*"
    }
    class "GtkWidget" style "default-text"
    If you want to use another font, use the xfontsel program to generate your own font strings (as suggested by Juippisi on this thread.

    Note: When I did so, it wouldn't let me change the font size in xfontsel. Just alter it yourself manally after you paste it into your .gtkrc.mine -- in my case, I used 12.

  6. #6
    Join Date
    Jan 2006
    Beans
    90

    Re: HOWTO: Gtk1.2 not so ugly

    awesome.. thanks!

  7. #7
    Join Date
    Nov 2005
    Beans
    143

    Re: HOWTO: Gtk1.2 not so ugly

    Hi,

    first, thanks for your howto!!!

    I have one question:
    How can I change the color for the mouse-over button effect? It's nearly black here.

    Thanks for helping.
    Best regards,
    Whoopie

  8. #8
    Join Date
    Apr 2005
    Beans
    1,467

    Re: HOWTO: Gtk1.2 not so ugly

    Amazing little how to it solved a magor peave with gtk that I had now it looks pretty.

    Back to work.
    Code:
    echo "include \"$HOME/.gtkrc.mine\"" > ~/.gtkrc-1.2-gnome2 gedit .gtkrc.mine
    Note: I had some problems with this because my terminal was in the directory that I untared the themes. A simple cd so the home directory " cd " solves this.

    Now to move on to another peave which is synaptic, it looks real ugy Im not shure if it is using gtk 1 or 2 but if it is using 1 how do I apply this how to to root.
    Edit: just did a sudo natilus and its ugy to so I think its a root thing.

    Anyways thanks for the great how to.
    Back to using Ubuntu

  9. #9
    Join Date
    Dec 2005
    Location
    where polar bears live - poland.
    Beans
    67
    Distro
    Kubuntu 6.10 Edgy

    Re: HOWTO: Gtk1.2 not so ugly

    Quote Originally Posted by Omnios
    Now to move on to another peave which is synaptic, it looks real ugy Im not shure if it is using gtk 1 or 2 but if it is using 1 how do I apply this how to to root.
    Edit: just did a sudo natilus and its ugy to so I think its a root thing.
    Synaptic is using gtk 2 and yeah it's root problem. Probably you downloaded some additional themes for gtk by means of gnome art downloader or you just put themes in your home directory. In that case if you run app with sudo or just root access it will use default theme. To change it - move everything that is in directory ~/.themes (as far as I remember) to /usr/share/themes (not sure about that too but if it exists, assume I remember correctly ).

    To do that:

    Code:
    mv ~/.themes/* /usr/share/themes -rf
    I hope that helps.
    perform miracles.

  10. #10
    Join Date
    Dec 2005
    Location
    where polar bears live - poland.
    Beans
    67
    Distro
    Kubuntu 6.10 Edgy

    Re: HOWTO: Gtk1.2 not so ugly

    Quote Originally Posted by Whoopie
    How can I change the color for the mouse-over button effect? It's nearly black here.
    This is probably some theme specific issue. Try using another theme for gtk.
    perform miracles.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •