0

I have Ubuntu 15.10 with unity installed, and then tried to install gnome 3 a week ago. Everything worked just fine, but after a week i thought i would revert to unity since i liked it better.

First i just logged out, chose unity and then logged in again. This brought me in unity, but with flaws. The top panel was there and the sidebar, but there were no desktop (as in no background image, no items on the desktop even though i know there are some there)

I thought i would uninstall gnome 3, but something must have gone wrong, because now when i get into unity i have a background but still not anything on my desktop, and whenever i try to connect a second screen unity freezes and the cpu goes crazy.

I must have uninstalled some packages and dependencies that should have stayed, but now i dont know how to get it back to be fully functional again

so is there a way to reinstall unity from scratch or just fix it?

Sudo apt-get install -f output:

~$ sudo apt-get install -f
[sudo] password for mads: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.2.0-30 linux-headers-4.2.0-30-generic
linux-image-4.2.0-30-generic linux-image-extra-4.2.0-30-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

And sudo apt-get check:

~$ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done

And sudo apt-get install ubuntu-desktop -s

~$ sudo apt-get install ubuntu-desktop -s
[sudo] password for mads: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
ubuntu-desktop : Depends: unity-control-center but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Xorthos
  • 9
  • 3
  • Well, the easiest thing would be to reinstall Ubuntu completely, but you can try a few things first. If you can get to a terminal, run sudo apt-get install -f. If you can't open one, tell me. – TheWanderer Mar 17 '16 at 12:40
  • I added the output to the OP, but it didnt do anything :/ – Xorthos Mar 17 '16 at 12:50
  • But to clarify, i am inside unity right now, and writing this from unity. But when doing things like minimizing some apps (others work just fine) and connecting another screen it just freezes, and the cpu acts crazy. i then need to do a hard reboot. – Xorthos Mar 17 '16 at 12:52
  • Hmm. You could try going into a TTY (ctrl alt f1), and purging and reinstalling Unity, but it might just break things further. – TheWanderer Mar 17 '16 at 12:56
  • That was what i did with GNOME 3 go begin with. – Xorthos Mar 17 '16 at 12:59
  • Is the ubuntu-desktop package installed? – Tobias Mar 17 '16 at 13:06
  • @Xorthos sudo apt-get purge unity-*? – TheWanderer Mar 17 '16 at 13:08
  • @Tobias it dosnt seem so no. i added the output of sudo apt-get install ubuntu-desktop -s to the OP – Xorthos Mar 17 '16 at 13:13
  • @Zacharee should i try that command now from the TTY? i guess there are no way back when i do that. – Xorthos Mar 17 '16 at 13:15
  • @Xorthos try what the answer suggests first – TheWanderer Mar 17 '16 at 13:21
  • @Zacharee1 Purging the unity packages shouldn't affect the instructions in my answer. They would simply install them again if they're necessary. – Tobias Mar 17 '16 at 13:24
  • Just in case, consider running a test to your RAM. – userDepth Mar 17 '16 at 13:24
  • @user3005629 I don't think that's it at all – TheWanderer Mar 17 '16 at 13:24
  • I'm not giving a solution. I meant just consider because I never had an unmet dependency make my CPU go crazy. But I had a bad card and I had all sorts of freezing and CPU's going crazy. Changed the cards and everything ran smoothly. – userDepth Mar 17 '16 at 13:31
  • As an update i have installed gnome again and it works on all the areas that unity failed on such as dual screens and so on.

    I purged unity-* from tty1, then installed unity again (with unity, not ubuntu-desktop). Since that didnt work i then installed gnome too from tty1, but when booting with gdm i was unable to log in. Using lightdm to log into gnome however works fine.

    I think the solution might end up beeing a full reinstall of ubuntu, but at least now i have a working setup so i can do the reinstall when i got time.

    Would prefer a non reinstall solution :/

    – Xorthos Mar 17 '16 at 15:52

1 Answers1

0

First off you need to resolve the issue with the held broken packages, see this Unable to correct problems, you have held broken packages then proceed with the below

Install the ubuntu-desktop package. This should install everything necessary for the 'normal' Unity experience.

sudo apt-get install ubuntu-desktop

If that doesn't work, you can try reinstalling all the dependencies of ubuntu-desktop with

sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y

Command borrowed from: Reinstall package and its installed dependencies

Tobias
  • 1,608
  • So far i have not been able to do either of the commands you listed, simply because i have not been able to fix the stuff with broken packages. I have checked every thread i can find, but with no luck simply because every tool and command says that there are no broken packages.....

    I went into tty1 and purged unity-*, and then installed both unity (with unity. not ubuntu-desktop) and gnome again. And right now only gnome works, but it seems like it works with no problems. Although i can only log into gnome with lightdm, not gdm :/ Some crazy stuff is going on here

    – Xorthos Mar 17 '16 at 15:51
  • Have you had a look at this one? http://askubuntu.com/questions/537263/reinstall-ubuntu-desktop-after-removing-gnome It is a very similar issue, and it suggest that if you install the dependency mentioned when you run sudo apt-get install ubuntu-desktop (and repeat that) eventually you'll run into the package that 'won't just install' and if you can find a way to install that one, you're good to go. – Tobias Mar 22 '16 at 11:56