You are not logged in.

#1 2013-10-13 19:28:05

pcolbeck
Member
Registered: 2011-10-17
Posts: 16

[solved] startxfce4 and xrdb merge

Hi

I am having trouble with my .Xresources and XFCE4. It doesn't seem to load it. I am kicking off XFCE4 using "startx".
If after I start XFCE I open a terminal and run "xrdb -merge /home/pcolbeck/.Xresources" then all the customisations are picked up fine. If I dont then it just doenst seem to work it just gets ignored.

My .xinitrc is as follows:

# exec gnome-session

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

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

xrdb -merge /home/pcolbeck/.Xresources
# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice

Thanks

Pat

Last edited by pcolbeck (2013-10-14 08:53:29)

Offline

#2 2013-10-13 22:41:27

mar04
Member
From: Poland
Registered: 2010-02-08
Posts: 117

Re: [solved] startxfce4 and xrdb merge

You can check what's been loaded with xrdb -query. To debug this issue have a look at /usr/bin/startxfce4 and /etc/xdg/xfce4/xinitrc - they are both a shell scripts. xinitrc is the one that's actually loading X resources, and it should xrdb -merge both ~/.Xdefaults and ~/.Xresources if they exists. Maybe you have some env variables set incorrectly?

Offline

#3 2013-10-13 23:05:32

pcolbeck
Member
Registered: 2011-10-17
Posts: 16

Re: [solved] startxfce4 and xrdb merge

Thanks. That helped in that I now know .Xresources is getting merged but not properly. The test I have been ruinning all along is to run urxvt whith solorized colors set in .Xresources. When I run urxvt it runs witha pink forground and background. If I do xrdb -merge ~/.Xresources first I get a nice urxvt with the correct solarized colours.

Following your recomendation xrdb -query shows that the colors and fonts size etc are being set when startx is run but for somereason the #define statements are failing unless I manually do another xrdb merge after loading xfce4. 

Imediatley after starting XFCE4 xrdb -query shows:

*color0:	S_base02

after running xrdb -merge ~/.Xresources in an Xterm the same thing shows:

*color0:	#073642

So it looks like the issue is that all the define statements in .Xresources are failing such as:

#define S_base02        #073642

I have no idea why though.

Last edited by pcolbeck (2013-10-13 23:05:55)

Offline

#4 2013-10-14 07:36:36

mar04
Member
From: Poland
Registered: 2010-02-08
Posts: 117

Re: [solved] startxfce4 and xrdb merge

That's because /etc/xdg/xfce4/xinitrc has line:
xrdb -nocpp -merge
which means C preprocessor is not being run - macros won't work.
I didn't read that files carefully but if you do I think you could find a way to override it. Or just run xrdb -merge again.

Offline

#5 2013-10-14 08:52:31

pcolbeck
Member
Registered: 2011-10-17
Posts: 16

Re: [solved] startxfce4 and xrdb merge

Bingo !

Thanks mar04 thats the issue.

The cleanest way I could think of to fix it was:

cp /etc/xdg/xfce4/xinitrc ~/.config/xfce4/

Then remove the --cpp from the following line in ~/.config/xfce4/xinitrc

cat /dev/null $XRESOURCES | xrdb -nocpp -merge -

All works great now, no more hot pink urxvt smile

Last edited by pcolbeck (2013-10-14 09:21:14)

Offline

Board footer

Powered by FluxBB