locale [URF-8] issue on KDE5

Hello!
I've FreeBSD 12.0 Release on my Laptop, and I've got KDE5 on it. Everything is fine except the system locale.
Well, the file names which are not English are not displayed correctly and when I use Konsole the locale is "C" :

Code:
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

I think changing locale to UTF-8 would fix the issue (I remember I didn't have same issue with KDE4). I tried several ways but any of them didn't work.
First, I tried to modify ~/.login_conf :

Code:
melang:\
        :charset=UTF-8:\
        :lang=en_US.UTF-8:

It didn't work. Please note that when I use ALT+F1 to get system console, locale are set correctly to UTF-8, but when I back to windowed mode and use Konsole every locale is set to "C"

Then, I tried to add a new login class with same language preference and modify the user to use that class, it didn't help as well.

I don't know if it is related or not , but I used SDDM service for automatic launch of KDE5 after system boot.

Thanks,
 
Last edited by a moderator:
NOTE 1: "locale -a" shows I've UTF-8 capability.
NOTE2:
Bash:
[user@host1 /usr/home/user]$ cat ~/.config/plasma-localerc
[Formats]
LANG=
 
pkg-message for SDDM says that exactly:
Code:
SDDM does not support login.conf(5), and no special restrictions
or settings from login.conf are enforced or applied.
 
pkg-message for SDDM says that exactly:
Code:
SDDM does not support login.conf(5), and no special restrictions
or settings from login.conf are enforced or applied.

Oh, I think I missed that part !
So, is there any other way to automatically execute kde at system startup ?

I just configured .xinitrc , make it executable (755):
Code:
[user@host1 /usr/home/user]$ cat ~/.xinitrc
exec /usr/local/bin/startkde

but, when system reboots it shows an error about DISPLAY is not set on 0:0 ... or something.
any recommendation ?
 
Sorry, have no answer here as I'm simply not using KDE and/or SDDM. It's the generic failure of DMs, though, to not respect the login.conf settings; some of them were patched in the past to add support (slim was, IIRC).
 
For Konsole, Settings > Edit Current Profile > Advanced > Encoding > Unicode > UTF-8

For Dolphin pkg install sysutils/automount. Copy /usr/local/etc/automount.conf.sample to /usr/local/etc/automount.conf. Change USER to the name of your non-root user account. Change ENCODING to en_US.UTF-8. Change CODEPAGE to whatever you like, or simply delete that line to use whatever the default codepage is.

It's not necessary to make .xinitrc executable.

(EDITED to add: ) In /etc/rc.conf make sure to add the line dbus_enable="YES". Change your ~/.xinitrc to say exec ck-launch-session dbus-launch --exit-with-session startkde.
 
Hi

In KDE5, all shell scripts in the ${HOME}/.config/plasma-workspace/env directory will be executed before the desktop session is started, and the effects will be propagated to the desktop session.

I have setup a file named ${HOME}/.config/plasma-workspace/env/locale.sh that has
Code:
export LANG=en_US.UTF-8
export MM_CHARSET=UTF-8
inside.

KDE's systemsettings also has a graphical interface for these scripts via systemsettings -> Workspace -> Startup and Shutdown -> Autostart, where shell scripts can be added to the autostart by pressing the corresponding button. For the script to be able to expose environment variables to the session, it is required to be Run On Before session statup. Effectively, that will copy the script into ${HOME}/.config/plasma-workspace/env.
 
  • Thanks
Reactions: grz
Back
Top