Changing date and time position on the lock screen - Ubuntu 20.04

us flag

I'm trying to move the position of time/date/password field in the lock screen. (currently they are on the center).

This post explained how to do it for 18.04, but on 20.04 the mentionned method does not work anymore.

I think the relevant file is /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource and the relevantz css field is

.unlock-dialog-clock {
  color: white;
  font-weight: 300;
  text-align: center;
  spacing: 24px;
  padding-bottom: 2.5em; }

I tried messing with those value, and refreshing gnome via alt+F2, write rt, then enter, without any sucess. Any idea ?

ec flag
This may be a dupe of @nOtis, have you tried this solution?
n0tis avatar
us flag
yes I did, it did not work as I wanted
us flag

Solved, it turns out gnome CSS are compiled and one can't just edit them inplace. One needs to decompile the /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource, edit the .css (unlock-dialog-clock is indeed the correct field) with the desired change, recompile to gresource, then put it back at the correct location. then one needs to refresh gnome to see changes (reboot, or faster : alt + F2, then write rt then enter)

To easily decompile/recompile .gresource file, this repo was super usefull:

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.