Announcement

Collapse
No announcement yet.

color settings ignored by gtk2 themes

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [DESKTOP] color settings ignored by gtk2 themes

    Hi,

    I'm customizing a new kubuntu 20.04.1 installation.

    I'm unable to make gtk2 applications use my customized color theme (while my customized gtk3 theme works as expected).
    gtk2 theme preview window shows that clearly and inkscape uses those same colors.
    All the gtk2 themes I tested just ignore the color settings.

    It looks like GTK2_RC_FILES is not set. So I tried to set it in a terminal and then from there I started inkscape (gtk2) but the color theme was ignored. I tried to copy the gtk-oxygen-theme to ~/.themes modifying the colors but that didn't work.

    I even tested a live CD boot in a virtual machine to be sure I didn't broke something while customizing my installation.
    I quickly made a custom ugly color theme just to stress the difference between gtk2 and gtk3 applications. See attachments below.
    BTW a live kubuntu 20.10 behaves the same.

    Any idea
    Click image for larger version

Name:	gtk2-preview.png
Views:	1
Size:	67.6 KB
ID:	649692
    Click image for larger version

Name:	gtk3-preview.png
Views:	1
Size:	63.0 KB
ID:	649693

    #2
    For GTK3 programs, there's a KWin script to force decorations:

    Click image for larger version

Name:	tmp_KWin_1_system_settings.jpg
Views:	2
Size:	37.5 KB
ID:	644987

    But I don't know whether there's a matching script for GTK2. You might want to check that out.
    Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

    Comment


      #3
      Originally posted by DoYouKubuntu View Post
      For GTK3 programs, there's a KWin script to force decorations:

      But I don't know whether there's a matching script for GTK2. You might want to check that out.
      thanks for your reply.
      Unfortunately the problem is not related to window decorations.
      The script you mentioned is related to the fact that gtk3 applications often have various widgets spread over the titlebar.

      BTW I discovered that there is a shell script: gtk2-default-theme.rc.sh in /usr/share/kubuntu-default-settings/ :
      Code:
      #!/bin/bash
      
      # Make sure our customised gtkrc file is loaded.
      export GTK2_RC_FILES=$HOME/.gtkrc-2.0-kde4
      But that environment variable is never set and besides that there is no .gtkrc-2.0-kde4 (usually a symlink) in the home directory.
      I'll see if I can find what is wrong by comparing the directory structures of kubuntu 20.04 with previous versions of kubuntu or with different distributions using KDE as desktop environment.

      Comment

      Working...
      X