You are not logged in.

#1 2020-04-20 11:18:36

malser
Member
Registered: 2020-04-20
Posts: 5

[SOLVED][XFCE] Locale is set but clock and keyboard are not correct

Hey all,

I have a fresh install on a Thinkpad T450 and experiencing the following problems: my keyboard default layout is US, and the clock is on UTC time. I can manually set a keyboard layout in the Keyboard settings, and manually enter the timezone in the clock widget, but I was hoping there could be a way to automatically configure everything from the current locale. Any help would be really appreciated, I tried to include as much relevant information as possible.

I believe that the locale is set correctly:

$ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
$ localectl
   System Locale: LANG=en_GB.utf8
       VC Keymap: n/a
      X11 Layout: n/a

What confuses me is that setxkbmap says that the locale is C:

$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     gb
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+gb+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+gb+inet(evdev)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

I use tdm as a session manager, log in from the tty then start the session with startx. I tried to set the language in .dmrc, but nothing changes.

$ cat .dmrc
[Desktop]
Session=xfce
Language=en_GB.UTF-8

Edit: Marked as solved!

Last edited by malser (2020-04-20 14:09:30)

Offline

#2 2020-04-20 11:38:20

loqs
Member
Registered: 2014-03-06
Posts: 19,078

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

Offline

#3 2020-04-20 12:03:47

TheSgtBilko
Member
Registered: 2013-08-13
Posts: 89

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

How did you install the system? This is documented in the offficial Installation Guide.

https://wiki.archlinux.org/index.php/In … #Time_zone
https://wiki.archlinux.org/index.php/In … calization
https://wiki.archlinux.org/index.php/Xo … _localectl


edit: Ninjad by loqs

Last edited by TheSgtBilko (2020-04-20 12:07:45)

Offline

#4 2020-04-20 12:45:10

malser
Member
Registered: 2020-04-20
Posts: 5

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

Awesome, that fixed the keyboard and the time. I followed the official guide to install, set the locale correctly, but must have missed the bit about setting local time.

I still have some problems with UTF-8: for example, the characters 世界 (from the Go lang homepage) don't display correctly in Firefox (or mousepad, or any other application). I feel like either xfce or xorg are still using the C locale somehow. What am I missing? The system locale was generated and applied correctly from what I can tell (see my first post).

Offline

#5 2020-04-20 12:51:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,418

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

please post the contents of /etc/locale.conf and the output of locale -a


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2020-04-20 12:54:35

malser
Member
Registered: 2020-04-20
Posts: 5

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

Here they are! I think that en_GB.utf8 was generated and applied correctly:

$ cat /etc/locale.conf 
LANG=en_GB.utf8
$ locale -a
C
en_GB.utf8
POSIX

Offline

#7 2020-04-20 13:04:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,418

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

Those look fine, let's look into xfce settings.

https://wiki.archlinux.org/index.php/Xfce#Starting has useful info .
xfce4-settings-editor or xfconf-query look like they give the most complete access to xfce settings.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2020-04-20 13:20:14

malser
Member
Registered: 2020-04-20
Posts: 5

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

Thanks for all the help, I really appreciate the support!

I've been looking into that, but I don't see anything specific to language or UTF-8. Unless it could be something related to how I start the session? As mentioned I use tdm, after I log in on the tty and execute startx, I get straight into an xfce4 session. I'm including .xinitrc just in case it can be useful:

$ cat .xinitrc 
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/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

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec tdm --xstart

Offline

#9 2020-04-20 13:51:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,854

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

The setxkbmap output is a red herring.

the characters 世界 (from the Go lang homepage) don't display correctly in Firefox (or mousepad, or any other application)

What do they look like instead (feel encouraged to link a screenshot ;-)

Offline

#10 2020-04-20 14:07:00

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

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

I'd also be curious what they're supposed to look like as all I'm seeing between "the characters" and "(from the Go lang homepage)" is two boxes.  There is nothing wrong with my locales, but I don't have many fonts installed.  The failure to display some characters is often just due to them not being provided by any of the available fonts.

Last edited by Trilby (2020-04-20 14:08:56)


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

Offline

#11 2020-04-20 14:07:53

malser
Member
Registered: 2020-04-20
Posts: 5

Re: [SOLVED][XFCE] Locale is set but clock and keyboard are not correct

I think I managed!

The last turned out to be a font problem, solved after installing the following packages: noto-fonts, noto-fonts-emoji, noto-fonts-cjk. Gonna mark as solved, thanks everyone for your help!

Offline

Board footer

Powered by FluxBB