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 11028 times)

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
@der_bud: Die Lösung damals war recht einfach. Ich bin einfach dem Upstream so lange auf die Nerven gegangen, bis die Probleme gefixt waren. Dann noch flugs die debian-Paketierung angepasst und schwupps funktionierte es.

Das war halt irgendwann Anfang Februar. Und seit dieser Zeit arbeiten Andriy und meinereiner immer wieder recht erfolgreich zusammen. Er programmiert, ich teste und nörgle. Das hat die Lösung vieler Fehler im Bereich appearance und panel erheblich beschleunigt.
lxappearance (0.5.5-1) unstable; urgency=low

  [ Alf Gaida ]
  * Add dbus support. (Closes: #720604)

  [ Andriy Grytsenko ]
  * Merging upstream version 0.5.4.
  * Merging upstream version 0.5.5. (Closes: #636093)
  * Adding myself to uploaders.

 -- Andriy Grytsenko <andrej@rep.kiev.ua>  Wed, 26 Feb 2014 03:19:29 +0200

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720604
« Last Edit: 2014/09/22, 18:10:18 by melmarker »
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.300
https://mediacru.sh/T0GgP72QUp3L.jpg

michaa7 - only to understand the problem - we talking about which fonts and which settings?  ...

I appreciate you now try to parse the problem correctly [1].

The answer is in my first posting where it says "This is how it looks like" with the underlying link: http://fotos.ac52.de/fonts_vergleich.png

From this foto it should be clear. All application windows obviously carry the fluxbox decoration, which I know and knew since years how to change. Fluxbox deco no problem for no whatever toolkit using program.

QT/KDE (here dolphin): fonts within application (i.e. all fonts except deco provided by fluxbox) fonts menue bar, fonts file system tree, font menue, submenues: no problem, they are as fat and big as I like it, fonts are set using digikam because it is more comprehensive than KDE system settings!!!

GTK-3 applications (so far found bluefish, gaupol, gimage-view (don't remember exact name), one or two others), no example in the above linked foto. Solved recently with the help of some guys from debianforum.de , with pointed me to using CCS file ~/.config/gtk-3.0/gtk.css . Works like a charme (although seems to be slow while opening).

gtk2 (i.e. all fonts except deco provided by fluxbox)
Look at the foto: It's thunar (partly covered by dolphin), a gtk2 application (like gparted, gksu, geany a.o.). Now compare the menue bar and the fonts of the file system tree. Compared to what dolphin and the fluxbox decoration looks like they are small and tiny (if your browser doesn't zoom the image). Accordingly to what lxappearance says and what cannot be saved after changing it it's "Sans 10". The words "Geräte" and "Orte" are a bit better only because the last days I tried whatever I got between my hands: gnome-color-chooser allows for changing some fonts, but not for the most important ones.

All this is info from the first posting, polished and extended.

I know qt-curve is considered a problem by some people including you, in the past (the farer past) I had uninstalled it but it created problems which I don't remember. I don't like to and don't want to change qt applications to gtk-X. The otter-browser thing happend for testing purpose only because allthough being a QT5 application, it doesn't honor my QT settings (which is a totaly unrelated problem caused by the fact that both, QT5 AND otter-browser are so to say *unstable* read "progressing with some glitches" and compiling the *.deb they are using ... kubuntu, different libs there and so on.... Yes, ...I am totally aware of what that means. Sidenote: I hope the progress of otter-browser will soon outshine other browsers development. I really hope you (the siduction team) at least consider to include it. Yeah, Im daydreaming ;-) ).

I reassigned a lower priority to this gtk2 problem as it requires a more profound research (at least new home, maybe qt-curve purged (and see what new problems occure). I'll follow your links and read it before I go on.

EDIT:
What really would help if someone could ponit me to a means which allowed for seening what font-path is used while open a gtk2 app in a VT. I this is possible at all.
/EDIT

Thanks




[1]
You earn all (my) merits for what you do for siduction. What you do is magnitude bigger than what I ever have done and am able to do.
I did blame you in the past when you didn't parse what I said, I did it in this partly deviated thread and I will do so it in future, if neccessary.
I say this here publicy as *I* have been the person who has been publicly blamed while (and somehow for) trying to *defend* my problem against being ridiculed.
And herewith I call this part auf the deviation *closed*. Your help is appreaciated.
« Last Edit: 2014/09/22, 19:40:39 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
only a thought - please change in ~/.gtkrc-2.0 the font to "Mono 14" or "Monotype 14", pkill all thunar instances and start thunar again. Post the picture here - or come with the screenshot to irc, its faster. This is only to see this works.

Eventually there is a solution for your problem - It doesn't need the chooser tool to edit the gtk-settings. There are some extended gtk2 ressources one can use:
https://github.com/alicee/config/blob/master/gtkrc-2.0-solarized-dark

These samples are all fugly as hell - but should work, the only thing you need to do is to identify the needed widgets or groups and format them the way you like them - not be affraid of, the most programs ues standard names. A deeper look into the internet may help too, even not directly. One note to the sample, they change only colors there - but this should work with fonts and sizes too.

Forgot one important thing - you should have a look at the settings created by the chooser tool, i would save this file as the include-file in .gtkrc.
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.300
only a thought - please change in ~/.gtkrc-2.0 the font to "Mono 14" or "Monotype 14", pkill all thunar instances and start thunar again.

This test didn't work in the past. To please you, I did as described above, to no avail, although I changed not only ~/.gtkrc-2.0 (which shouldn't be touched) but ~/.gtkrc-2.0.mine, too. Nada ... which is why I won't post a screenshot.

Eventually there is a solution for your problem - It doesn't need the chooser tool to edit the gtk-settings. There are some extended gtk2 ressources one can use:
https://github.com/alicee/config/blob/master/gtkrc-2.0-solarized-dark

Changing themes, isn't this a complete different building ground? Whatever, I am very sceptical with solutions outside the Debian repos (with siduction as an exception). And I was right, as you'll see below.

Forgot one important thing - you should have a look at the settings created by the chooser tool, i would save this file as the include-file in .gtkrc.

the chooser tool does this by itself, but it seems it can get lost if you open lxappearance or other tools, not really sure.


But it is solved now, (and qt-curve isn't the culprit neither):

I opened a xfce session. I went through different setting-dialogs and found something called, in german, "Erscheinungsbild" (appearance). From how it looks it seems an XFCE-tool. Like with lxappearance, it showed "Sans 10" as used font. I changed it to "Sans 15", it not only changed the fonts in its own window, but in all gtk2 applications. The new setting is saved (but *not* to gtkrc-2.0 !). The changes work in fluxbox. Hooray!

So I can this mark solved, somehow, as it solved my problem.

But there are some questions. Whats the name of the xfce application I used? I really would like to know its binary name with which to call it from CL outside a XFCE session, if possible at all.

I seems there is a bug if XFCE settings do not care how and where other DEs or setting-tools store their settings (like lxappearance). Much worse, somehow this XFCE-Erscheinungsbild/appearance-tool seems capable of somehow disable the fontpath used by gtk2 application *outside* a xfce session. And that really is a bug.

I don't know whether the following info is of any value:
Before opening the xfce session I played around with strace:
Code: [Select]
strace -o fonttest geanyand extracted "gtkrc"
cat fonttest | grep gtkrc
Quote
$ cat fonttest | grep gtkrc
lstat64("/usr/share/geany/geany.gtkrc", {st_mode=S_IFREG|0644, st_size=1442, ...}) = 0
open("/usr/share/geany/geany.gtkrc", O_RDONLY|O_LARGEFILE) = 7
access("/usr/share/geany/geany.gtkrc.de_DE", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/geany/geany.gtkrc.de", F_OK) = -1 ENOENT (No such file or directory)
lstat64("/usr/share/gtk-2.0/gtkrc", 0xbfd99100) = -1 ENOENT (No such file or directory)
access("/usr/share/gtk-2.0/gtkrc.de_DE", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/gtk-2.0/gtkrc.de", F_OK) = -1 ENOENT (No such file or directory)
lstat64("/etc/xdg/gtk-2.0/gtkrc", 0xbfd99100) = -1 ENOENT (No such file or directory)
access("/etc/xdg/gtk-2.0/gtkrc.de_DE", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/xdg/gtk-2.0/gtkrc.de", F_OK) = -1 ENOENT (No such file or directory)
lstat64("/etc/gtk-2.0/gtkrc", 0xbfd99100) = -1 ENOENT (No such file or directory)
access("/etc/gtk-2.0/gtkrc.de_DE", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/gtk-2.0/gtkrc.de", F_OK)   = -1 ENOENT (No such file or directory)
lstat64("/home/mh/.gtkrc-2.0", {st_mode=S_IFREG|0644, st_size=543, ...}) = 0
open("/home/mh/.gtkrc-2.0", O_RDONLY|O_LARGEFILE) = 7
lstat64("/home/mh/.gtkrc-2.0.mine", {st_mode=S_IFREG|0644, st_size=24, ...}) = 0
open("/home/mh/.gtkrc-2.0.mine", O_RDONLY|O_LARGEFILE) = 8
access("/home/mh/.gtkrc-2.0.mine.de_DE", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mh/.gtkrc-2.0.mine.de", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mh/.gtkrc-2.0.de_DE", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mh/.gtkrc-2.0.de", F_OK)  = -1 ENOENT (No such file or directory)
access("/home/mh/.themes/808080/gtk-2.0/gtkrc", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/808080/gtk-2.0/gtkrc", F_OK) = -1 ENOENT (No such file or directory)

I did the same after the XFCE session and did a diff between fonttest1 and fonttest2:
Quote
$ diff -y --suppress-common-lines ft1 ft2
lstat64("/usr/share/gtk-2.0/gtkrc", 0xbfd99100) = -1 ENOENT ( | lstat64("/usr/share/gtk-2.0/gtkrc", 0xbfd83c50) = -1 ENOENT (
lstat64("/etc/xdg/gtk-2.0/gtkrc", 0xbfd99100) = -1 ENOENT (No | lstat64("/etc/xdg/gtk-2.0/gtkrc", 0xbfd83c50) = -1 ENOENT (No
lstat64("/etc/gtk-2.0/gtkrc", 0xbfd99100) = -1 ENOENT (No suc | lstat64("/etc/gtk-2.0/gtkrc", 0xbfd83c50) = -1 ENOENT (No suc

Stange thing, those files do not exist, how can there be something differnet?

Anyway, melmaker, if this is info you want to share with your lxappearance contact person, please do so. But let me know, because otherwise I will file a bug report myself. Probabely I'll do it anyway against XFCE-????, have to find out.

 8)



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
hihihi - no clue - strange things going on

if all things run as they should gtk will use these files in ascending priority - so the user file should win in any case:
/usr/share  gtkrc
/etc/  gtkrc
~/.gtkrc

tested and found working in my xorg (pure fluxbox) environment - und ich wollte Dich nicht ärgern, das ist auch kein Problem in lxappearance. btw - kann es sein, dass Du irgendeine Session laufen hast, die in lxappearance eingreift? das würde genau das Verhalten erklären. Denkbar wäre auch, das ein eventuell installiertes OpenBox zuschlägt - wild geraten. Aut gut deutsch, ich hab keinen Plan, was da schiefläuft. Ich weiss nur, dass es nicht so sein soll.
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.300
...
if all things run as they should gtk will use these files in ascending priority - so the user file should win in any case:
/usr/share  gtkrc
/etc/  gtkrc
~/.gtkrc
That's what I think, too
tested and found working in my xorg (pure fluxbox) environment
What is an xorg.iso? I googeled for it, to no avail.
... ist auch kein Problem in lxappearance. btw - kann es sein, dass Du irgendeine Session laufen hast, die in lxappearance eingreift? das würde genau das Verhalten erklären....

Yes, that is the case as I now found out. In the fluxbox startup script, there was a line (until some minutes ago) consisting of "xfsettingsd &". It sat there since I changed from KDE3 to fluxbox, some years ago. Commenting out this line caused the spook to vanish. lxappearance is now working (although the same fonts set with xfsettingsd look *slightly* different when set with lxappearance. Some fonts of my loved opera browser look different after disabeling xfsettingsd. But that's all secondary).

The fact is: xfsettingsd intercepted somehow the whole gtkrc fontpath in a not obvious manner. I still think this is a bug if no error message tells you something intercepts what you try to do.
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
the intentional behavior of lxappearance is: if lxde-session is available, hook on an save the setting via session and settings daemon - if no session to hook on - create the gtk files - if another settings daemon is running lxappearance dont recognise this daemon - and write the files which the daemon ignores.

But lxappearance do another thing too - thats fixed with the changelog entry i posted: it provide the changes via dbus to all running applications - this works fine, as seen - but it appears that lxappearance don't save the settings which is not the case :)

xorg-iso - or minimal iso: a stripped down siduction our x-related packages without a full desktop environment. we put fluxbox on it as fluxbox is only one package:
ftp://ftp.spline.de/pub/siduction/iso/december/xorg/amd64_2014-01-27_22-17/siduction-13.2.1-december-xorg-amd64-201401272217.iso
« Last Edit: 2014/09/23, 10:49:18 by melmarker »
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 der_bud

  • User
  • Posts: 1.072
  • member
What is an xorg.iso? I googeled for it, to no avail.
Though not very much promoted, there is a siduction flavour for people who don't want one of the big players of DE but install their own favoured window manager on top of a minimal preconfigured Xorg environment:

Quote from: http://news.siduction.org/2013/12/release-notes-for-siduction-2013-2-with-systemd/
"... Besides those desktop environments we also include noX, which had it’s premiere with the last release and is an environment without X. There is, last, but not least, an image that listens to the name of Xorg and it features the minimal window manager Fluxbox on top of X.... "

It's a pretty thing, a minimal graphical siduction as starting point to play around with DEs and WMS of your choice. For a packagelist see the manifest file in http://ftp.uni-stuttgart.de/siduction/iso/december/xorg/amd64_2014-01-27_22-17/
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
we will promote the xorg iso more in the upcoming release - we create it primary just for fun and to ease our development - trying new packages, desktop environments without the need to take nox and install all the X things to it - after a while we found it useful and decide to make it public available :)
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)