View Full Version : HOWTO: Set Gnome Calendar First Day of Week
drs305
May 31st, 2008, 09:52 AM
Here is how to change the gnome calendar first day of the week to Monday.
Check which locale you are using (mine is en_US, don't worry about the .UTF ending):
locale
Next, backup and edit the applicable locale file (use the result of the previous command if not en_US).
sudo cp /usr/share/i18n/locales/en_US /usr/share/i18n/locales/en_US.bak
gksudo gedit /usr/share/i18n/locales/en_US
Locate the following line and change the value. The value for Monday in en_US was 2. Select the appropriate number if you desire another day to be the start day.
first_weekday 2
Save the file and then:
Update the locales:
sudo locale-gen
Refresh the desktop:
killall gnome-panel
The first day should now be Monday \\:D/
qalisto
June 14th, 2008, 07:00 AM
Magnificently useful! Thank you.
executor
June 14th, 2008, 10:30 AM
Thank you
malath
June 14th, 2008, 10:48 AM
Is saturday weekday number 7?
drs305
June 14th, 2008, 02:57 PM
Is saturday weekday number 7?
Yes, in the US en at least. Sunday is the first day and Saturday is day 7.
Selmi
July 19th, 2008, 03:04 PM
perfect, i didn't wanted to use slovak localisation because its very incomplete, and this week start from sunday was driving me crazy. (btw, its possible to set 24h time, celsius temperatures, kilometers per hour for wind - why not start of week????)
thanks a lot
Darkshade
July 21st, 2008, 08:58 AM
Thanks! That was simple but really usefull at the same time. Just when I thought that I would never find a fix for it :)
pmorch
October 7th, 2008, 03:08 AM
While this is usefull and will do the trick temporarily, it will only work until the "locales" package (which contains the /usr/share/i18n/locales/en_US file) is updated or reinstalled, because then this file will be overwritten/replaced with a new one from the locales package again.
Is there a bug / changerequest for this issue? I think it should be something one can change in the calendar applet, as Selmi pointed out: "its possible to set 24h time, celsius temperatures, kilometers per hour for wind - why not start of week????"
And FYI: This is not just a cosmetic thing; it affects week numbers too. Some years will have an offset of one for week numbers, depending on what the first day of the week is. I think in years where the first day is a monday (although I'm not 100% sure exactly when/how this offset occurs)
Peter
jaumellarden
January 18th, 2009, 09:31 AM
Hi,
I happened to have the same problem with openSUSE, which doesn't include locale-gen. Instead of doing this:
$ sudo locale-gen
I had to do this:
$ gunzip -c /usr/share/i18n/charmaps/UTF-8.gz > /tmp/UTF-8
$ sudo localedef -i /usr/share/i18n/locales/en_US --charmap /tmp/UTF-8 /usr/lib/locale/en_US.utf8
$ rm /tmp/UTF-8
I know, not really Ubuntu-related, but hopefully useful :-)
Best regards,
jaume
AbtZ
January 29th, 2009, 12:55 PM
perfect, i didn't wanted to use slovak localisation because its very incomplete, and this week start from sunday was driving me crazy. (btw, its possible to set 24h time, celsius temperatures, kilometers per hour for wind - why not start of week????)
thanks a lot
Because it's Gnome, and the Gnome philosophy seems to be "Remove as many options from the user as possible! Then we get a better and cleaner interface!!". From what I've heard the option to change first day of week was included before, but they REMOVED it.
Anyway, thanks a million for the tip! I like running my OS in English, but starting the week on a Sunday is not for me.
artm
February 25th, 2009, 02:04 PM
see also http://ubuntuforums.org/showthread.php?p=6798112#post6798112 for a solution without editing package files.
pmorch
February 25th, 2009, 03:44 PM
see also http://ubuntuforums.org/showthread.php?p=6798112#post6798112 for a solution without editing package files.
Thanks, artm, works perfectly. And avoids messing with files that are overridden by apt-get upgrade later. Just grand.
nico80
April 28th, 2009, 08:02 AM
Thank you very much!
Having Sunday as first day was really annoying.
I'm actually using Fedora, but it works the same, only little thing I had to change is the locale-gen call (as it is an Ubuntu-specific command) with:
sudo localedef -f UTF-8 -i en_US en_US.UTF-8
smiletobehappy
June 21st, 2009, 05:56 AM
Thank You very much!
Very helpful tutorial, works perfectly with Ubuntu 9.04 Jaunty.
XCan
July 12th, 2009, 02:08 PM
I had seen bunch of other ways to do this, but they all imposed some locale errors in especially Python scripts. This has so far worked wonderful, thanks!
petike
October 8th, 2009, 04:08 PM
It works perfectly!
Great article - "easy", "fast" and "reliable".
kevinguillorytraining
October 9th, 2009, 04:50 AM
Very useful. Where I can get other days code? i.e. Friday and Saturday.
drs305
October 9th, 2009, 06:44 AM
Very useful. Where I can get other days code? i.e. Friday and Saturday.
For the US, Friday should be 6 and Saturday 7. I don't know of a listing, so you would just have to experiment. Since I wrote this guide it would seem there are probably other ways to set the DOW.
For instance, Evolution's start day can now be set with gconf-editor:
gconf-editor /apps/evolution/calendar/display/week_start_day
In Evolution, Sunday is 0 and Saturday is 6.
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.