You are not logged in.

#1 2015-07-16 13:54:54

Sanic
Member
Registered: 2015-06-30
Posts: 29

[SOLVED] Urxvt config changes aren't working

I have a near fresh install of arch. I installed bspwm, firefox and a few font packages. Not much more. I'm trying to use the fonts that I installed but I'm not sure why what I've done isn't working. $TERM is rxvt-unicode and I placed

urxvt*.font: xft:Inconsolata:size=9:antialias=true

but nothing changes in the terminal.  Any ideas on how to fix this?

Last edited by Sanic (2015-07-16 20:48:35)

Offline

#2 2015-07-16 13:57:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Urxvt config changes aren't working

Where have you placed that line?  Xdefaults or Xresources (or somewhere else)?  If Xresources, did you use xrdb to merge in the changes?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-07-16 14:10:42

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: [SOLVED] Urxvt config changes aren't working

I don't have a .Xdefaults file. I placed it in .Xresources. I'm not sure what xrdb is but it looks like

userresources=$HOME/.Xresources
...
if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

is in my .xinitrc if that helps.

Offline

#4 2015-07-16 14:15:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Urxvt config changes aren't working

And is xrdb installed?  Can you post your full xinitrc?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2015-07-16 15:34:08

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: [SOLVED] Urxvt config changes aren't working

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmpa=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then

    xrdb -merge $sysresources

fi

if [-f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [-f "$userresources" ]; then

    xrdb -merge "$userresources"
fi

if [-f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

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

sxhkd &
urxvt &
exec bspwm

Offline

#6 2015-07-16 20:01:56

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Urxvt config changes aren't working

Sanic wrote:
urxvt*.font: xft:Inconsolata:size=9:antialias=true

Try this instead:

URxvt.font: xft:Inconsolata:size=9:antialias=true

Jin, Jîyan, Azadî

Offline

#7 2015-07-16 20:10:45

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: [SOLVED] Urxvt config changes aren't working

Do I need to log out and log back in for changes to take into effect or just open a new terminal?

Offline

#8 2015-07-16 20:24:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Urxvt config changes aren't working

Sanic wrote:

Do I need to log out and log back in for changes to take into effect or just open a new terminal?

xrdb -merge ~/.Xresources

EDIT: This is why Trilby & I use .Xdefaults instead...

Last edited by Head_on_a_Stick (2015-07-16 20:25:24)


Jin, Jîyan, Azadî

Offline

#9 2015-07-16 20:33:22

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: [SOLVED] Urxvt config changes aren't working

Ok, everything works now. Thank you! Can you explain why you would use .Xdefaults vs .Xresources? I don't understand why there are 2 options or why you would pick one or the other.

Offline

#10 2015-07-16 20:41:33

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Urxvt config changes aren't working

Sanic wrote:

Can you explain why you would use .Xdefaults vs .Xresources?

rxvt-unicode parses ~/.Xdefaults automatically when it starts -- see urxvt(1) -- so there is no need to `xrdb -merge` the configuration file.

Please add "[SOLVED]" to the thread title for the benefit of others.

Last edited by Head_on_a_Stick (2015-07-16 20:41:43)


Jin, Jîyan, Azadî

Offline

#11 2015-07-16 20:51:02

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: [SOLVED] Urxvt config changes aren't working

Is there any reason I would need both .Xdefaults and .Xresources? Should I just copy the contents of Xresources to Xdefaults?

Offline

#12 2015-07-16 20:52:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Urxvt config changes aren't working

I do indeed use .Xdefaults my self, but there certainly are benefits of each one.  Xdefaults is parsed by urxvt itself - but on the flip side, is must be parsed by urxvt itself rather than just once when X starts.  Read about the different approaches and chose the one that works best for you.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2015-07-16 20:56:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Urxvt config changes aren't working

Sanic wrote:

Is there any reason I would need both .Xdefaults and .Xresources?

Some (most?) programs that can be configured with .Xresources will *not* parse .Xdefaults automatically.

I have both files on my system but I use .Xdefaults for my rxvt-unicode configuration.


Jin, Jîyan, Azadî

Offline

#14 2015-07-16 22:35:24

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Urxvt config changes aren't working

On the other hand, the font config line the OP originally posted works perfectly in my .Xresources file, so there must be something else going on (not the name of the file or the urxvt/URxvt difference.)

XDefaults is deprecated -- when used correctly, XResources works well. I personally don't see the need to have my terminal parse the config file each time it starts. Seriously, how often do you change the terminal config during a session, and how hard is it to run "xrdb ~/.Xresources" if you do? (I have an alias for this)

Also, there are a couple of important caveats for using these files:

ArchWiki wrote:

Warning:

    If you background the execution of xrdb in a chain of commands in ~/.xinitrc, the programs launched in the same chain might not be able to make use of it, so it is recommended to never background the xrdb command within ~/.xinitrc.
    The older and deprecated ~/.Xdefaults file is read every time you start an X11 program such as xterm, but only if xrdb has not ever been used in the current X session. [1]

Last edited by 2ManyDogs (2015-07-16 22:37:48)

Offline

#15 2015-07-16 22:37:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Urxvt config changes aren't working

Sanic wrote:

Ok, everything works now. Thank you! Can you explain why you would use .Xdefaults vs .Xresources? I don't understand why there are 2 options or why you would pick one or the other.

Please read the wiki: https://wiki.archlinux.org/index.php/X_resources

Offline

#16 2015-07-17 03:24:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Urxvt config changes aren't working

2MG that wiki excerpt does not seem correct.  Urxvt reads .Xdefaults (if it exists) regardless of the state of the x resource database.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#17 2015-07-17 03:50:33

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Urxvt config changes aren't working

^ I did wonder about that (but not enough to test it) -- I just use Xresources and call xrdb when and if I change it. This works well for me. Maybe you should edit the wiki, considering that you have more experience with Xdefaults?

I read "deprecated" as -- "we may break this at any time, so beware" -- and I avoid this.

Offline

Board footer

Powered by FluxBB