Request: An option to install only the locales we need

Report Bugs, Issues and non- package Requests
Message
Author
User avatar
AK-47
Developer
Posts: 1207
Joined: Sun Mar 24, 2019 7:04 pm

Re: Request: An option to install only the locales we need

#11 Post by AK-47 »

@MikeR Yeah but no. I'm not keen on incorporating a third-party tool that will probably end in a disaster for users. We have MX Cleanup, this should be sufficient for most users to clean up unused space from their MX Linux system. Beyond MX Cleanup and supplied package management tools, you're on your own.

If it works for you then great, but I don't see what this has to do with the OP's suggestion.

Nokkaelaein
Posts: 301
Joined: Fri Jul 17, 2020 10:32 am

Re: Request: An option to install only the locales we need

#12 Post by Nokkaelaein »

AK-47 wrote: Sat Jun 07, 2025 9:17 am I don't see what this has to do with the OP's suggestion.
It removes selected locales completely from disk, addressing OP's "saving disk space by removing unused locales" wish. I've done this to no ill effect in the past. However, I agree with your caution, and wouldn't recommend this as a safe tool for common use, as a whole. One needs to know what they are doing with this one, with all the erasing options present.

User avatar
b3ta
Posts: 64
Joined: Mon Aug 20, 2018 4:34 am

Re: Request: An option to install only the locales we need

#13 Post by b3ta »

Eadwine Rose wrote: Sat Jun 07, 2025 5:37 am Please use regular colors, as coloring makes text harder to read for some of our members.
I'd love to, Eadwine; here is my story. I'm sorry if it ruffles feathers, but I'm just recounting my experience here. It relates to both colour and code.

Colour

I would really like to write posts which can be read with equal ease by those who prefer light backgrounds and those who (like me) really struggle with them and prefer dark backgrounds on their screens. Sadly, a fair number of requests to have that enabled on this board have been denied and shut down. Thus I (and others like me) are forced to use work-arounds which sometimes cause other sites to break. I was hoping that this colour is easy to read in both a light and a dark background. It appears I was wrong.

Code

In a related vein, it is really useful to be able to indicate in-line code as such. My request to enable in-line code was also denied, and I was told to use code blocks instead. In other words, I was told that the [icode] tag would not be enabled. Using code blocks instead of inline means posts will be horrible to read because each otherwise in-line bit of code will now be a separate block, vertically interrupting the sentence. So I resorted to changing the colour, but see above.

Actually, installing the Markdown plug-in (https://www.phpbb.com/customise/db/extension/markdown/) would make other things easier as well, plus users can enable it themselves if they want to use it.

Anyway, I'll see how it goes using code blocks everywhere.

User avatar
fehlix
Developer
Posts: 12700
Joined: Wed Apr 11, 2018 5:09 pm

Re: Request: An option to install only the locales we need

#14 Post by fehlix »

b3ta wrote: Sat Jun 07, 2025 2:04 am This will kill two birds with one stone:
As others stated, user can cleanup anything they like before running the installer. simple tools the reduce compiled locale archived exists like mx-locale
and further any type of removal tool for other locale related files, like bleachbit or similar dangerous tools.
So cleanup of not-needed locales would better stay out of scope of the installer.

User avatar
b3ta
Posts: 64
Joined: Mon Aug 20, 2018 4:34 am

Re: Request: An option to install only the locales we need

#15 Post by b3ta »

@MikeR Yes, I am aware of

Code: Select all

Bleachbit
, but as per fehlix's post (viewtopic.php?p=789332#p789332), the next package upgrade will put it all back again, while

Code: Select all

localepurge
can deal with that.

@AK-47

Code: Select all

Bleachbit
can be used for this, but requires an extra work-around to keep the changes. Also,

Code: Select all

Bleachbit
does a lot more, and if you don't use it correctly, you can blast way more than you intend to. My suggestion is to look at the code for

Code: Select all

localepurge
, as it's quite well written and documented, so incorporating its functionality should not add too much of a maintenance requirement. Just note its entry under

Code: Select all

/etc/apt/apt.conf.d/99-localepurge
, as you'd need that as well.

A simple approach would be to give users the choice at installation time (just like you do with creating the default and root users) to decide whether they want to trim their locales then or later. If they go for it, just install

Code: Select all

localepurge
at the end of the installation process (probably in a

Code: Select all

chroot
environment), given the next paragraph.

A point from my experiences today: be aware that installing

Code: Select all

localepurge
triggers

Code: Select all

dpkg-reconfigure localepurge
as part of the installation process and theirs doesn't have a

Code: Select all

Cancel
option. So be ready to configure it, as breaking out of

Code: Select all

dpkg-reconfigure localepurge
causes some pain involving the process table to get the whole

Code: Select all

apt
ecosystem happy again.

I haven't used antiX for years, but doubt this would break anything there.

Now I need to go and use a screwdriver on real hardware (a heater) to maintain household harmony ;-)

