# rxvt-unicode-9.22 not working anymore after the big upgrade



## Adrien2002 (Jan 4, 2018)

Hi guys !

So today I saw that all my packages were updating to the packages we have in -current. Everything went well except for rxvt-unicode which is not working anymore for me 


```
$ urxvt
urxvt: -xos4-terminus-bold-r-normal--24-240-72-72-c-120-ibm-cp437: cannot deduce encoding from registry/encoding properties "IBM-CP437", ignoring font.
urxvt: -xos4-terminus-bold-r-normal--24-240-72-72-c-120-ibm-cp437: cannot deduce encoding from font name property "IBM-CP437", ignoring font.
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.
```

Here is what I have in my system actually :


```
$ cat /usr/local/etc/X11/xorg.conf
Section "Device"
Identifier "GTX 765m"
Driver "nvidia"
Option "NoLogo" "true"
EndSection

Section "Files"
FontPath "/usr/local/share/fonts/terminus-font"
EndSection
```

And :


```
$ cat /home/Adrien2002/.config/i3/.Xresources
URxvt*.background: black
URxvt*.foreground: white
URxvt*.transparent: true
URxvt*.shading: 50
URxvt*.scrollBar: false
URxvt*.font: -*-terminus-*-*-*-*-24-*-*-*-*-*-*-*
```

It was working like a charm before the update, I don't understand what's wrong, why does it look for this font ? I don't even use it !


----------



## scottro (Jan 4, 2018)

If you're running CURRENT, it's not supported on these forums.   https://forums.freebsd.org/threads/40469/   It's not that strictly followed, as that would mean no comments about FreeBSD on laptops less than 3-4 years old would be allowed.

I would try setting a font with Xft in $HOME/.Xdefaults and seeing if you have better luck. I've run into oddities from time to time, on both Linux and various BSDs where urxvt would fail, complaining about one font or another.

https://wiki.archlinux.org/index.php/rxvt-unicode has an article which includes various ways of declaring fonts.

For what it's worth I just ran a pkg upgrade on a CURRENT install and urxvt still works. I have in .Xdefaults


```
URxvt*font:xft:terminus:size=12
```

(In my original post I had mistyped that as terminus=12, just noticed and corrected it now--apologies.)


----------



## aragats (Jan 4, 2018)

Actually, even in FreeBSD 11.1 I don't see "ibm-cp437" options in any fonts I have including terminus.
Adrien2002 , do you really need "ibm-cp437" variant? If you don't just remove that font name from wherever you have it defined, or replace those options with asterisks.
In your /home/Adrien2002/.config/i3/.Xresources you already have a broader definition, but are you sure it gets merged when you start X?


----------



## Adrien2002 (Jan 4, 2018)

No no I'm not using -current at all, I'm using 11.1 but, today, we received a lot of new packages from -current.

aragats, `xrdb .config/i3/.Xresources` should merge my configuration but it still doesn't let me use urxvt with my actual configuration file.
I do NOT set, in any place, the use of ibm-cp437. The two files I showed you in my original post are the only files I changed. Else, everything is default and it worked before the update.

Setting .Xdefaults with the line you gave me and merging it lets me use urxvt again but with an awful look, it's definitely NOT terminus font


----------



## aragats (Jan 4, 2018)

Adrien2002 said:


> Setting .Xdefaults with the line you gave me and merging it lets me use urxvt again but with an awful look, it's definitely NOT terminus font


It is, but _*xft*_ uses its ttf version, which I don't like either.
You have to find where your font name defined with that "ibm-cp437" option and remove it. Try `grep -r` through your home directory files.


----------



## aragats (Jan 4, 2018)

To check your case, Adrien2002 , I just updated my x11/rxvt-unicode to version 9.22, then started X as a "clean" user with the content of your .Xresources added to my ~/.Xresources, and urxvt perfectly worked with terminus. So, you definitely have that problematic font name defined somewhere. Of course, I don't use *i3*, not sure how it merges/updates resources etc.


----------



## Adrien2002 (Jan 4, 2018)

I merge my .Xresources adding

`exec xrdb ~/.config/i3/.Xresources`

In `~/.config/i3/config`
Again, this always worked before and for years and suddently it doesn't work anymore, really, I installed FreeBSD 24 hours ago, it was working and I never ever wrote ANYWHERE that ibm font thing, it is wrote absolutely nowhere in my /home/$USER so I really don't know what is happening to my rxvt 

