You are not logged in.
Pages: 1
Hello,
Somhow I can not get my console to use a different font automatically. When starting it manually
urvxt -fn "xft:Source Code Pro:Regular:size14"
it works perfectly fine. My .Xresources looks like this:
URxvt.scrollBar: false
URxvt.font: xft:Source Code Pro:regular:size=14
Setting the scrollBar off has worked. urvxt is called via sxkhd.
Any ideas what I did wrong? Thank you!
Last edited by mrkernelpanic (2014-10-12 15:55:20)
Offline
URxvt.font: xftLSource Code Pro:regular:size=14
Is that typo also in your Xresources? Did you/do you merge Xresources with xrdb? Have you tried Xdefaults (at least for diagnostic purposes)? Do you run urxvt or urxvtd/c?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I'm sorry, of course that is a typo and correct in my Xresources. Merging is enabled in my .xinitrc:
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
I did not try Xdefaults yet. I run urxvt (not d/c) in my xinitrc/sxhkd.
Offline
`[[` is a bashism, use `[`...
Offline
I now have
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
in my xinitrc. After restarting X, still the same result.
Edit: I got the result I wanted like this:
sxhkdrc and xinitrc:
urxct -fn 'xft:Source\ Code\ Pro:size=8'
Altough this works, I still would like to know why it does not load Xresources
Last edited by mrkernelpanic (2014-10-12 16:48:19)
Offline
Xdefaults may be useful for diagnostic purposes. There are various arguments for each Xresources and Xdefaults - the reasons likely favor Xresources overall, though I still use the Xdefaults. One advantage of trying out Xdefaults for diagnostic purposes is that urxvt (re-)reads Xdefaults every time it starts up.
If setting that font works with Xdefaults, then we know the font works and the error is somewhere in the merging of Xresources, so we can then focus on that. If, on the other hand, Xdefaults also does not work, then the problem is actually with urxvt setting that font, and then we can look closer at the font string, perhaps your fonts database, or other related bits.
Also, could you post your full xinitrc? (this may be worth doing first)
Last edited by Trilby (2014-10-12 16:40:24)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
.xinitrc
#! /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
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
xrandr --output LVDS1 --auto --primary
xrandr --output HDMI1 --auto --right-of LVDS1
hsetroot -solid "#ffBB00" -tile /home/username/photos/wallpapers/pattern.png
urxvt -fn 'xft:Source\ Code \Pro:size=8' &
sxhkd &
panel &
exec bswpm
Offline
Thanks, that looks good. I gather the urxvt terminal launched from within xinitrc has the right font, but subsequent ones do not?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I launch subsequent terminals via sxkhd, but I use the same option as in the xinitrc. So now both xinit and sxkhd launched terminals start right, but not without stating the font option explicitly.
urxvt -fn 'xft:Source\ Code \Pro:size=8'
Offline
export the XENVIRONMENT variable in .xinitrc or use .Xdefaults
export XENVIRONMENT="$HOME/.Xresources"
Offline
Pages: 1