Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] (solved) how 2 change gtk-2 fonts (gtk-3 solved). There must be a knot somewhere  (Read 11246 times)

Offline michaa7

  • User
  • Posts: 2.302
This is an unsolved problem which I couldn't solve for *years* now. But lately I gave it a try and did solve the gtk-3 part. gtk-2 still unsolvable.

I am a fluxboxuser, but I install packages across whichever DE.

That's how it looks like:
fluxbox decoration fro the  fluxbox configuration.
dolphin (and KDE) configured using digikam, the most comprehensive settings manger for KDE
thunar (and all other gtk2 applications like geany, gksu, gimp. gparted): no clue
blusfish, not here on the image, useses gtk-3. I could change whatever using a CCS file ~/.config/gtk-3.0/gtk.css
https://developer.gnome.org/gtk3/stable/GtkCssProvider.html

For gtk-2 I tried everything:
http://awesome.naquadah.org/wiki/Customizing_GTK_Apps

The strange thing is: Using lxappearance I can change all fonts within the window of this application  (lxappearance), and it looks like I wannted my gtk-2 application to look like. BUT, it doesn't change on bit on other applications AND it does not store these settings for itself (although I hit the respective button. It's gone after closing lxappearance and reopeningn it).

I installed gnome-settings-manager (which provides absolutly no font config, which remids me why I desperatly hate gnome). I could change *some* fonts in submenus  :o only using gnome-color-chooser. I didn't change the fonts in the menue bar.
« Last Edit: 2014/09/22, 23:10:05 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
try lxappearance :)
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline michaa7

  • User
  • Posts: 2.302
You didn't read.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
tja - leider kurz daneben - und ich kann lesen und schreiben. Dass dieses Problem recht trivial ist, hast Du ja schon gemerkt.

Lösung:
* xorg iso nehmen und booten
* netzwerk anschalten und apt-get update; apt-get install lxappearance git
* in ~ git init und user und mail festlegen
* git add . ; git commit
* jetzt lxappearance starten und irgendwas ändern. Ich hab als Test crux gewählt
* speichern


$ git status
... blabla ...
    .config/gtk-3.0/
    .gtkrc-2.0
... blabla ...


wo ist jetzt das Problem, in der .gtkrc-2.0 unter gtk-font-name den eigenen Font einzutragen, der als Standard benutzt wird?

Fonts sind normalerweise Sachen, die der WM verwaltet - so zum Beispiel bei Openbox mit obconf. Für openbox gibt es dann als Brücke zu lxappearance das Paket lxappearance-obconf. Und das generiert für openbox halt die GTK-Settings dynamisch und viel mehr granuliert. Die oben erzeugten Dateien sind dann nur noch ein guter Fallback.

Fluxbox als sehr beliebtes und aktiv entwickeltes Projekt bietet solche Tools meines Wissens nicht, in der Begleitliteratur werden aber oft nano und vi als Konfigurationsoberfläche genannt.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline michaa7

  • User
  • Posts: 2.302
...und ich kann lesen ...
Meine zweifel daran sind durch dieses posting erheblich gewachsen

Dass dieses Problem recht trivial ist...
Nur für leute die nach dem überfliegen das parsen vergessen.


wo ist jetzt das Problem, in der .gtkrc-2.0 unter gtk-font-name den eigenen Font einzutragen, der als Standard benutzt wird?

Leider ist auch der einzig sachliche hinweis in deinem sonstigen geschwafel so sinnlos wie ein kropf, weil das längst versucht wurde. Das problem besteht ja darin dass genau das nicht geht.

... in der Begleitliteratur werden aber oft nano und vi als Konfigurationsoberfläche genannt.
ist das jetzt wirklich so niveaulos wie es ausschaut? Ich meine wenn *du* ein problem nicht lösen kannst, dann stufe doch bitte den fragesteller nicht auf anfängerniveau herunter.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
michaa7: Mach brav Deine Hausaufgaben, vielleicht nutzt es ja doch irgendwann was.

Das mit der Anfängernivea hast Du höchstselbst erledigt. So kreativ muss ich nicht sein. Falls ich mich geirrt haben sollte und Du tatsächlich so was wie Linux-Grundkenntnisse besitzt - sorry.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline michaa7

  • User
  • Posts: 2.302
Du bist einfach unverschämt!
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Du bist einfach unverschämt!
michaa7 bitte keine persönlichen Angriffe, sondern sachlich bleiben. Danke!

Offline michaa7

  • User
  • Posts: 2.302
was ist daran ein persönlicher angriff?

Für mich ist überhaupt nicht nachvollziehbar was melmaker mit seinem wolkigem blah überhaupt zur lösung beitragen wollte? Ich bin derjenige der auf anfängerniveau heruntergestutzt werden soll weil er keine lösung hat. Bei ihm wäre deine bemerkung angebrachter.


EDIT:
Leute, ich habe ein altes font darstellungsproblem unter fluxbox mit programmen auf basis unterschiedlicher toolkits. Lösen konnte ich das für fluxbox-deco-fonts, KDE-deco-fonts, gtk-3-deco-fonts. gtk-2-deco-fonts ist nach wie vor ein problem.

Ich kann im von anderen hier beteiligten geschriebenen bislang keinen lösungsansatz erkennen, der bei mir nicht schon in einer sackgasse geändet hätte.

In soweit bin ich nach wie vor an tatsächlicher hilfe interessiert soweit jemand etwas neues beitragen kann.

Nochmals:
lxappearance startet selbst mit dem layout, wie ich es in anderen gtk-2 applikationen wie gparted oder geany zu gesicht bekomme. Es ist wohl das Light-industry Theam mit dem Tango Icon-theme.
Die schrift ist mit "Sans 10" angegeben.

