The officially official Devuan Forum!

You are not logged in.

#1 2021-11-11 13:05:48

felixed
Member
Registered: 2021-10-28
Posts: 42  

[SOLVED] Is it possible to change GUI title bar color when working as root?

Chimaera, Xfce4, theme Menta.

Offline

#2 2021-11-11 14:28:06

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

You could try setting a different theme for root in /root/.gtkrc-2.0 & /root/.config/gtk-3.0/settings.ini

Last edited by Head_on_a_Stick (2021-11-11 14:39:12)


Brianna Ghey — Rest In Power

Offline

#3 2021-11-11 19:21:31

felixed
Member
Registered: 2021-10-28
Posts: 42  

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

/root/.config/gtk-3.0/ is empty.

I tried a gtk.css there:

.titlebar {
    background: #ff0000;
    color:#000000; 
}

.titlebar:backdrop  {
    background: #a00000;
    color:#808080;
} 

Not working.

With mate there's at least a comment "(as admin)" in the title.

When logging in as root (bad idea, I know) there's a warning displayed within the caja window, but the title bar is not red.

Last edited by felixed (2021-11-11 19:41:59)

Offline

#4 2021-11-11 20:11:08

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

felixed wrote:

/root/.config/gtk-3.0/ is empty.

Yes, root's $HOME is supposed to be empty.

felixed wrote:

I tried a gtk.css there

Oh, clever, I like it :-)

But unfortunately I forgot that Xfce doesn't read the GTK configuration files. Sorry. Try xfconf-query instead (as root).


Brianna Ghey — Rest In Power

Offline

#5 2021-11-11 21:32:23

felixed
Member
Registered: 2021-10-28
Posts: 42  

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

Xfce4 obviously reads the gtk.css of ~. I change some panel and desktop colors by that.

Maybe it's a syntax error. I wrote the same into the ~/.config/gtk-3.0/gtk.css, restarted, but the title bar didn't change. Maybe the syntax is wrong.

Is there any manual of css syntax used by xfce4? Or by gtk3?

Last edited by felixed (2021-11-11 21:37:27)

Offline

#6 2021-11-12 10:12:36

felixed
Member
Registered: 2021-10-28
Posts: 42  

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

Little step forward.

With /root/.config/gtk-3.0/gtk.css

headerbar {
    background: #ff0000;
    color: #ffffff; 
    text-shadow: #000000;
}
headerbar:backdrop  {
    background: #800000;
    color: #404040;
    text-shadow: #000000;
} 

it works for some GUI as gedit, but not for caja. In caja there is also no effect from ~/.config/gtk-3.0/gtk.css .

Offline

#7 2021-11-16 15:34:28

felixed
Member
Registered: 2021-10-28
Posts: 42  

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

Got so far as caja and other GUI's title backgrond (for instance for theme Menta) is set by

@define-color theme_selected_bg_color #accd8a;

in /usr/share/themes/Menta/gtk-3.0/gtk-main.css .

Other entries in there then refer to  theme_selected_bg_color.

Offline

#8 2021-11-17 22:13:54

felixed
Member
Registered: 2021-10-28
Posts: 42  

Re: [SOLVED] Is it possible to change GUI title bar color when working as root?

Das Problem ist nicht wie gewünscht lösbar. Der Titel wird vom Fenstermanager verwaltet und der verwendet die Einstellungen des angemeldeten Nutzers.

Allerdings habe ich jetzt noch menubar und toolbar auf knallrot gesetzt und alle für mich relevanten Programme haben irgendwas davon (headerbar, menubar oder toolbar).

Meine /root/.config/gtk-3.0/gtk.css sieht jetzt so aus:

headerbar {
    background: #ff0000;
    color: #ffffff; 
    text-shadow: #000000;
}
headerbar:backdrop  {
    background: #800000;
    color: #404040;
    text-shadow: #000000;
} 
menubar,toolbar {
    background: #ff0000;
}

Nicht ganz so elegant wie vorgesehen, aber funktioniert.

Offline

Board footer