I was adding locations to my world clock in GNOME desktop yesterday, since I want to track the local time of clients and colleagues around the world. I added the cities in the settings panel and went to the notification panel to look for them, but nothing was there.
I thought maybe there was a switch that needed to be flipped, so I tried to open
gnome-tweak-tool. Suddenly, my desktop crashed, and kicked me back to the GDM login screen. I tried to log back in, and it just looped back to the login screen. No good. Tried rebooting and that didn’t help either.
Sometimes running Linux is like a puzzle, and the reward for solving it is getting to use your computer again.
Rebooted and used
Ctrl-Alt-F2 to switch over to a text console and was able to log in that way. Once I logged in, took a look at the systemd journal:
-x“augments log lines with explanation texts from the message catalog” and
-e just moves us to the end of the log (man journalctl).
After some searching in the log, the following error was revealed:
May 2 12:04:20 gnome-shell: JS ERROR: TypeError: b.location.get_timezone(...) is null
Now I was sure it was due to one of the world clock locations. Did a bit more research, and as usual the Arch Linux Forums delivered the following command:
gsettings reset org.gnome.clocks world-clocks
Ran that command,
Ctrl-Alt-F1 to get back to GDM login, and we’re back in business!
It turns out that
gsettingsis a pretty neat little tool that comes with gnome to manage its configuration from the command line. You can run
to get a top level overview of the command. If we run
We get a listing of all schemas. We can see from that list that the
org.gnome.clocks from our command above was one schema out of many. Each schema has a set of keys which define configuration for gnome. If we run
gsettings list-keys org.gnome.clocks
we get a list of keys with values we can change in that schema:
timer geolocation world-clocks alarms
This is where the
world-clocks key resided.
Using this knowledge plus the
reset command allows you to reset any GNOME configuration that locks you out of your desktop in the future. You can also use this tool to automatically configure desktops, backup desktop configuration, etc. Let me know what other uses you find!