Can't get out of unity

Back from timeout (hit max. # of replies for newbie):

$ sudo vi /etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10

$ update-grub

Rebooted to other kernel, no change.

I’m looking some other stuff:

$ cat /etc/X11/default-display-manager
/usr/sbin/gdm3

$ ls /usr/share/xsessions
unity.desktop

$ cat /usr/share/xsessions./unity.desktop
[Desktop Entry]
Name=Unity
Comment=This session logs you into Unity
Exec=/usr/libexec/run-systemd-session unity-session.target
TryExec=/usr/bin/unity
Type=Application
DesktopNames=Unity;Unity7;ubuntu;
X-Ubuntu-Gettext-Domain=gnome-session-46

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?

The laptop (20.04) I’m trying to retire has two entries in /usr/share/xsessions: ubuntu.desktop and unity.desktop.

Ubuntu 24.04 (Gnome 46) > /usr/share/xsessions has two files:-
ubuntu.desktop and ubuntu-xorg.desktop

ubuntu.desktop - contents below

[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
TryExec=/usr/bin/gnome-shell
Type=Application
DesktopNames=ubuntu;GNOME
X-GDM-SessionRegisters=true
X-GDM-CanRunHeadless=true
X-Ubuntu-Gettext-Domain=gnome-session-46

ubuntu-xorg.desktop - contents below

[Desktop Entry]
Name=Ubuntu on Xorg
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
TryExec=/usr/bin/gnome-shell
Type=Application
DesktopNames=ubuntu;GNOME;
X-GDM-SessionRegisters=true
X-Ubuntu-Gettext-Domain=gnome-session-46

You could create the files and copy the contents to the correct destination and then run

sudo dpkg-reconfigure gdm3

May work, may not?

That didn’t work.

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”.

I seem to have missed this. What are the “radical” efforts? All backed up.

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
  • Remove the Unity file from /usr/share/xsessions
  • Terminal commands, one at a time, as follows
sudo apt remove unity
sudo apt purge unity
sudo apt autoremove
sudo apt remove gdm3
sudo apt update
sudo apt install --reinstall ubuntu-desktop
sudo apt install gdm3
sudo dpkg-reconfigure gdm3

Reboot and send my reward in used, small denomination, untraceable paper currency :innocent:

2 Likes

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.

Case closed!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.