I want to change default xterm background color to black for all system.
I uncommented corresponding lines in
/usr/share/X11/app-defaults/XTerm-color
But background in xterm is still white.
Have you tried setting this up into Xresources?
Case is important.
man xterm
then
/^ +VT100 Widget Resources and press
Enter.
So, (
$HOME/.Xresources)
XTerm.vt100.background: black
XTerm.vt100.foreground: grey
xrdb -merge ~/.Xresources
xterm
By default settings I mean global changes for all users.
Xresources file makes changes for current user and requires autostart because changes dissapear after reboot.
It's just a text file which is passed to xrdb. Where it is located is of no consequence (provided the user has permissions to read the file).
That said, the
default system-wide
xinitrc sources
/etc/X11/xinit/.Xresources. Keep in mind that system-wide
xinitrc will be overridden by user-defined
$HOME/.xinitrc.
Also keep in mind that if you are using a DM, your
$HOME/.xinitrc might be overridden as well. See the documentation of a particular DM.
More information:
less /etc/X11/xinit/xinitrc
https://wiki.archlinux.org/title/Xinit
xrdb -merge ~/.Xresources
Color changes are kept untill reboot and only for current user.
After reboot xterm has wite background and cyan ps1.
I don't see any marged setting in /etc/X11/xinit/
anyfile $HOME/.xinitrc is commented so emty
xterm from tty is also with white background.
So it is not because WM overwrites .xinitrc
If you have
world/xorg-xinit installed, that package provides the file
/etc/X11/xinit/xinitrc. It starts with:
#!/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
I said that a DM (display manager, for example: lightdm, sddm...), not WM (window manager) can over
ride (not over
write, those are two different things!) your
$HOME/.xinitrc.
If you are using a DM, use instead the file
$HOME/.xprofile.
Read the wiki:
https://wiki.archlinux.org/title/Xinit
https://wiki.archlinux.org/title/Xprofile
Finally solved this quest for me. :D
I expected system to remember settings after
xrdb -merge ~/.Xresources and reboot.
but normaly resourses are loaded every time at boot by:
1 line in .xinitrc when user logins by startx:
https://wiki.archlinux.org/title/X_resources#xinitrc
2 Login manager
I use tbsm login manager so .xinitrc is not executed , and tbsm does not loads xresources by itself.
So I have to add to autostart: