Change color of active TAB for roxterm on XFCE / LXDE

2

2

I've recently moved away from Gnome because my virtual machine simply could not handle the load. The VM is running Debian and XFCE 4.10.1 (I've tried out LXDE before, too). The one thing that bites me is that I cannot see the active tab, the only visible difference is a one-pixel wide bar that is slightly lighter, almost impossible to see without a magnifier. Other terminal emulators seem to exhibit the same problem. I've searched with Google and have already tried out many different things:

  • changed the active theme using <Settings>/<Appearance>.
  • created .config/gtk-2.0/gtk.css/.config/gtk-3.0/gtk.css and added values there.
  • modified theme files.
  • modified .gtkrc.

Nothing has worked so far. So, how can I make it that the active TAB is discernible from the other tabs? A different color would be best, but anything reasonable would do.

hochl

Posted 2014-01-07T14:18:51.283

Reputation: 591

Answers

3

I have the same problem since I upgraded from antix 13.1 to antix 13.2 (based on debian). My tweaked config resulted in indistinguishable active and inactive tabs. But the default account shows clear distinction between the two.

So I ldd /usr/bin/roxterm | grep gtk and found out that the version of gtk that my roxterm uses is libgtk-3.so.0 .

I found that the default account has this file~/.config/gtk-3.0/settings.ini , which my tweaked account doesn't. So I copied it and now roxterm has distinguishable tabs.

It has this crucial line: gtk-theme-name=MediterraneanWhite

You can also find /usr/share/themes/ -iname gtk-3.0 and try different themes such as Adwaita or HighContrast or whatever you find in your /usr/share/themes/.

2014-09-08 update: Editing ~/.config/gtk-3.0/gtk.css gives you a finer way of changing the color of the active tab: http://harts.net/reece/2013/02/26/highlighting-the-active-tab-in-gnome-terminal/

ckhung

Posted 2014-01-07T14:18:51.283

Reputation: 31

+1 sounds promising -- unfortunately I can't verify if that works for me since I have switched to terminator out of frustration. If enough people upvote here and verify that I can accept your answer :) – hochl – 2014-05-18T10:44:54.170

1

You seem to be editing the wrong files:

  • .gtkrc is used only by Gtk 1.
  • .config/gtk-3.0/gtk.css is used only by Gtk 3.
  • .config/gtk-2.0/gtk.css is not used by anything, because Gtk 2 used gtkrc-format themes, not CSS.

Gtk 2, which Xfce uses, keeps its settings in .gtkrc-2.0 – and for themes, in <themename>/gtk-2.0/gtkrc.

You could try a theme like Clearlooks, which has a fairly thick blue highlight for "active" tabs. If that is not enough, you could even copy its gtkrc to ~/.themes/Clearlooks/gtk-2.0/gtkrc, find the part that looks like this...

style "notebook_bg" {
    bg[NORMAL]        = shade (1.02, @bg_color)
}

...and change the @bg_color to @selected_bg_color, making the whole active tab blue. I have tested this just now.

Side note: It is a good idea to symlink either ~/.themes to ~/.local/share/themes or vice versa, since different Gtk versions use different paths.

user1686

Posted 2014-01-07T14:18:51.283

Reputation: 283 655

Interesting results -- I made the changes as proposed, this time testing with LXDE. If I start <Preferences>/<Customize Look and Feel> the demo window changes color to blue for the active tab -- completely! On the other hand, roxterm is not impressed and still looks the same. Btw, the same counts for gnome-terminal :( I even changed any color value I could find to red, still roxterm looks the same (the demo applet turns completely red, so I assume the gtkrc is used by it). – hochl – 2014-01-08T21:45:38.097

@hochl: LXDE still uses Gtk2. Meanwhile, both gnome-terminal and roxterm are Gtk3 programs. You can use gresource list /usr/share/themes/Adwaita/gtk-3.0/gtk.gresource to see the CSS files it use, and put customizations in the .config/gtk-3.0/gtk.css file. – user1686 – 2014-01-09T12:32:53.493

Sorry haven't worked on this problem for some days. I did use strace -f to see which files roxterm tries to open and then created a gtk.css file at that location. I confirmed that roxterm opens this file, but I have not found any setting that would influence the appearance in any way :-/ (even tried things from this post for gnome-terminal).

– hochl – 2014-01-21T13:18:48.173