You are not logged in.

#1 2024-09-04 16:11:39

chris_on_linux
Member
Registered: 2022-09-23
Posts: 20

[SOLVED]Rofi locale issue

Hello everyone,

I am a chronic (possibly terminal) distrohopper and this is my 8th time coming back to Arch. This time, I want to go for a tiling window manager setup, something I have only managed to achieve on Debian. I want to set up i3wm with polybar and rofi for a launcher. When I try to run rofi, however, it complains about the locale. I have checked this thread: https://bbs.archlinux.org/viewtopic.php … 4#p2148534, but it simply doesn't work for me. I have uncommented en_US.UTF-8 UTF-8 from my /etc/locale.gen and I have added LANG=en_US.UTF-8 in my /etc/locale.conf before running locale-gen. Here is the output of locale -a:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.utf8
POSIX
en_US.utf8

the output of localectl:

System Locale: LANG=en_US.UTF-8
    VC Keymap: (unset)         
   X11 Layout: (unset)         

and grep -v ^# /etc/locale.gen:

en_US.UTF-8 UTF-8.

Do you have any idea why rofi says (process:3018): Rofi-WARNING **: 19:10:51.010: Failed to set locale?

Thanks!

Last edited by chris_on_linux (2024-09-05 09:46:40)

Offline

#2 2024-09-04 16:35:58

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [SOLVED]Rofi locale issue

localectl
locale
locale -a

Uncommenting anything in /etc/locale.gen does absolutely nothing.
https://wiki.archlinux.org/title/Locale … ng_locales

Offline

#3 2024-09-04 17:01:26

chris_on_linux
Member
Registered: 2022-09-23
Posts: 20

Re: [SOLVED]Rofi locale issue

I have taken a look at the locale page of the Arch Wiki but I can't spot where I am making a mistake. The installation guide said to uncomment en_US.UTF-8 UTF-8 form /etc/locale.gen, create the /etc/locale.conf file and write LANG=en_US.UTF-8 and then run locale-gen, and I did exactly that. I can't understand why rofi is complaining, even though other programs have not.

Offline

#4 2024-09-04 19:42:16

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [SOLVED]Rofi locale issue

Nothing, I did't read the descritptive text too closely and just saw you grepping locale.conf, what doesn't mean much.
What's the output of

locale

(nb. that "locale -a" complains as well and about specific LC variables, there's something off, probably in your shell rc - rofi is just very strict about this)

Last edited by seth (2024-09-04 19:42:36)

Offline

#5 2024-09-05 06:20:16

chris_on_linux
Member
Registered: 2022-09-23
Posts: 20

Re: [SOLVED]Rofi locale issue

The command locale returns this:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Does anything look wrong?

Offline

#6 2024-09-05 06:27:25

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [SOLVED]Rofi locale issue

Please use [code][/code] tags.

No, looks fine - is that from the same context (shell) where you're trying to run rofi or "locale -a"?
Does the latter actually still say

locale: Cannot set LC_CTYPE to default locale: No such file or directory
pacman -Qikk glibc
ls -lR /usr/share/locale/{C,en}*

Offline

#7 2024-09-05 09:46:15

chris_on_linux
Member
Registered: 2022-09-23
Posts: 20

Re: [SOLVED]Rofi locale issue

I ran "locale" on a separate shell. "locale -a" no longer says

locale: Cannot set LC_CTYPE to default locale: No such file or directory

even though I didn't change anything. I rebooted and ran rofi, and, to my surprise, it runs normally! I really appreciate your help!

Offline

Board footer

Powered by FluxBB