home..

How to get Ubuntu Mate 20.04 to show the date next to the time

Linux

How to get Ubuntu Mate 20.04 to show the date next to the time

I wanted to be able to see the date and day of the week next to the clock in the top bar on my Ubuntu Mate 20.04 install. I also wanted to change the clock format from 12-hr AM/PM to the 24-hr format. I wasn’t able to find a way to enable these options in the provided settings menus so I turned to the internet for a way to change it. Searching for solutions I was greeted with the options to add another clock to the top bar panel, one which was configurable to shows the date, or to modify some settings by hand.

So for the sake of my own memory, here are the steps one can take to edit the settings to display the date in your top bar without having to add anything new to the top bar panel.

Assuming you are running stock Ubuntu Mate 20.04 you can go about this two different ways.

  1. You can use the existing command line tool ‘gsettings’ to make the changes or
  2. You can install ‘dconf-editor’ to use a gui tool to make the changes

Before I go any further, a word of warning

Making a mistake while editing the items below may cause some applications on your system to stop working. Always be sure you are entering the correct commands and that they do not contain typos. And of course, one should always have backups in case the worst happens.

These are the changes I made:

command line

Here are the commands to make these changes via command line:

gsettings set com.canonical.indicator.datetime show-date 'true'
gsettings set com.canonical.indicator.datetime show-day 'true'
gsettings set com.canonical.indicator.datetime time-format '24-hour'

dconf-editor

The same changes can be made via the gui using the tool “dconf-editor”

  1. Open dconf-editor (alt+f2, type in dconf-editor or click Menu -> System Tools -> dconf Editor)
  2. Navigate to com -> canonical -> indicator -> datetime
  3. From there you can scroll down until you find the entries for the options you wish to change (show-date, show-day, etc) and click the corresponding toggle on the right to make your change
  4. To change the time format you will need to click on the “time-format” entry, scroll to the very bottom and click on the value for “Custom value”, you will then change this to ‘24-hour’

Regardless of which method you took to edit these values you should have seen the changes take affect as you made the edits.

© 2024 Acid Density   •  Theme  Moonwalk