xterm not loading xresources properly
6,237
Solution 1
The problem was incorrect syntax in .Xresources
file. It seemed that the #define
syntax is not working; thus using the hex codes directly solved the issue. An example:
*.foreground: #ababab
*.background: #000000
*.cursorColor: #ababab
Solution 2
I had same problem:
Clearest way is:
- copy
/etc/xdg/xfce4/xinitrc
to~/.config/xfce4/
- Edit
~/.config/xfce4/xinitrc
, find the line:
cat /dev/null $XRESOURCES | xrdb --nocpp -merge -
- delete
--nocpp
, so that the line now looks like
cat /dev/null $XRESOURCES | xrdb -merge -
- save
Good luck!
Related videos on Youtube
Author by
sitilge
Updated on September 18, 2022Comments
-
sitilge over 1 year
There are similar questions out there, however, I was not able to figure out the flaws in my
.xinitrc
file which causes.Xresources
not to load. The respective.xinitrc
#!/bin/sh [[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources exec startxfce4
The respective DE is
xfce4
, using no login manager (startx
only), running onarch
. I've read the wiki and posts out there, nothing seems to solve the issue...The
.Xresources
file#define _background #272822 #define _color8 #303030 #define _foreground #d0d0d0 #define _color9 #ff0090 #define _color2 #66AA11 #define _color10 #80FF00 #define _color3 #c47f2c #define _color11 #ffba68 #define _color4 #30309b #define _color12 #5f5fee #define _color5 #7e40a5 #define _color13 #bb88dd #define _color6 #3579A8 #define _color14 #4eb4fa #define _color7 #9999AA #define _color15 #ffffff xterm*background: _background xterm*foreground: _foreground xterm*cursorColor: _foreground xterm*color0: _background xterm*color1: _foreground xterm*color2: _color2 xterm*color3: _color3 xterm*color4: _color4 xterm*color5: _color5 xterm*color6: _color6 xterm*color7: _color7 xterm*color8: _color8 xterm*color9: _color9 xterm*color10: _color10 xterm*color11: _color11 xterm*color12: _color12 xterm*color13: _color13 xterm*color14: _color14 xterm*color15: _color15
-
John1024 almost 8 yearsThat bash line looks correct. I suspect that you problem lies somewhere else. Have your tried running
xrdb -merge -I$HOME ~/.Xresources
on its own and seeing if any errors appear either on the screen or in the X11 log? -
sitilge almost 8 years@ThomasDickey please, see the update.
-
sitilge almost 8 years@John1024 no, nothing...
-
sitilge almost 8 years@ThomasDickey it seems that I am running in circles here. Nothing in logs.
-
Gilles 'SO- stop being evil' almost 8 yearsPost the output of
appres XTerm xterm
as well (assuming you start xterm asxterm
). This shows the resources that are in actual use. -
sitilge almost 8 years
appres
isn't available. Isxrdb -query -all
ok for you? -
derobert almost 8 yearsare you sure your .xinitrc is actually being run? Add an
xclock &
or something in there to be sure... -
sitilge almost 8 years@derobert hmm, good point. It feels that it is run. Just mv the filename and the xfce wasn't started... Reverted -> works fine -> it must be loaded.
-
terdon almost 8 yearsAre you sure that
.xinitrc
is sourced by bash? You haven't told us your distribution but many don't use bash as the default shell for this sort of thing. Does it work if you change the[[ ]]
to single[ ]
? -
sitilge almost 8 years@terdon it's arch. It was sh earlier, swithced back. But, sadly, it still doesn't work.
-
terdon almost 8 yearsPlease edit your question and mention your OS then. You should also mention your login manager and desktop environment, these could be relevant. It might also help if you stated the problem you're facing more clearly. It took me a while to understand that the problem is that
xinitrc
isn't being sourced. That said, changing the shebang line will make no difference. Did you try using[ ]
instead of[[ ]]
as I suggested? -
sitilge almost 8 years@terdon actually, I guess I solved the problem. A tiny bit of an incorrect syntax in Xresources was the problem. Closing now.
-
terdon almost 8 yearsGreat! Not sure what you mean by "closing" but if you can, please post an answer with your solution and accept it. That might help the next person with the same problem.
-
sitilge almost 8 years@terdon sure, just a sec.
-
-
derobert over 7 yearsErrrr.... do you have the C preprocessor installed? You could also try adding
-cpp /usr/bin/cpp
to yourxrdb
options.