2

On a a minimal install of Ubuntu 18.04, I attempted to switch to a vanilla gnome desktop by running: sudo apt-get install vanilla-gnome-desktop

This installation failed due to this bug. This issue is causing all apt-get install and apt-get upgrade's to fail.

I have attempted to remove the broken package(s) with the following commands, to no avail:

hugh@xps:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up gnome-session (3.28.1-0ubuntu3) ...
update-alternatives: error: cannot stat file '/etc/alternatives/gdm3.css': Invalid argument
dpkg: error processing package gnome-session (--configure):
 installed gnome-session package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 gnome-session
E: Sub-process /usr/bin/dpkg returned an error code (1)

and:

hugh@xps:~$ sudo dpkg --remove --force-remove-reinstreq gnome-session
(Reading database ... 166375 files and directories currently installed.)
Removing gnome-session (3.28.1-0ubuntu3) ...
update-alternatives: error: cannot stat file '/etc/alternatives/gdm3.css': Invalid argument
dpkg: error processing package gnome-session (--remove):
 installed gnome-session package pre-removal script subprocess returned error exit status 2
Errors were encountered while processing:
 gnome-session

and

hugh@xps:~$ sudo apt-get install --reinstall gnome-session
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for gnome-session:amd64
1
  • Please add output of the ls -al /etc/alternatives/gdm3.css command to the question.
    – N0rbert
    May 29, 2018 at 20:53

1 Answer 1

3

Usually /etc/alternatives/gdm3.css points to /usr/share/gnome-shell/theme/ubuntu.css. The latter file is located in gnome-shell-common package.
You can reinstall it with:

sudo apt-get install gnome-shell-common --reinstall

If it does not work you can try to fix the problem by recreating the link manually with

sudo ln -s  /usr/share/gnome-shell/theme/ubuntu.css /etc/alternatives/gdm3.css

And then run

sudo apt-get install -f
1
  • 2
    Thanks, this worked - I had to delete gdm3.css and recreate the symlink.
    – kirk
    May 30, 2018 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.