Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Making GTK applications look good

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
sempsteen
n00b
n00b
Posts: 13
Joined: Tue Jul 18, 2006 10:16 pm

Making GTK applications look good

  • Quote

Post by sempsteen » Mon Oct 13, 2008 6:26 pm

Hi everyone,
Because I'm spending lots of time by using my computer appearance is very important for me. I'm a KDE user but not every application is built on KDE. My GTK based applications were looking bad but finally today I managed to fix it. I'm going to write here so that maybe it can help others like me. It is very easy.

First emerge these two packages:
  • x11-themes/gtk-engines-qtcurve
    x11-themes/qtcurve-qt4
Then create a file named ".gtkrc-2.0" in your home directory put this line in it:
  • include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"
That's all!

References:
  • Gentoo KDE 4.1 Guide - Hints
    TIP Change Appearance of GTK Applications
    GTK Engines and Themes * seems like a good read but i haven't read yet
Top
timeBandit
Bodhisattva
Bodhisattva
User avatar
Posts: 2719
Joined: Fri Dec 31, 2004 1:54 am
Location: here, there or in transit

  • Quote

Post by timeBandit » Thu Oct 16, 2008 3:24 am

Moved from Desktop Environments to Documentation, Tips & Tricks.
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Sun Oct 19, 2008 5:01 am

Thanks sempsteen, nice howto.

I like to also set the font so my .gtkrc-2.0 looks like this

Code: Select all

$ cat .gtkrc-2.0
include "/usr/share/themes/Qt/gtk-2.0/gtkrc"

style "user-font"
{
    font_name="Dejavu Sans 10"
}
widget_class "*" style "user-font"

gtk-theme-name="Qt"
gtk-font-name="Dejavu Sans 10"
Top
bblount
Tux's lil' helper
Tux's lil' helper
Posts: 80
Joined: Mon Nov 08, 2004 2:21 pm

  • Quote

Post by bblount » Tue Oct 21, 2008 3:30 am

Could you post some screenshots?
Top
sempsteen
n00b
n00b
Posts: 13
Joined: Tue Jul 18, 2006 10:16 pm

  • Quote

Post by sempsteen » Tue Oct 21, 2008 9:37 pm

Could you post some screenshots?
Sorry for the late reply. Here are the screenshots:
  • before
  • after
Top
sempsteen
n00b
n00b
Posts: 13
Joined: Tue Jul 18, 2006 10:16 pm

  • Quote

Post by sempsteen » Tue Oct 21, 2008 9:46 pm

notHerbert wrote:Thanks sempsteen, nice howto.

I like to also set the font so my .gtkrc-2.0 looks like this

Code: Select all

$ cat .gtkrc-2.0
include "/usr/share/themes/Qt/gtk-2.0/gtkrc"

style "user-font"
{
    font_name="Dejavu Sans 10"
}
widget_class "*" style "user-font"

gtk-theme-name="Qt"
gtk-font-name="Dejavu Sans 10"
Thanks for the info notHerbert.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Tue Oct 21, 2008 11:21 pm

Sure, no problem. :P

Here is another screenshot that shows the Gtk-2.0-Qt theme.
Top
timeBandit
Bodhisattva
Bodhisattva
User avatar
Posts: 2719
Joined: Fri Dec 31, 2004 1:54 am
Location: here, there or in transit

  • Quote

Post by timeBandit » Wed Oct 22, 2008 4:55 am

notHerbert wrote:Here is another screenshot ....
Nice cow. :)
Looks related to Larry.
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Top
bblount
Tux's lil' helper
Tux's lil' helper
Posts: 80
Joined: Mon Nov 08, 2004 2:21 pm

  • Quote

Post by bblount » Wed Oct 22, 2008 7:37 am

Thanks for the screenshots, great tip.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Thu Oct 23, 2008 1:12 am

In fact if you emerge gtk-engines-qt, any of the Gtk themes can be set via GUI in the menu of KDE and Gnome. :P
Top
Sotol
Apprentice
Apprentice
User avatar
Posts: 192
Joined: Fri Apr 09, 2004 10:04 pm

  • Quote

Post by Sotol » Thu Oct 23, 2008 6:55 am

Did you grab gtk-engines-qt from an overlay? The one in portage only seems to support kde 3.5.
Top
shickapooka800
Guru
Guru
User avatar
Posts: 304
Joined: Sun Dec 05, 2004 11:13 pm
Location: no

  • Quote

