SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Until recently I never** had a problem with merging X resources by including the line below in ~/.xinitrc :
Code:
xrdb -merge $HOME/.Xresources
Last week I copied some terminal themes to ~/.Xresources.d/themes/ and added an #include ./Xresources.d/themes/<theme-name> to the ~/.Xresources file. Since then, for some unknown reason, the xrdb command in ~/.xinitrc no longer works. I have to run it manually from within Xfce and restart the xterm or urxvt. Only then does the terminal honour the resources file.
**I do remember having a similar problem some time ago and I solved it by using xrdb $HOME/.Xresources in .xinitrc, instead of xrdb -merge $HOME/.Xresources. I'd like to know what I'm doing wrong before resorting to that again.
Last edited by Gerard Lally; 09-30-2018 at 06:47 AM.
You definitely need double quotes around the filename in #include, as required by cpp (C pre-processor). I don't know if there is anything else wrong, but start with that.
You definitely need double quotes around the filename in #include, as required by cpp (C pre-processor). I don't know if there is anything else wrong, but start with that.
Sorry: forgot to include relevant excerpts. Double quotes were there.
Not from .xinitrc, but it does work from within Xfce, if I restart xterm. After starting Xfce with startx, a new xterm completely ignores the colour scheme specified in .Xresources, but once I run the exact same "xrdb -merge ... " command from within that xterm, the colours are applied properly to any xterms opened afterwards.
I'd check first the /etc/X11/xinit/xinitrc.xfce to compare what it does differently, then make xinitrc.custom with that info.
Could also be startxfce4 script that did something your xinitrc did not do.
I'd check first the /etc/X11/xinit/xinitrc.xfce to compare what it does differently, then make xinitrc.custom with that info.
Could also be startxfce4 script that did something your xinitrc did not do.
Well, it appears you're onto something. My ~/.xinitrc has the same contents as the system xinitrc.xfce (except for urxvtd -q -o -f and setxkbmap gb), so that doesn't appear to be the problem. But I've just tried fvwm and fluxbox and xterm does honour X resources when I start with those WMs. Now to find out why Xfce has suddenly decided to change its mind. It was working fine until I put that #include line in .Xresources.
edit: After typing #include above, I've just discovered the # is mapped to \ instead. So my gb keyboard layout, as specified in .xinitrc with setxkbmap gb, is also being ignored. For some reason Xfce is ignoring ~/.xinitrc altogether, and not just the .Xresources line. I don't have a display manager, so startx should invoke ~/.xinitrc, shouldn't it?
Last edited by Gerard Lally; 10-02-2018 at 06:31 AM.
edit: After typing #include above, I've just discovered the # is mapped to \ instead. So my gb keyboard layout, as specified in .xinitrc with setxkbmap gb, is also being ignored. For some reason Xfce is ignoring ~/.xinitrc altogether, and not just the .Xresources line. I don't have a display manager, so startx should invoke ~/.xinitrc, shouldn't it?
Sorry, false alarm. My ~/.xinitrc was overwritten and restored to default values when I used xwmconfig to switch between fvwm, fluxbox and xfce. That explains the keyboard problem, but not the .Xresources problem.
Well if other WM works, then it's startxfce problem (which I can't help with tbh)
Thing is I don't use startx, I use (and prefer) XDM and ~/.xsession file coupled with custom start(xfce) script:
And .Xresources loads from ~/.xsession file over here like:
Code:
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
if [ -f $sysresources ]; then
/usr/bin/xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
/usr/bin/xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
/usr/bin/xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
/usr/bin/xmodmap $usermodmap
fi
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session /usr/bin/startxfwm4
else
exec /usr/bin/startxfwm4
fi
Not sure how you'd do this with 'startx' but it's an interesting topic nonetheless.
Well if other WM works, then it's startxfce problem (which I can't help with tbh)
Thing is I don't use startx, I use (and prefer) XDM and ~/.xsession file coupled with custom start(xfce) script:
I tried this method and it works. It solves the Xresources problem, but creates one or two others, most likely down to me not being familiar with xsession, and session management in general. First, I could not change GTK settings using the Xfce settings manager. I had to install lxappearance and that did the trick by creating ~/.gtkrc-2.0. Second, I get an error when I try to logout using the whisker menu:
Code:
Could not get owner of name 'org.xfce.SessionManager': no such name
And through the action buttons:
Code:
The name org.xfce.SessionManager was not provided by any .service files
So at the moment I've no way of logging out from Xfce other than by switching to another VT and running telinit 3.
Yes, this is normal, nothing to worry about. The .gtkrc is simple to fix, maybe it's worth to add one into /etc/skel
Reboot/Shutdown is bit of a hack, but I got that fixed with dbus and some desktop files:
I already posted about that thing in 2016-2017 (it was for fluxbox menu, but later I used it to get rid of 'session manager' because I don't like *managers)
Thank you for your help. GTK is fixed; as for logout, I'll just alias xfce4-panel -q. I always have an xterm open anyway. This newfangled .desktop and dbus thing brings me right back to ini files in Windows for Workgroups 3.11, and that's not a pleasant memory.
I'm not going to mark this solved because the workaround, which I'm satisfied with, still doesn't solve the original problem.
Last edited by Gerard Lally; 10-03-2018 at 07:18 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.