After installing my FreeBSD, I only set my xorg.conf (but you saw what it contains) and set my .Xresources as usual.


----------



## aragats (Jan 4, 2018)

From https://i3wm.org/docs/userguide.html:


> To change the configuration of i3, copy /etc/i3/config to ~/.i3/config (or ~/.config/i3/config if you like the XDG directory scheme) and edit it with a text editor.


So, *i3* may have its config in 3 different places (even 4: FreeBSD should use /usr/local/etc/i3/config), and one of them may contain the related *font* line with wrong font name.


----------



## Adrien2002 (Jan 4, 2018)

`$ ls -l ~/.i3
ls: /home/Adrien2002/.i3: No such file or directory`

Nothing here

`$ find /etc | grep i3
find: /etc/ntp: Permission denied`

Nothing here

`$ find /usr/local/etc | grep i3
find: /usr/local/etc/polkit-1/rules.d: Permission denied
find: /usr/local/etc/polkit-1/localauthority: Permission denied
find: /usr/local/etc/cups/ssl: Permission denied
[B]/usr/local/etc/i3
/usr/local/etc/i3/config.keycodes
/usr/local/etc/i3/config[/B]`

Ok so there are two files in this i3 directory. Let's check what's inside

/usr/local/etc/i3/config.keycodes : https://pastebin.com/gm5vzZ30
/usr/local/etc/i3/config : https://pastebin.com/ErTRaV3u

And, let me show you my i3 configuration file

`$ find /home/Adrien2002 | grep i3 | grep config
/home/Adrien2002/.config/i3
/home/Adrien2002/.config/i3/.Xresources
/home/Adrien2002/.config/i3/config`

/home/Adrien2002/.config/i3/config : https://pastebin.com/NvxTcuTk

As you can see, there's nothing but a "pango" font in the default config files and only my terminus in i3 font config (it works in the i3bar and title bar, the terminus font is correctly used there).


----------



## Sensucht94 (Jan 5, 2018)

Hi,
in .Xresources I have:

```
! Font
urxvt*font: xft:terminus:pixelsize=14
urxvt*boldFont: xft:terminusbold:pixelsize=14
urxvt*italicFont:xft:terminus:italic:autohint=true:pixelsize=14
urxvt*boldItalicFont: xft:terminus:bold:italic:autohint=true:pixelsize=14
```

And use font-size extension for dynamic font scaling

The font displayed in your screenshot looks like a double-spaced one (perhaps Oxygen Mono or Dejavu Sans?)

Anyway, even though I'm not a i3 user,     i3(1) man page states that font specifications in ~/.config/i3/config should follow the syntax:


```
font pango:[family list] [style options] [size]
```

(so slightly different from .Xresources syntax: `name.Class.resource: value`)

and provides an example like:

```
font    pango:DejaVu Sans Mono 8
```

