[SOLVED] Change default xterm background color to black 23 March 2022, 19:36:44 I want to change default xterm background color to black for all system.I uncommented corresponding lines in /usr/share/X11/app-defaults/XTerm-colorQuote#include "XTerm"*VT100*colorMode: on*VT100*boldColors: on*VT100*dynamicColors: on! Uncomment this for "white" text on a dark background. *VT100*foreground: gray90*VT100*background: blackBut background in xterm is still white. Last Edit: 08 August 2022, 21:18:50 by u0
Re: Change default xterm background color to black Reply #1 – 23 March 2022, 20:05:12 Have you tried setting this up into Xresources? 1 Likes
Re: Change default xterm background color to black Reply #2 – 23 March 2022, 20:18:58 Case is important.Code: [Select]man xtermthen /^ +VT100 Widget Resources and press Enter.Quote The following resources are specified as part of the vt100 widget (class VT100). They are specified by patterns such as “XTerm.vt100.NAME”.[...]background (class Background) Specifies the color to use for the background of the window. The default is “XtDefaultBackground”So, ($HOME/.Xresources)Code: [Select]XTerm.vt100.background: blackXTerm.vt100.foreground: greyCode: [Select]xrdb -merge ~/.Xresourcesxterm 1 Likes
Re: Change default xterm background color to black Reply #3 – 26 March 2022, 02:47:30 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.
Re: Change default xterm background color to black Reply #4 – 26 March 2022, 09:40:48 Quote from: u0 – on 26 March 2022, 02:47:30By 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:Code: [Select]less /etc/X11/xinit/xinitrchttps://wiki.archlinux.org/title/Xinit Last Edit: 26 March 2022, 10:29:27 by strajder 1 Likes
Re: Change default xterm background color to black Reply #5 – 01 April 2022, 20:22:26 Code: [Select]xrdb -merge ~/.XresourcesColor 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 emtyxterm from tty is also with white background. So it is not because WM overwrites .xinitrc Last Edit: 01 April 2022, 20:34:09 by u0
Re: Change default xterm background color to black Reply #6 – 01 April 2022, 20:42:21 Quote from: u0 – on 01 April 2022, 20:22:26I don't see any marged setting in /etc/X11/xinit/anyfileIf you have world/xorg-xinit installed, that package provides the file /etc/X11/xinit/xinitrc. It starts with:Code: [Select]#!/bin/shuserresources=$HOME/.Xresourcesusermodmap=$HOME/.Xmodmapsysresources=/etc/X11/xinit/.Xresourcessysmodmap=/etc/X11/xinit/.Xmodmap# merge in defaults and keymapsif [ -f $sysresources ]; then xrdb -merge $sysresourcesfiQuote from: u0 – on 01 April 2022, 20:22:26So it is not because WM overrites .xinitrcI said that a DM (display manager, for example: lightdm, sddm...), not WM (window manager) can override (not overwrite, 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/Xinithttps://wiki.archlinux.org/title/Xprofile
Re: Change default xterm background color to black Reply #7 – 08 August 2022, 21:09:35 Finally solved this quest for me. 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:Quote[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources https://wiki.archlinux.org/title/X_resources#xinitrc2 Login managerI use tbsm login manager so .xinitrc is not executed , and tbsm does not loads xresources by itself.So I have to add to autostart:Quotexrdb ~/.Xresources & Last Edit: 08 August 2022, 21:21:25 by u0