You are not logged in.

#1 2021-12-14 03:45:28

nektahiti
Member
Registered: 2021-12-14
Posts: 1

[SOLVED] GTK2/GTK3 themes will not apply on first boot.

SOLVED: was tired, did not even diff recursively, anyways turns out I was missing the [Settings] in gtk3 settings.ini

Hi!

I am building my own iso for installation using calamares and am very confused about my gtk theme not applying when booting on the live system and at first reboot after install.

It's openbox with no desktop environment, using lxsession-gtk3 and lxappearance-gtk3.

The only thing that applies correctly are my cursors, which I also set in as per XDG specifications, which seems weird as thats where the actual icon config goes according to the freedekstop specification.

~/.icons/default/index.theme

[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=Nordzy-cursors

My gtk settings files

~/.gtkrc-2.0 :

gtk-theme-name="Fantome"
gtk-icon-theme-name="Vertex-Icons"
gtk-font-name="Cantarell 11"
gtk-cursor-theme-name="Nordzy-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintmedium"

~/.config/gtk-3.0/settings.ini

gtk-theme-name=Fantome
gtk-icon-theme-name=Vertex-Icons
gtk-font-name=Cantarell 11
gtk-cursor-theme-name=Nordzy-cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintmedium

If I open lxappearance and set these values exactly in the gui and hit apply, all the themes apply. As noted, Mouse cursors are correctly selected in lxappearance and already applied.

If I backup my original home folder and diff before and after I hit the apply in the lxappearance gui I see it created a new file:

~/.config/lxsession/openbox/desktop.conf

[GTK]
sNet/ThemeName=Fantome
sGtk/FontName=Cantarell 11
sGtk/ColorScheme=
sNet/IconThemeName=Vertex-Icons
sGtk/CursorThemeName=Nordzy-cursors
iGtk/CursorThemeSize=0
iGtk/ToolbarStyle=3
iGtk/ToolbarIconSize=3
iGtk/ButtonImages=0
iGtk/MenuImages=0
iNet/EnableEventSounds=1
iNet/EnableInputFeedbackSounds=1
iXft/Antialias=1
iXft/Hinting=1
sXft/HintStyle=hintmedium

So I tried adding this file that lxappearance creates and start form fresh

But no luck, still no themes applied until I run lxappearance and apply themes once.

Now the diff shows no difference after hitting apply in the gui besides the header text lxappearance adds to ~/.gtkrc-2.0

sudo diff oj oj.init
Common subdirectories: oj/.ansible and oj.init/.ansible
Common subdirectories: oj/.cache and oj.init/.cache
Common subdirectories: oj/.config and oj.init/.config
Common subdirectories: oj/Desktop and oj.init/Desktop
Common subdirectories: oj/Documents and oj.init/Documents
Common subdirectories: oj/Downloads and oj.init/Downloads
Common subdirectories: oj/.gnupg and oj.init/.gnupg
diff oj/.gtkrc-2.0 oj.init/.gtkrc-2.0
1,4d0
< # DO NOT EDIT! This file will be overwritten by LXAppearance.
< # Any customization should be done in ~/.gtkrc-2.0.mine instead.
<
< include "/home/oj/.gtkrc-2.0.mine"
Common subdirectories: oj/.icons and oj.init/.icons
Common subdirectories: oj/.local and oj.init/.local
Common subdirectories: oj/Music and oj.init/Music
Common subdirectories: oj/Pictures and oj.init/Pictures
Common subdirectories: oj/.pki and oj.init/.pki
Common subdirectories: oj/Public and oj.init/Public
Common subdirectories: oj/.ssh and oj.init/.ssh
Common subdirectories: oj/Templates and oj.init/Templates
Common subdirectories: oj/Videos and oj.init/Videos
Common subdirectories: oj/.vscode-oss and oj.init/.vscode-oss

I also tried comparing running services before and after I hit apply, nothing changed...

From then on if I change the values in the config files the themes apply without launching lxappearance again.

Also, if I change themes again with lxappearance it only modifies the ~/.gtkrc-2.0 file altho the theme is GTK3 compatible and am using lxappearance-gtk3.

Very confused, please help big_smile

Last edited by nektahiti (2021-12-15 12:07:53)

Offline

Board footer

Powered by FluxBB