2

I've been looking for a way to get my black background xterm windows to have visible borders, so that they don't flow into one other visually when overlapped. I feel like I've done my research but nothing is working.

Resources like this one imply that it should be doable through .Xresources (which does seem to work for faceSize and faceName). I'm an old school X11 person going back to the days of Motif, twm, fvwm, fvwm2... and so that seemed like the right solution. No apparent effect.

I tried manually driving this from the -bd and -bw arguments to xterm and that has no effect.

This link suggests doing it through gnome gtk style sheets. Other than forcing me to log out and back in again, these changes seemed to have no effect.

I tried changing the theme using the gnome tweaks tool but while that affected the window running the tweak tool, it has no effect on the xterm.

Short of massive undertakings like dumping gnome (which our IT department might have an issue with), is there some fine tuning that still works under the latest Ubuntu 20.04 LTS to get windows borders on dubiously-supported traditional X11 applications?

1 Answers1

2

Option 1: Changing with gtk style sheets

Add something like the following to ~/.config/gtk-3.0/gtk.css:

decoration {
    border: 2px solid #0759EB;
    background: #0759EB;
}

Then reboot the machine. This appeared to have no effect until, weeks later, the entire machine got rebooted due to a power failure.

Option 2: Changing with xrdb/Xresources

Add something like the following to ~/.Xresources:

xterm*borderColor: gray50
xterm*colorInnerBorder: true

Then xrdb -merge ~/.Xresources and start a new xterm. While xterm*borderColor has no effect by itself under gtk, you can combine this with xterm*colorInnerBorder: true to force a border. The upside of this is it can take effect without a reboot; the downside is that your border is no longer separated at all from your text, so it may make the text harder to read at the edges.