Es ist kein problem in lxapearance die schrift auf die gewünschte größe zu ändern, z.b.  "Sans 15". Das lxapearance fenster ändert sich nach drücken des "Anwenden"-knopfes entsprechend. Es schaut nun so aus wir ich es haben möchte.

Aber nach beenden von lxapearance und wiederöffnen ist wieder alles beim alten, "Sans 10" und nicht "Sans 15". Es speichtert die änderungen nicht.

Ein manuelles ändern der entsprechenden konfigurationsdatei .gtkrc-2.0 ändert auch nichts. Und auch das erstellen der eigentlich zum manuellen ändern gedachten datei .gtkrc-2.0.mine mit entsprechender fonts zeile ändert nichts.

Irgendetwas steht im weg und ich weiß nicht was und wo.



Back to EN:

The problem are the fonts of applications based on different toolkits with Fluxbox (I primarily refer to the fonts of the menue bar of each application). I could configure the fonts for the fluxbox decoration, for KDE and gtk-3 applications,  gtk-2 is the problem I can't solve for a long time now:

I start lxappearance which presents itself with exactly the same fonts as other gtk-2 applications. Accordingly to lxappearance the font is "Sans 10". If I change the font to lets say "Sans 15" and I press "apply" I get what I want as far as the lxappearance window is concerned. I close it and reopen it. All gone, it's "Sans 10" again, not "Sans 15".

Manually changing the config file .gtkrc-2.0 does nothing. And creating the actually for user settings demanded file .gtkrc-2.0.mine containing the font definition helps neither.

I see two problems here:

1) lxappearance does not write correctly or not at all to ~.gtkrc-2.0, at least when running outside a lxde session.

2) gtk-2 applications do honor neither ~.gtkrc-2.0 nor ~.gtkrc-2.0.mine, at least when running outside a lxde session.

I am gratefull to everybody who could A) confirm the problem or B) give usefull advice how to solve this.
« Last Edit: 2014/09/21, 22:26:28 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Hello michaa7,

thanks for returning to the topic of your question.
I highly appreciate your continous effort to spread the usage of english language in the siduction forum.

greetings
musca
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline michaa7

  • User
  • Posts: 2.302
Hello michaa7,

thanks for returning to the topic of your question.
I highly appreciate your continous effort to spread the usage of english language in the siduction forum.

greetings
musca

Thanks. It would be great when all mods could stick to the conventions, too, which includes not posting in the wrong language. Talking BS is free, though.

I appreciate your support.

« Last Edit: 2014/09/22, 00:37:31 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline tuxic

  • User
  • Posts: 117
Just keep it cool! We all have to be very careful with our answers and responses.  We're supposed to be the community based OS.  Remember what happened to Ap**sid...
"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline der_bud

  • User
  • Posts: 1.072
  • member
I've seen that you use Fluxbox and not LXDE/Openbox, but perhaps my observations in the latter could help as an example or reference. I had a similar problem with lxappearance forgetting it's settings last year. Sadly I don't remember the exact steps to solve that, but now it works: every time I change settings with lxappearance, the file that gets changed and keeps theme/icon/fonts is
Code: [Select]
~/.config/openbox/lxde-rc.xml and there is another file in that directory
Code: [Select]
~/.config/openbox/rc.xml
Does Fluxbox perhaps have similar files? I think I had to copy them from their original location
Code: [Select]
/etc/xdg/openbox/rc.xml
/etc/xdg/openbox/LXDE/rc.xml

and changed permission to my user before I got it working.
FWIW the packages lxappearance and lxappearance-openbox are installed. (One odd thing is I don't have any .gtkrc-2.0 in my homedir, but I think lxappearance creates that when run without LXDE and uses above dirs when run with LXDE).

Someone having similar problem, without a solution yet, but maybe worth watching the thread: http://crunchbang.org/forums/viewtopic.php?pid=392782
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline michaa7

  • User
  • Posts: 2.302
yes, this sounds very much to be a similar if not the same problem.

I yesterday tested a bit with openbox, which only revealed that geany's font in the menue bar (gtk2) was looking slightly different as it looks in fluxbox. Strangely, this was limited to geany, other gtk2-apps weren't affected.
I also wanted to try cairo-dock (Gnome) but it didn't start, no clue why, but I don't care.

My next step will be to test with a new user with a new /home. But not today. This gkt2 problem is rather old and as fruitless as all my previous attemps have been I don't give it priority number one. (BTW, I still owe you an answer regarding our private deal. It will need some more time).

What I really need to find out is how to trace which font-path is actually used by a single gtk2 application while opening it it in a VT (as opposed to what whichever manual tells us is supposed to be used; it seems there can be to many players). I wonder whether there is *such a verbose* means.

Thanks.
« Last Edit: 2014/09/22, 15:55:19 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
https://mediacru.sh/T0GgP72QUp3L.jpg

michaa7 - only to understand the problem - we talking about which fonts and which settings?  You should differ exactly between the application part and the decoration part. if you want to change the decorations font, this is done directly in the fluxbox theming.

For the apps itself: this is done via used toolkit - in this case i hereby recomment strongly gtk+ as style, because it is the only reasonable Setting that works for gtk2, gtk3, qt4 and qt5. Some other thing: It is ok to use the gtk+ Style for qt applications, the other way (qtcurves gtk) is buggy as hell and damn slow. if you consider to use gtk+ as style it is recommend not to start the app with a command like otter-browser -style gtk+, set a environment variable for it:  QT_STYLE_OVERRIDE

http://unix.stackexchange.com/questions/127666/qtconfig-tool-for-qt-5
https://wiki.archlinux.org/index.php/qt
https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)