You are not logged in.

#1 2018-04-07 19:52:49

im_gnu_here
Member
Registered: 2018-04-07
Posts: 4

[SOLVED] Cannot change xterm colors, using spectrwm window manager

Hi,
Currently I initiate X via the startx command.  The .xinitrc file is set up to start spectrwm window manager and a couple of xterm windows (and zsh is my default shell).  The xterms default to black text on a white background but I would like to reverse this.  I have tried:
  -Adding "-fg white -bg black" options after "xterm" in the .xinitrc file
  -Setting "XTerm*Foreground: white" and "XTerm*Background: black" in the .Xresources file
  -Setting "XTerm.vt100.reverseVideo: true" in the .Xresources file
  -Various shell commands to set fg/bg or reverse colors
  -Uninstalling grml-zsh-config in case it was overriding any of the above

But nothing has worked.  Thank you for any help you can provide!

-im_gnu_here

Last edited by im_gnu_here (2018-04-08 15:24:59)

Offline

#2 2018-04-07 19:53:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

Paste your xinitrc


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-04-07 21:46:59

im_gnu_here
Member
Registered: 2018-04-07
Posts: 4

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then

    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then

    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

spectrwm &
xscreensaver &
 xterm -fg white -bg black -geometry 50x50-1+1 &
 konqueror -geometry 80x50+494+51 &
#xclock -digital -geometry 80x20+494-0 &
exec xterm -fg white -bg black -geometry 80x66+0+0 -name login

Last edited by im_gnu_here (2018-04-08 01:48:22)

Offline

#4 2018-04-07 22:45:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-04-07 22:59:22

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

Shouldn't spectrwm be the last thing you start?  Also, exec can only appear once, and should be the last thing you start.  The way you have it now X should exit once you close the xterm, instead of the window manager.

Offline

#6 2018-04-07 23:15:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

circleface, the current setup is fine.  `exec` does only appear once and is the last thing started.  There is no reason the WM needs to be last and/or exec'ed - this is common, but not at all necessary.  X will exit when the xterm is closed, but not before.

Last edited by Trilby (2018-04-07 23:16:00)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2018-04-07 23:28:12

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

Thanks Trilby, I didn't know that. smile  (I've always just followed the wiki, which always puts the WM last)

Offline

#8 2018-04-08 07:02:53

seth
Member
Registered: 2012-09-03
Posts: 51,053

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

type xterm
xterm
xterm -rv
xterm -fg white -bg black

Does one of those produce a white on black xterm?

Offline

#9 2018-04-08 15:05:04

im_gnu_here
Member
Registered: 2018-04-07
Posts: 4

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

Hi Seth,

Those are not working - new xterm windows open but the color options have no effect.

I tried commenting out the starting of the window manager altogether in .xinitrc, with the bg/fg options still in place on the xterm lines, and they still start with a white bg and black fg.

Offline

#10 2018-04-08 15:07:47

seth
Member
Registered: 2012-09-03
Posts: 51,053

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

seth wrote:

type xterm

"xterm -rv" should™ produce an inverted version of "xterm", if it does not, my suspicious is that "xterm" is not resolved to the binary but maybe some wrapper script that calls the binary (or even some other VTE) and doesn't pass on parameters?

Offline

#11 2018-04-08 15:20:27

im_gnu_here
Member
Registered: 2018-04-07
Posts: 4

Re: [SOLVED] Cannot change xterm colors, using spectrwm window manager

I'm going to mark this one [SOLVED].  It was a case of me trying too many things at once; I had

XTerm.vt100.reverseVideo: true

in my .Xresources file which was reversing the previously initiated black bg/white fg options.  Commenting that out did the trick.

Now when I type xterm -rv (in an xterm that already has my desired color scheme) it opens a new xterm with white bg/black fg.

Thanks!

Offline

Board footer

Powered by FluxBB