Post by shickapooka800 » Thu Oct 23, 2008 7:14 am

this strikes me as a bit opinionized. here is a meta-tip for looking good with gtk:

emerge --search engines

pick some random ones and emerge them.

emerge gtk-chtheme

run gtk-chtheme

flip through the gtk themes until you are blue in the face.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Thu Oct 23, 2008 3:00 pm

Sotol wrote:Did you grab gtk-engines-qt from an overlay? The one in portage only seems to support kde 3.5.
I'm referring to x11-themes/gtk-engines-qt from portage, which may well not function in KDE-4. I don't know. I'm waiting for KDE-4.2.2-r2. :P



shickapooka800 wrote:this strikes me as a bit opinionized. here is a meta-tip for looking good with gtk:
Well of course, choice of themes, wm, etc... can't be anything more than personal taste. :D

I think sempsteen's point was just to throw some ideas out there, good for me. :D

Thanks for your meta-tip, I'm going to try it right now. :P



Hmmmm

Code: Select all

$ gtk-chtheme

(gtk-chtheme:10525): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Segmentation fault
:cry:
Top
shickapooka800
Guru
Guru
User avatar
Posts: 304
Joined: Sun Dec 05, 2004 11:13 pm
Location: no

  • Quote

Post by shickapooka800 » Thu Oct 23, 2008 4:12 pm

what gtk-chtheme are you running and what arch?
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Thu Oct 23, 2008 5:52 pm

This is ARCH=x86 x11-themes/gtk-chtheme-0.3.1-r1

I do get the GUI but it segfaults when I click on a theme.

I was thinking just the other day that it would be nice to have a Gtk theme changer, but I was unaware of gtk-chtheme. I tried re-emerging gtk-engines. :cry:
Top
shickapooka800
Guru
Guru
User avatar
Posts: 304
Joined: Sun Dec 05, 2004 11:13 pm
Location: no

  • Quote

Post by shickapooka800 » Fri Oct 24, 2008 3:18 pm

notHerbert wrote:This is ARCH=x86 x11-themes/gtk-chtheme-0.3.1-r1

I do get the GUI but it segfaults when I click on a theme.

I was thinking just the other day that it would be nice to have a Gtk theme changer, but I was unaware of gtk-chtheme. I tried re-emerging gtk-engines. :cry:
hmmm I have the same version, but am using amd64 arch. there is a gtk-chthtme-0.3.1.ebuild in the tree, maybe try that one? it is small, maybe you could compile it by hand (maybe with some debug options) and send a backtrace of the crash to the developer (or gentoo bugzilla).

edit: I assure you, this is THE gtk theme changer that people use all the time, so it should work just fine. maybe re-merge the apps in the DEPEND and RDEPEND list in the gtk-chthtme ebuild (looks like >=gtk+-2 and pkgconfig...... and its not pkgconfig's fault...)....
what are your USE flags that GTK+ cares about?

another idea: compile gtk+ with debug USE flag, then run gtk-chthtme in gdb and run a backtrace when it crashes. gtk-chthtme itself doesn't seem to be affected by the debug USE flag, so either adjust the ebuild and digest it, or compile gtk-chtheme by hand with ./configure --enable-debug. when it crashes in gdb, run `bt full' and either read through the output yourself, or post a bug with it.
Top
Sadako
Advocate
Advocate
User avatar
Posts: 3792
Joined: Thu Aug 05, 2004 5:50 pm
Location: sleeping in the bathtub
Contact:
Contact Sadako
Website

  • Quote

Post by Sadako » Fri Oct 24, 2008 4:51 pm

shickapooka800 wrote:this strikes me as a bit opinionized.
++

It's kinda suggesting that the only way gtk+ can look good is by emulating kde/qt, which is just inviting yet another flamewar on that issue...

I prefer gtk-chtheme too, but you can try lxappearance instead, which is actively developed (gtk-chtheme hasn't seen any updates in over 4 years...), doesn't have any gnome dependencies either and also lets you browse and set your gtk icon theme(s).
"You have to invite me in"
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Thu Nov 20, 2008 7:47 pm

timeBandit wrote:
notHerbert wrote:Here is another screenshot ....
Nice cow. :)
Looks related to Larry.
Yep, I wonder who drewed em.
Top
Post Reply

18 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic