You are not logged in.

#1 2020-09-11 17:37:20

jwtiyar
Member
From: Kurdistan
Registered: 2013-01-25
Posts: 62

Setting locale for different apps

Hey
I want my system use ckb_IQ locale, Now i did set locale to ckb in locale.gen, Now some apps wont work because locale is not enlgish like Dmenu, How to set locale for dmenu without changing system locale?

 
jwtiyar@Arch-Jwtiyar ~> 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
POSIX
ckb_IQ
ckb_IQ.utf8
jwtiyar@Arch-Jwtiyar ~> 


Best Regards.

Offline

#2 2020-09-11 18:59:46

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

Re: Setting locale for different apps

LC_ALL=C dmenu

However please post the outputs of "localectl" and "locale" and see https://wiki.archlinux.org/index.php/Locale

Offline

#3 2020-09-11 19:08:22

jwtiyar
Member
From: Kurdistan
Registered: 2013-01-25
Posts: 62

Re: Setting locale for different apps

seth wrote:
LC_ALL=C dmenu

However please post the outputs of "localectl" and "locale" and see https://wiki.archlinux.org/index.php/Locale

 jwtiyar@Arch-Jwtiyar ~> LC_ALL=C dmenu

Nothing happens.

Outputs:

jwtiyar@Arch-Jwtiyar ~> localectl
   System Locale: LANG=ckb_IQ.UTF-8
       VC Keymap: n/a
      X11 Layout: us,iq,ara
       X11 Model: pc105
     X11 Variant: ,ku_ara
     X11 Options: grp:alt_shift_toggle
 
jwtiyar@Arch-Jwtiyar ~> locale
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_ALL to default locale: No such file or directory
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=
jwtiyar@Arch-Jwtiyar ~> 

Last edited by jwtiyar (2020-09-11 19:10:32)

Offline

#4 2020-09-11 19:12:51

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

Re: Setting locale for different apps

Your problem is that the shell runs under the en_US.UTF-8 locale which does no longer exist.

Try

LC_ALL=ckb_IQ.UTF-8 dmenu

, don't "sudo-fix" this (not gonna work) and in doubt just re-login.
If the locale remains en_US.UTF-8, that's somewhere set in your local shellrc/profile.

Offline

#5 2020-09-11 19:16:28

jwtiyar
Member
From: Kurdistan
Registered: 2013-01-25
Posts: 62

Re: Setting locale for different apps

I got this :

 jwtiyar@Arch-Jwtiyar ~> LC_ALL=ckb_IQ.UTF-8 dmenu
warning: no locale support
warning: no locale modifiers support

And terminal still loading, i mean after this command it loads not going to next command prompt.

Offline

#6 2020-09-11 19:23:18

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

Re: Setting locale for different apps

it loads not going to next command prompt

Sounds as if dmenu runs (dmenu itself is a shell and needs input to do sth. meaningful)

ls | LC_ALL=C dmenu -i -l 10 -w 640 -x 320 -y 400

About the "ckb_IQ.UTF-8", I don't know what that is and my locale.gen only offers ar_IQ.UTF-8 - are you sure it's a valid locale?

Offline

#7 2020-09-11 19:26:39

jwtiyar
Member
From: Kurdistan
Registered: 2013-01-25
Posts: 62

Re: Setting locale for different apps

I have both rofi and dmenu, None of them works.
The ouput is:

jwtiyar@Arch-Jwtiyar ~> ls | LC_ALL=C dmenu -i -l 10 -w 640 -x 320 -y 400
usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]
             [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]
jwtiyar@Arch-Jwtiyar ~ [SIGPIPE|1]>

ckb_IQ is added to glibc from 2.32 version, Update your system it should be available in your system also.
I Did created this ckb_IQ for Glibc before one month added to glibc.

Offline

#8 2020-09-11 19:32:21

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

Re: Setting locale for different apps

Different dmenu version (there's a thousand forks)

ls | LC_ALL=C dmenu -l 10

should work fine and get you a window on the top of the screen.

There seems an issue w/ the "ckb_IQ.UTF-8" locale that popped up w/ various other asian locales in the past, but apparently w/o inhibiting dmenu.

Offline

#9 2020-09-11 19:39:19

jwtiyar
Member
From: Kurdistan
Registered: 2013-01-25
Posts: 62

Re: Setting locale for different apps

seth wrote:

Different dmenu version (there's a thousand forks)

ls | LC_ALL=C dmenu -l 10

should work fine and get you a window on the top of the screen.

There seems an issue w/ the "ckb_IQ.UTF-8" locale that popped up w/ various other asian locales in the past, but apparently w/o inhibiting dmenu.

Thanks Bro
But this have to be done every time when i run into terminal.
I can't just set en_US locale for rofi or dmenu?

Offline

#10 2020-09-11 19:59:37

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

Re: Setting locale for different apps

You can shadow it w/ a script up in $PATH (eg. in /usr/local/bin or ~/bin) - ensure to call the actual binary by it's full path.
dmenu is however usually run in a script anyway and:

ls | LC_ALL=ckb_IQ.UTF-8 dmenu -l 10

Does this work? (warning or not - dmenu might just require a rebuild)

Because the original error is because your shell locale is still english.

Offline

#11 2020-09-11 20:11:45

jwtiyar
Member
From: Kurdistan
Registered: 2013-01-25
Posts: 62

Re: Setting locale for different apps

Thank you the command works but need to run it every time from terminal.
I will see if i can setup a script for that purpose if possible.
I thought there is a way to set locale for specific app .

Offline

#12 2020-09-11 20:14:37

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

Re: Setting locale for different apps

The locale is inherited from the surrounding shell but AGAIN: if the last command works you will not have to do that anyway.
You only need to get your shell into ckb_IQ.UTF-8 which will either happen w/ a re-login or by updating/fixing your shell configuration (Iff you explicitly configured the en_US.UTF-8 locale somewhere else)

Offline

Board footer

Powered by FluxBB