First, over at Beginning Linux they mentioned that you can find out which file to edit using the locale command.
# run this in the shell
locale | grep LANG=
LANG=en_US.UTF-8
The second line above (LANG=en_US.UTF-8
) is the output of the command and what we need to note here is that en_US.UTF-8
means that there's a file in /usr/share/i18n/locales/
named en_US
that's being used for my configuration so I made a copy of that file (in case I messed something up) and the opened it up in emacs (any changes you make in this directory have to be done as root).
Now, what that Beginning Linux post and most other posts say to do is to change the line first_weekday 1
(meaning start on Sunday) to first_weekday 2
(start on Monday). The problem with this is that the en_US
file no longer has that line in it, so you have to add it. Not a big deal, I thought, so I added it as the last line in the file and re-generated the configuration using the locale-gen command.
Which gave me errors like this:
Generating locales (this might take a while)...
en_AG.UTF-8...failed to set locale!
en_US:180: syntax error: not inside a locale definition section
done
It turns out that the file is actually broken into sections and you can't just stick the line any old place, you have to stick it in the right block. If you look in one of the other files that has the line (pick one by grepping first_weekday
) you'll see that the block we want starts with LC_TIME
and ends with END LC_TIME
so I put the line in at the end of the block like so:
% Define the first day of the week to be displayed in a calendar.
% This weekday is relative to the date defined in the <week> keyword.
first_weekday 2
END LC_TIME
I copied the comments from one of the Ukranian settings files. I picked Ukranian because I thought UK stood for United Kingdom, but it turns out they use GB to indicate Great Britain instead - anyway, it works. The comment suggests that you might also be able to change the week
definition instead of adding this line, but here's what that line looks like.
week 7;19971130;1
It seems safer to stick with the first_weekday
.
Next I re-ran the locale-gen command.
sudo locale-gen
And this time it ran without errors.
So, all fixed, then, right? Well, not quite, because this doesn't update the GUI. There are, once again, many pages telling you how to reload the GUI without logging out, but some, like the Beginning Linux page use names of processes or commands that don't seem to exist any more, or, in one case caused the GUI to raise an error message so I decided it wasn't really worth it to mess with the GUI like that when all you have to do is log out and back in - or not care about it until the next time you log in.