Forum › Forums › Official Releases › antiX-19 “Marielle Franco, Hannie Schaft, Manolis Glezos, Grup Yorum, Wobblies” › question: separate X and console localization
- This topic has 8 replies, 4 voices, and was last updated Jul 18-1:15 pm by Brian Masinick.
-
AuthorPosts
-
June 8, 2020 at 7:53 am #37040
Anonymous
By default, the same locale applies to both GUI and console.
Since unicode support in console is bad enough to not use it, is it possible to have GUI localized whereas have console entirely in English?June 8, 2020 at 7:58 am #37042Forum Admin
anticapitalista
::As far as I know it is not possible for window managers.
You probably need to install a desktop-environment to do this.Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
June 10, 2020 at 9:08 am #37191Anonymous
::proof of concept: parallel launch:
$ geany
$ env LANG=uk_UA.UTF-8 geany
$ env LANG=zh_CN.UTF=8 geanyBut a single example is not the same as the whole desktop…
Should something like this work in theory?
Will it work in practice?June 10, 2020 at 9:44 am #37194Member
sybok
::@proof of concept:
Then you can have the desktop set to your “preferred” language and create a keyboard and/or desktop shortcut to launch a console (via executing the below script)#!/bin/bash #current=<get current locale> # variable current="$(locale | grep 'LANG=' | awk -F'=' ' { print $2 } ' | xargs)" console=<console locale> # constant env "LANG=${console}" <your favorite terminal application> &; env "LANG=${current}"with re-settting ‘env’ after the terminal is launched may not be necessary (needs to be tested).
- This reply was modified 2 years, 11 months ago by sybok. Reason: Improved the code comments
June 10, 2020 at 10:17 am #37196Forum Admin
anticapitalista
::There might be a way to do this via setting locale (export) in ~/.bashrc or ~/.profile or /etc/bash.bashrc
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
June 10, 2020 at 10:29 am #37197Member
sybok
::@anticapitalista:
Yes, that’s much simpler than my original proposal.(Strange, I did that today in the morning to setup a (language+)encoding on a mail server I use in order to display some Czech characters correctly and I did not mention it here…)
In my case, I have added these two lines to my ‘~/.bashrc’
export LC_ALL=en_US.utf8 export LANG="$LC_ALL"- This reply was modified 2 years, 11 months ago by sybok.
July 16, 2020 at 11:51 am #38975Anonymous
::let me share my observations:
1. GRUB speaks your default language, so it will not be in English
2. When an app launches another app, the 2’nd one may inherit the language of the 1’st one. For example, antiX updates icon that sits in the system tray launches GUI window and then terminal window which content will not be in EnglishI have switched default to English and run selected apps via
env LC_ALL=July 18, 2020 at 1:12 pm #39087Moderator
Brian Masinick
::By default, the same locale applies to both GUI and console.
Since unicode support in console is bad enough to not use it, is it possible to have GUI localized whereas have console entirely in English?I should have communicated earlier.
Unless the Linux behavior is different from the UNIX behavior, whatever locale used to login will be the default locale for every application. You can, however, override any environment variable necessary to run a specific application in another locale.
For example LANG=C xterm
will start xterm in the default locale regardless of the other environment settings and you can prepend LANG or another environment variable to any commands and you can put these in a script or login configuration..bashrc is a legitimate place to set different locale information or you can source any executable script as needed and it will work during the current login.
--
Brian MasinickJuly 18, 2020 at 1:15 pm #39088Moderator
Brian Masinick
::By default, the same locale applies to both GUI and console.
Since unicode support in console is bad enough to not use it, is it possible to have GUI localized whereas have console entirely in English?Short answer is yes.
--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.