bvc Posted November 10, 2002 Share Posted November 10, 2002 NOTE: this is outdated info is and not needed ML9.1 and up This works for me with Fluxbox, and Gnome2 with GTK+1.2 and GTK+2.0, but should also apply to Blackbox, maybe others, and for KDE3.0 concerning just GTK+1.2 and 2.0 themes for Gnome apps, the next post in the thread is for you. -I use LM9.0 and Fluxbox. I mainly do this, to quickly change between themes when putting together my desktop, and once I've decided on a gtk+2.0 theme, I'm done. No need to edit another file. But you can aways just edit /etc/gtk-2.0/gtkrc for a gtk+2.0 theme to start, at least with fluxbox. 1. My first goal was to get the gtk+2.0 themes to load what I chose in the gnome-theme-properties, and not with what's in /etc/gtk-2.0/gtkrc. I use startx,so I put (sleep 3; gnome-theme-properties) & in ~/.xinitrc. If you don't start a lot of programs, or don't care about the load on X, you can just put gnome-theme-properties & Yes, this means the gnome-theme-properties window will open at startup, so just click close and be on your merry way. I didn't say this was pretty, and it's easier and faster than having to edit a couple of files by hand, if you change themes a lot like I do. Just put [exec] (Themes) {gnome-theme-properties} in your flux menu, if it's not there already, to change gtk-2.0 themes. Then open gconf-editor and go to /desktop/gnome/background an uncheck "draw background". The idea is to get gnome-theme-properties to load the gtk-2.0 theme and not other things, so if you have any other issuses (I didn't)gconf-editor is the place to look to disable something from gnome. Like, nautilus drawing the desktop. Or, don't use gnome-theme-properties, and edit /etc/gtk-2.0/gtkrc :) 2. This part should come in handy for everyone, like those of you (me included)that hate the number of available themes for gtk-2.0 and have desired to go back to gnome-1.4 with gtk-1.2 only. Many of you may already know this, and if you do, I ask you...WHY DIDN'T YOU TELL US!!! when you saw post about this? Look in /usr/share/themes at a theme for gtk-2.0, and you'll find most of them have a gtk-2.0 and a gtk folder. That's no secret, but have you looked and compared the gtkrc's in them? There's not a lot of difference. So, for the gtk-2.0 themes that have a gtk-2.0 only folder, copy it to the same theme dir, naming the folder gtk. If it is a gtk-1.2 theme and only has a a gtk folder, copy, renaming to gtk-2.0. Or, create a symlink called gtk to point to gtk-2.0/gtkrc. I downloaded and installed a theme that did this and it works, and saves place. Basically, making sure that every theme has 2 folders. One gtk and one gtk-2.0. About 70% of the gtk-1.2 themes are working on gtk-2.0 apps without flaws that the eye can see, and vice versa for gtk-2.0 to gtk-1.2. About 25% only had a weird/funky rt click menu in rox and didn't change an apps background, or something minimal, but you still get the overall color scheme/ theme. The other 5% did nothing. I can't tell that anything is wrong with most of them, though I'm sure there is. Hope this makes some gnome2 users, or gtk app users a little happier! YOU HAVE THEMES NOW :!: :P Link to comment Share on other sites More sharing options...
bvc Posted November 11, 2002 Author Share Posted November 11, 2002 First, I found this http://www.mandrakeforum.com/print.php?sid=2484, but I aggree with Deno, it's a lot of unneeded work. KDE uses gtk2 and 1.2. -It sets gtk2 apps from /etc/gtk-2.0/gtkrc. -It sets gtk1.2 apps from ~/.gtkrc-kde, which says> if you don't want kde to change your gtk settings, go to Control Center>Look and Feel>Style, and uncheck "apply fonts and colors to nonkde apps". I don't know about you but, I didn't have that. I did find a "apply colors to nonkde apps" in Look and Feel>Colors, and unchecked it but it had no effect. So, I deleted ~/.gtkrc-kde and kde used the ~/.gtkrc for gtk1.2 apps (like it should), so delete it. Don't worry it gets rewritten at every session. So, find a X script like xsession and copy it, renaming it. I renamed mine rmgtkrckde.sh. Now edit it (I used vim) vim rmgtkrckde.sh remove everything, and add (sleep 25; rm -f ~/.gtkrc-kde) so it looks like #!/bin/sh(sleep 25; rm -f ~/.gtkrc-kde) The 25 could be played with, I was only allowing enough time for kde to write the new .gtkrc-kde, as it does for every session. Now, put rmgtkrckde.sh in ~/.kde/Autostart and your done! Say you want Bluecurve for gtk2 & 1.2 apps. /etc/gtk-2.0/gtkrc should say gtk-theme-name = "Bluecurve" and ~/.gtkrc should say include "/usr/share/themes/Bluecurve/gtk/gtkrc" Link to comment Share on other sites More sharing options...
bvc Posted November 17, 2002 Author Share Posted November 17, 2002 Some gtk+1.2 themes, when copied as gtk+2.0 themes, display funny looking menus with strange colors and/or arrows trying to show. To fix this open the /usr/share/themes/nameoftheme/gtk-2.0/ folder that you copied from the /usr/share/themes/nameoftheme/gtk and open the gtkrc file Scroll down to style "menuitem" and # out the function line like this style "menuitem" { engine "pixmap" { image { #function = ARROW recolorable = TRUE state = NORMAL file = "arrow_left.png" stretch = FALSE arrow_direction = LEFT } image { #function = ARROW recolorable = TRUE state = PRELIGHT file = "arrow_left.png" stretch = FALSE arrow_direction = LEFT } image { #function = ARROW recolorable = TRUE state = NORMAL file = "arrow_sub.png" stretch = FALSE arrow_direction = RIGHT } image { #function = ARROW recolorable = TRUE state = PRELIGHT file = "arrow_sub.png" stretch = FALSE arrow_direction = RIGHT } image { #function = ARROW recolorable = TRUE shadow = IN file = "arrow_sub.png" stretch = FALSE arrow_direction = RIGHT } image { function = BOX recolorable = TRUE state = PRELIGHT file = "yellow.png" border = { 7, 7, 7, 7 } stretch = TRUE } image { function = BOX recolorable = TRUE state = INSENSITIVE file = "red.png" border = { 7, 7, 7, 7 } stretch = TRUE } image { function = HLINE recolorable = TRUE file = "hline.png" border = { 0, 0, 1, 1 } stretch = TRUE } } } class "GtkMenuItem" style "menuitem" So far this general method has fix the menus of 5 of my gtk+2.0 themes that where originally gtk+1.2 themes. Link to comment Share on other sites More sharing options...
bvc Posted November 22, 2002 Author Share Posted November 22, 2002 This enables gtk2 apps to use the artwiz-fonts for fluxbox. From here http://fluxbox.sourceforge.net/docs/en/art...rtwiz-fonts.php I did BugsThe artwiz-fonts sometimes conflict with your locale settings. To get them to work you may have to put the following at the beginning of your .xinitrc: export LC=C export LC_ALL=C Gedit and rox still aren't changing, but so far many more gtk2 apps are using artwiz-fonts. I have font = "snap" in the /user/share/themes/themename/gtkrc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now