Which may be set as Default: I wonder, this may explain why your font looks like Dejavu Sans (given the syntax which you specified terminus font with doesn't match the expected one and is likely not recognized)

Hope this helps


----------



## SirDice (Jan 5, 2018)

Adrien2002 said:


> No no I'm not using -current at all, I'm using 11.1 but, today, we received a lot of new packages from -current.


I think you're confusing some terminology here. There are no packages for -CURRENT. Even if they did exist you certainly wouldn't want to install packages built for a newer version (12.0) on your system (11.1). There are quarterly packages or latest packages, those are the two choices. The -CURRENT label refers to the FreeBSD base OS version, and has nothing to do with packages or ports.


----------



## sidetone (Jan 5, 2018)

If you're not using `sh` for your shell, and you forgot to reinstall your chosen shell after the upgrade, rxvt and other command-line programs won't work. This happened to me before. `xterm` will work either way, because it will default to sh.


----------



## SirDice (Jan 5, 2018)

I had some issues with rxvt and the Terminus font too. I know I had to modify my ~/.Xresources a little regarding the font definition, but I can't remember what exactly I changed. I'm sure it was these two lines:

```
urxvt*font:        -xos4-terminus-medium-*-*-*-20-*-*-*-*-*-*-*
urxvt*boldFont:    -xos4-terminus-bold-*-*-*-20-*-*-*-*-*-*-*
```
If I remember correctly I had to change one of the options to * but don't know which one. I know I found the culprit by putting the font selection in x11-fonts/xfontsel and that pointed me to the offending option.


----------



## Adrien2002 (Jan 7, 2018)

SirDice said:


> I think you're confusing some terminology here. There are no packages for -CURRENT. Even if they did exist you certainly wouldn't want to install packages built for a newer version (12.0) on your system (11.1). There are quarterly packages or latest packages, those are the two choices. The -CURRENT label refers to the FreeBSD base OS version, and has nothing to do with packages or ports.



No I'm not, you are misunderstanding me. I know there are quarterly, you can access all those packages in https://pkg.freebsd.org

I know the "latest" are showing all the latest packages you can get when you are using -current and quarterly will show you the one that are available in stable 11.1 (actually). I didn't switch to -current repo, I just pkg update and got 800M of update suddently. The packages were similar to the -current one I saw a few days before. All those new packages are in stable and everyone will have them now being in stable 11.1. I know now the -current users have more updated packages but WHEN IT ARRIVED to stable, I think we were very close to the -current users in term of packages version.

Actually, I went to test on NetBSD :

`i3 version [B]4.13[/B] (2016-11-08) © 2009 Michael Stapelberg and contributors
rxvt-unicode (urxvt) v[B]9.22[/B] - released: 2016-01-23`

The FreeBSD's i3 is actually : *4.14*
Maybe there's a difference between 4.13 and 4.14 or maybe it's a different behavior between the two BSDs
But actually, the rxvt version is the same on the two BSDs.

I set the exact same options as I always did since two years now and I don't have any problem to use urxvt with terminus. The i3 config file is exactly the same as on my FreeBSD, I just sent it from FreeBSD to NetBSD (changing the /usr/local to /usr/pkg of course)





It works in NetBSD and to let you understand it has NOTHING to do with the [...]/etc/i3/config, the only uncommented line about font is :

`font pango:monospace 8`

Exactly like the config file under /usr/local/etc/i3/config of FreeBSD
So I'm not doing something wrong at all, it always worked as-is before then suddently it is not working anymore.
By the way, the i3 config file is not related to my terminal config font. As you can see on my previous post showing the FreeBSD terminal, the i3 title bar IS correctly using terminus font, only rxvt isn't. When I go on Google and write "007", it the title bar, I do have that special "0" with a bar inside as in terminus font. If I unset my font in i3 config file (setting it back to pango as it is the default font then), I don't see the terminus font in the title bar and i3 bar (showing the virtual desktop numbers).

The font is working correctly but only in i3. It doesn't work in rxvt.
I really doubt that i3 is the problem here, else I won't see the font in i3. Also, i3 is really minimal, it only works with one poor config file. If it was KDE, I'd understand the doubts about the DE but... i3 ? No ! It can't be because of it ! Too strange !


----------



## aragats (Jan 7, 2018)

What if you create a simple ~/.xinitrc file and start another X server by running `startx`?
	
	



```
$ cat ~/.xinitrc
xrdb -merge ~/.config/i3/.Xresources
urxvt
```


----------



## SirDice (Jan 8, 2018)

Adrien2002 said:


> I know the "latest" are showing all the latest packages you can get when you are using -current and quarterly will show you the one that are available in stable 11.1 (actually). I didn't switch to -current repo, I just pkg update and got 800M of update suddently. The packages were similar to the -current one I saw a few days before. All those new packages are in stable and everyone will have them now being in stable 11.1. I know now the -current users have more updated packages but WHEN IT ARRIVED to stable, I think we were very close to the -current users in term of packages version.


You're still misunderstanding the difference between latest and quarterly, it has _nothing_ to do with the version of FreeBSD. All versions on all architectures use the exact same ports tree. And all supported versions have both a latest and a quarterly package branch.


----------



## zwieblum (Jan 9, 2018)

I am hit by exactly the same problem ... and here is the solution: Change in your .Xresources the font line from this:

```
URxvt.font:         -*-terminus-medium-*-*-*-20-*-*-*-*-*-*-*
```
to this (just replace the last '*' with '1'):

```
URxvt.font:         -*-terminus-medium-*-*-*-20-*-*-*-*-*-*-1
```
Then reload the .Xresources and you're fine again


----------

