Invalid locale

This is also odd...

If i run the command xterm which opens the xterm terminal. If I then run the command LANG="sv_SE.UTF-8"

then it works to write the "~" sign and even the swedish letters.
 

Attachments

  • locale_xterm.png
    locale_xterm.png
    3.9 KB · Views: 24
It needs the locale to be set correctly but also the font must support the swedish letters. On the console I use the terminus font. I have configured that in /etc/rc.conf by
Code:
# VT font
allscreens_flags="-f terminus-u28b"
With that font I can read swedish letters, even without X11.
 
It needs the locale to be set correctly but also the font must support the swedish letters. On the console I use the terminus font. I have configured that in /etc/rc.conf by
Code:
# VT font
allscreens_flags="-f terminus-u28b"
With that font I can read swedish letters, even without X11.
Ok. I've looked in

zoor@FreeBSD-dell:/usr/share/vt/fonts $ ls
INDEX.fonts spleen-6x12.fnt vgarom-8x16.fnt
gallant.fnt spleen-8x16.fnt vgarom-8x8.fnt
spleen-12x24.fnt terminus-b32.fnt vgarom-thin-8x16.fnt
spleen-16x32.fnt tom-thumb.fnt vgarom-thin-8x8.fnt
spleen-32x64.fnt vgarom-16x32.fnt
spleen-5x8.fnt vgarom-8x14.fnt
zoor@FreeBSD-dell:/usr/share/vt/fonts $

I cannot see any terminus-u28b font available?


zoor@FreeBSD-dell:/usr/share/vt/fonts $ sudo pkg search terminus
Password:
puppetdb-terminus7-7.20.1 PuppetDB storeconfigs backend terminus module
puppetdb-terminus8-8.8.1 PuppetDB storeconfigs backend terminus module
terminus-font-4.49.1_1 Terminus Font - a clean fixed width font
terminus-ttf-4.49.3 Terminus Font - a clean fixed width font (TTF version)
zoor@FreeBSD-dell:/usr/share/vt/fonts $
I cannot see it when I search either.
 
You can get terminus from x11-fonts/terminus-font.
x11-fonts/spleen is another font option here.
Installed spleen. The terminus font was already the mosts recent version on my computer apparently?


zoor@FreeBSD-dell:~ $ sudo pkg update
Password:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
zoor@FreeBSD-dell:~ $ sudo pkg install x11-fonts/terminus-font
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
zoor@FreeBSD-dell:~ $ sudo pkg install x11-fonts/spleen
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
spleen-font: 2.1.0

Installed packages to be REINSTALLED:
opencv-4.9.0_6

Number of packages to be installed: 1
Number of packages to be reinstalled: 1

172 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching spleen-font-2.1.0.pkg: 100% 172 KiB 175.8kB/s 00:01
Checking integrity... done (0 conflicting)
[1/2] Installing spleen-font-2.1.0...
[1/2] Extracting spleen-font-2.1.0: 100%
[2/2] Reinstalling opencv-4.9.0_6...
[2/2] Extracting opencv-4.9.0_6: 100%
zoor@FreeBSD-dell:~ $ ls /usr/share/vt/fonts/
INDEX.fonts spleen-6x12.fnt vgarom-8x16.fnt
gallant.fnt spleen-8x16.fnt vgarom-8x8.fnt
spleen-12x24.fnt terminus-b32.fnt vgarom-thin-8x16.fnt
spleen-16x32.fnt tom-thumb.fnt vgarom-thin-8x8.fnt
spleen-32x64.fnt vgarom-16x32.fnt
spleen-5x8.fnt vgarom-8x14.fnt
zoor@FreeBSD-dell:~ $

Is terminus-b32 similair as the suggested terminus version in the previous message?
 
Is terminus-b32 similair as the suggested terminus version in the previous message?
It has been "terminus-u28b" which is one of the fonts in /usr/share/vt/fonts. On my system there are actually fonts as below:
Code:
> ls /usr/share/vt/fonts/
gallant.fnt           spleen-8x16.fnt       terminus-u16b.fnt     terminus-u22b.fnt     terminus-u32n.fnt     vgarom-thin-8x16.fnt
INDEX.fonts           terminus-b32.fnt      terminus-u16n.fnt     terminus-u22n.fnt     tom-thumb.fnt         vgarom-thin-8x8.fnt
spleen-12x24.fnt      terminus-u12b.fnt     terminus-u16v.fnt     terminus-u24b.fnt     u28b-6.fnt
spleen-16x32.fnt      terminus-u12n.fnt     terminus-u18b.fnt     terminus-u24n.fnt     vgarom-16x32.fnt
spleen-32x64.fnt      terminus-u14b.fnt     terminus-u18n.fnt     terminus-u28b.fnt     vgarom-8x14.fnt
spleen-5x8.fnt        terminus-u14n.fnt     terminus-u20b.fnt     terminus-u28n.fnt     vgarom-8x16.fnt
spleen-6x12.fnt       terminus-u14v.fnt     terminus-u20n.fnt     terminus-u32b.fnt     vgarom-8x8.fnt
I have installed
Code:
> pkg info|grep -i terminus
terminus-font-4.49.1_1         Terminus Font - a clean fixed width font
But I am not sure if this package provides the vt fonts. The documentation mentions X11 only.
EDIT: I think to install the Terminus vt-fonts I have followed https://forums.freebsd.org/threads/small-fonts-file-suitable-for-boot-console-use-with-vt.69106/

