From what I’ve read, the /usr/share/xsessions directory is where the “gear” options come from. Since there’s only one entry in this directory, I suppose that means there’s only one option, which would explain why the “gear” doesn’t show up.
This raises the question: What happened to the other options that used to be there?
I went into a tty from the login screen and executed as root (from ubuntu.desktop): $ env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
Then I tried:
$ dpkg-reconfigure gdm3
Then back to the login screen → no change, still no “gear”.
When you discovered in post 22 that there were missing files in /usr/share/xsessions, I’m not convinced that there is a sensible way to remove unity and revert back to Gnome
Also, there may be other missing or corrupted files undiscovered at the moment.
Anyway, you have backups and a re-install/restore data is not an onerous task.
I cannot test my suggestion because I cannot reproduce the condition of your PC on my system.
This could make your PC unbootable, but nothing ventured, nothing gained.
Keep your backups in a safe place - you’ll probably definitely need them.
Don your suit of armour and arm yourself with a trusty battleaxe:-
Return to post 24 and populate /usr/share/xsessions with the two Ubuntu files
I got some help from another discourse that removed the urgency, so I’m not so anxious to try something so “radical” and before I do such an experiment, I’m curious if there’s a way to exit the DM and go completely on tty.
After installing ubuntu-desktop (which for some reason was no longer installed) and rebooting, the login screen has the gear and I’m now in ubuntu desktop.