User avatar
AK-47
Developer
Posts: 1207
Joined: Sun Mar 24, 2019 7:04 pm

Re: Request: An option to install only the locales we need

#16 Post by AK-47 »

@b3ta Feel free to provide a patch to review, code is here: https://github.com/gazelle-installer/ga ... ree/trixie
(fun fact: that's how I ended up on the dev team)

I can't read your post very well without straining myself because of your colors and formatting, this is unnecessary and makes your posts exceptionally hard to read. If you want to make your posts easy to read for all users, just avoid the fancy colors altogether. It would take me a while to decipher that post, so sorry if I am not addressing the whole thing.

User avatar
oops
Posts: 1913
Joined: Tue Apr 10, 2018 5:07 pm

Re: Request: An option to install only the locales we need

#17 Post by oops »

... Maybe you can only modify after the MX install and by hand the file: /etc/locale.gen to only keep your locales ( # Other-Locales ).

Code: Select all

locale -a #to list

# my locale here:
cat /etc/locale.gen | grep -v "#"

en_GB.UTF-8 UTF-8
en_US ISO-8859-1
en_US.UTF-8 UTF-8
fr_FR@euro ISO-8859-15
fr_FR ISO-8859-1
fr_FR.UTF-8 UTF-8
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
DukeComposed
Posts: 1395
Joined: Thu Mar 16, 2023 1:57 pm

Re: Request: An option to install only the locales we need

#18 Post by DukeComposed »

oops wrote: Sat Jun 07, 2025 11:10 pm ... Maybe you can only modify after the MX install and by hand the file: /etc/locale.gen to only keep your locales ( # Other-Locales ).
I've done something similar in the past with not inconsiderable success:

Code: Select all

  echo en_US ISO-8859-1   > ${TARGET}/etc/locale.gen
  echo en_US.UTF-8 UTF-8 >> ${TARGET}/etc/locale.gen
  chroot ${TARGET} env DEBIAN_FRONTEND=noninteractive locale-gen "en_US.UTF-8"
  chroot ${TARGET} env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
It shaves a couple minutes off of a new install without impacting textual behavior.

User avatar
oops
Posts: 1913
Joined: Tue Apr 10, 2018 5:07 pm

Re: Request: An option to install only the locales we need

#19 Post by oops »

DukeComposed wrote: Sun Jun 08, 2025 1:50 am
oops wrote: Sat Jun 07, 2025 11:10 pm ... Maybe you can only modify after the MX install and by hand the file: /etc/locale.gen to only keep your locales ( # Other-Locales ).
I've done something similar in the past with not inconsiderable success:

Code: Select all

  echo en_US ISO-8859-1   > ${TARGET}/etc/locale.gen
  echo en_US.UTF-8 UTF-8 >> ${TARGET}/etc/locale.gen
  chroot ${TARGET} env DEBIAN_FRONTEND=noninteractive locale-gen "en_US.UTF-8"
  chroot ${TARGET} env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
It shaves a couple minutes off of a new install without impacting textual behavior.
Thanks for sharing.
My procedure only shaves a couple minutes off when locales are upgraded.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
CharlesV
Global Moderator
Posts: 7333
Joined: Sun Jul 07, 2019 5:11 pm

Re: Request: An option to install only the locales we need

#20 Post by CharlesV »

DukeComposed wrote: Sun Jun 08, 2025 1:50 am
I've done something similar in the past with not inconsiderable success:

Code: Select all

  echo en_US ISO-8859-1   > ${TARGET}/etc/locale.gen
  echo en_US.UTF-8 UTF-8 >> ${TARGET}/etc/locale.gen
  chroot ${TARGET} env DEBIAN_FRONTEND=noninteractive locale-gen "en_US.UTF-8"
  chroot ${TARGET} env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
It shaves a couple minutes off of a new install without impacting textual behavior.
Oh I like that! Thank you for sharing that one and THAT is going in my notes :-)
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Post Reply

Return to “Bugs and Non-Package Requests Forum”