1. Overview
Depending on our location, we may need to change the first day in the GNOME Calendar in Linux. In addition, this task becomes essential to align with global standards and enhance organizational efficiency in professional environments.
In this tutorial, we’ll check out methods for setting Monday as the first day in the GNOME Calendar in Linux.
Notably, our examples involve changing the time format to Ireland in a Ubuntu 22.04 GNOME desktop.
2. Problem Statement
In Linux environments, the GNOME Calendar adheres to the locale settings configured on the system. These locale settings reflect different aspects of the user interface, such as date and time format. Moreover, we can also set the first day of the week in the GNOME calendar using the system’s locale settings.
For instance, based on the default configuration of our current locale, Sunday is set as the first day of the week in the GNOME Calendar:
However, we might prefer Monday as the first day of the week.
To apply that setting, we can configure our current locale to a country such as Ireland, which considers Monday as the first day in the GNOME Calendar.
For this, we can use different methods, such as editing the /etc/default/locale file, a specific locales file, using the System Settings, Language Support, and the Week Start on Monday Again… GNOME shell extension.
3. Editing the /etc/default/locale File
/etc/default/locale is a system-wide configuration file used to define locale-related environment variables. Moreover, it enables us to determine language, character encoding, and date and time formats for different applications across the system.
In addition, we can edit the /etc/default/locale file to set Monday as the first day in GNOME.
First, we open the /etc/default/locale file using a text editor such as nano:
$ sudo nano /etc/default/locale
Within the file, we set the value of the LC_TIME environment variable as en_IE.UTF-8:
LC_TIME="en_IE.UTF-8"
In this case, the LC_TIME variable updates the date and time formatting according to the IE or Ireland locale.
After adding the code, we press CTRL+O and Return to save the /etc/default/locale file and CTRL+X to exit the nano editor:
Then, we go to the Activities menu, type Log out, and open the prompt window:
Next, we click the Log Out button to log out from the current session:
After that, we enter the password to again log in to the system:
Now, we open the GNOME Calendar from the top bar to check the result:
Thus, we can now see Monday is the first day in the GNOME Calendar on Linux.
4. Editing a Specific locales File
We can also edit a specific locales file associated with the current locale to set Monday as the first day in the GNOME Calendar of the system. This approach enables us to make changes in the format of the GNOME Calendar without changing the current locale.
To apply modifications to the locales file, we first check our current locale setting related to time:
$ locale | grep LC_TIME
LC_TIME=en_CA.UTF-8
Let’s break down this command:
- locale command displays the current locale settings on the system
- pipe (|) operator redirects the output of locale to grep
- grep searches for the line containing the LC_TIME pattern and extracts its value
As a result, we can see that Canadian English en_CA is set as the current locale with the UTF-8 character encoding.
Now, we open the /usr/share/i18n/locales/en_CA file of our locale using the nano editor:
$ sudo nano /usr/share/i18n/locales/en_CA
After that, we look for the first_weekday entry in the file and set its value to 2:
first_weekday 2
Then, we press CTRL+O and Return to save the /usr/share/i18n/locales/en_CA file and CTRL+X to exit the nano editor:
Next, we use locale-gen to regenerate the locale files with sudo privileges:
$ sudo locale-gen
Generating locales (this might take a while)...
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8... done
en_GB.UTF-8... done
en_HK.UTF-8... done
en_IE.UTF-8... done
en_IL.UTF-8... done
en_IN.UTF-8... done
en_ZW.UTF-8... done
fr_BE.UTF-8... done
fr_CA.UTF-8... done
fr_CH.UTF-8... done
fr_FR.UTF-8... done
fr_LU.UTF-8... done
ur_PK.UTF-8... done
Generation complete.
This process may take several minutes to generate the locales based on the updated configuration.
Once the locale generation is complete, we log out of our Linux session, and then log in again to see the changes:
As a result, Monday becomes the first day of the week in the GNOME Calendar on our system.
5. Using System Settings
System Settings offers a more intuitive and user-friendly interface for setting Monday as the first day in the GNOME Calendar on Linux.
For this, we bring up the Activities menu, type Settings, and open the application:
Then, we go to the Language and Region settings and click on the Formats option:
Next, we select Ireland from the Common Formats list and click Done:
After that, we click the Restart button to restart the session for changes to take effect:
Then, we click on the Log Out option to log out from the current session:
After logging in again, we open the GNOME Calendar of our system:
Consequently, Monday is now the first calendar day.
6. Using the Language Support Utility
In Linux, the Language Support utility is used to manage language-related configurations. For instance, we can use it to set Monday as the first day of the week in the GNOME Calendar.
To do so, we open the Activities menu, type Language Support, and open it:
Next, we switch to the Regional Formats tab and click on the current format, which is English (United States):
Then, we select English (Ireland) format from the drop-down menu:
After that, we click on the Apply system-wide button to apply the format changes throughout the system:
To activate the changes, we log out of the current session and log back in.
Finally, we open the GNOME Calendar to view the new weekday format:
Again, we see our changes are applied successfully.
7. Using the Week Start on Monday Again… Extension
As with other customizations, we can also use the Week Start on Monday Again… extension to set Monday as the first day of the week in the calendar.
For this, we open the Chrome browser, visit the Week Start on Monday Again… GNOME extension page, and click on its toggle:
Then, we click on Install to start the installation of the Week Start on Monday Again… extension:
After a successful installation, let’s open our GNOME Calendar:
Thus, the Week Start on Monday Again… extension automatically sets Monday as the first day of the week in the GNOME Calendar.
8. Conclusion
In this article, we learned different methods for setting Monday as the first day of the GNOME Calendar in Linux.
We saw that editing the /etc/default/locale file, using the System Settings, and the Language support changes the current locale to set Monday as the first weekday. Further, editing a specific locales file enables us to change the GNOME Calendar format without updating the current locale settings.
On the other hand, the Week Start on Monday Again… extension automatically sets Monday as the first day of the week for the GNOME interface after installation.
Ultimately, we can select any of these methods based on our preferences for using the command line or graphical system interface.