It is possible to use vidcontrol(1) as root to change the font during a login. I have tried
Code:
vidcontrol -f /usr/share/vt/fonts/spleen-16x32.fnt
With that font I can read the swedish characters.

If that does not work please check if the console driver is set to "vt" using sysctl(8). It should be as below.
Code:
> sysctl kern.vty
kern.vty: vt
In the very past the default has been "sc". It has been changed to "vt" years ago. The fonts in your /etc/rc.conf are listed in /usr/share/syscons/fonts/. May be your system still uses the old console driver.
 
It has been "terminus-u28b" which is one of the fonts in /usr/share/vt/fonts. On my system there are actually fonts as below:
Code:
> ls /usr/share/vt/fonts/
gallant.fnt           spleen-8x16.fnt       terminus-u16b.fnt     terminus-u22b.fnt     terminus-u32n.fnt     vgarom-thin-8x16.fnt
INDEX.fonts           terminus-b32.fnt      terminus-u16n.fnt     terminus-u22n.fnt     tom-thumb.fnt         vgarom-thin-8x8.fnt
spleen-12x24.fnt      terminus-u12b.fnt     terminus-u16v.fnt     terminus-u24b.fnt     u28b-6.fnt
spleen-16x32.fnt      terminus-u12n.fnt     terminus-u18b.fnt     terminus-u24n.fnt     vgarom-16x32.fnt
spleen-32x64.fnt      terminus-u14b.fnt     terminus-u18n.fnt     terminus-u28b.fnt     vgarom-8x14.fnt
spleen-5x8.fnt        terminus-u14n.fnt     terminus-u20b.fnt     terminus-u28n.fnt     vgarom-8x16.fnt
spleen-6x12.fnt       terminus-u14v.fnt     terminus-u20n.fnt     terminus-u32b.fnt     vgarom-8x8.fnt
I have installed
Code:
> pkg info|grep -i terminus
terminus-font-4.49.1_1         Terminus Font - a clean fixed width font
But I am not sure if this package provides the vt fonts. The documentation mentions X11 only.
EDIT: I think to install the Terminus vt-fonts I have followed https://forums.freebsd.org/threads/small-fonts-file-suitable-for-boot-console-use-with-vt.69106/

It is possible to use vidcontrol(1) as root to change the font during a login. I have tried
Code:
vidcontrol -f /usr/share/vt/fonts/spleen-16x32.fnt
With that font I can read the swedish characters.

If that does not work please check if the console driver is set to "vt" using sysctl(8). It should be as below.
Code:
> sysctl kern.vty
kern.vty: vt
In the very past the default has been "sc". It has been changed to "vt" years ago. The fonts in your /etc/rc.conf are listed in /usr/share/syscons/fonts/. May be your system still uses the old console driver.
Thanks for your long reply.

When I try to do the vidcontrol suggested by you I get this:

zoor@FreeBSD-dell:/usr/share/vt/fonts $ sudo vidcontrol -f /usr/share/vt/fonts/spleen-16x32.f
nt
vidcontrol: getting active vty: Inappropriate ioctl for device
zoor@FreeBSD-dell:/usr/share/vt/fonts $

...
 
No problems here with these Swedish vt(4) console and Xorg configuration.

/etc/rc.conf
Code:
keymap="se"

User ~/.login_conf (not essential to display Swedish characters in vt, keymap=se is sufficient. More to display Swedish locales in console and Xorg, see second image, menus)
Code:
me:\
         :charset=UTF-8:\
         :lang=sv_SE.UTF-8:
reboot system

Code:
 $ locale
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_ALL=

for instance the swedish letters å ä ö and also special characters like "~" is not possible in any terminal-editor.

swedish.png


Xorg configuration: /usr/local/etc/X11/xorg.conf.d/keyboard.conf
Code:
Section "InputClass"
    Identifier        "Keyboard1"
    MatchIsKeyboard   "on"
    Option            "XkbLayout" "se"
EndSection

xorg-se.png
 
Back
Top