You are not logged in.

#1 2018-12-20 21:54:52

OrangeMan
Member
Registered: 2018-12-20
Posts: 4

[Solved] Cannot set font for urxvt via ~/.Xresources

Hello Arch Members,

First time poster here. Let me start by saying I have read the wiki, urxvt man, and searched google/duckduck about this issue and keep finding the same answers about how to set a default font for urxvt inside the ~/.Xresources file. Also all of my packages are up to date. I am running Arch as a virtual machine under VirtualBox .

I am running with the tile manager i3-gaps and running the terminal emulator urxvt. I installed the package ttf-anonymous-pro for the font. I created the ~/.Xresources file and appended the following line:

URxvt.font: xft:Anonymous Pro:style=Regular:size=9

Upon opening a new instance of urxvt the default font of urxvt is still being used. The font does not update on a system restart either.

I assume I am missing something very obvious but I have been researching for a day and I am at a loss.

Thank you

EDIT: Typo in code block

Last edited by OrangeMan (2018-12-21 03:51:07)

Offline

#2 2018-12-20 22:02:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

Typo (colon after "font"):

URxvt.font:xft:Anonymous Pro:style=Regular:size=9

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-12-20 22:13:23

OrangeMan
Member
Registered: 2018-12-20
Posts: 4

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

I appoligize, I have the code as you posted above in my ~/.Xresources file. I typed it in wrong. Should just copy/paste, but I am having issues with bidirectional clipboard with VirtualBox.

Offline

#4 2018-12-20 22:18:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

¯\_(ツ)_/¯

This works fine for me:

URxvt.font:xft:anonymous pro:regular:size=7.5

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-12-21 01:14:26

Makersmarx
Member
From: Costa Rica
Registered: 2018-04-17
Posts: 24

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

Once changes have been made be sure to run xrdb ~/.Xresources to refresh and reflect your changes. Your line also worked for me

Offline

#6 2018-12-21 03:50:15

OrangeMan
Member
Registered: 2018-12-20
Posts: 4

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

Makersmarx wrote:

Once changes have been made be sure to run xrdb ~/.Xresources to refresh and reflect your changes. Your line also worked for me

Ah, that fixed my issue. Thank you so much!

Offline

#7 2018-12-21 04:05:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

OrangeMan wrote:

The font does not update on a system restart either.

This would have reloaded the file... So there was something else wrong with the invocation.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2018-12-21 04:54:52

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

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

jasonwryan wrote:
OrangeMan wrote:

The font does not update on a system restart either.

This would have reloaded the file...

Assuming an xrdb command is in xinitrc, sure - but otherwise no.  Nothing automatically reads ~/.Xresources (urxvt will read ~/.Xdefaults if it exists).


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

Offline

#9 2018-12-21 04:58:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

Assuming that they followed the wiki and copied the skel file across, which does include the xrdb command, yes smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2018-12-21 10:38:57

OrangeMan
Member
Registered: 2018-12-20
Posts: 4

Re: [Solved] Cannot set font for urxvt via ~/.Xresources

Trilby wrote:
jasonwryan wrote:
OrangeMan wrote:

The font does not update on a system restart either.

This would have reloaded the file...

Assuming an xrdb command is in xinitrc, sure - but otherwise no.  Nothing automatically reads ~/.Xresources (urxvt will read ~/.Xdefaults if it exists).

Ah so thats where I was going wrong in the first place. I was under the impression that urxvt read .XResources by default.

And I do not have an xrdb command in my xinit file. I guess I have to read the wiki more carefully. Thanks again for the help everyone.

Offline

Board footer

Powered by FluxBB