565

When I login, nothing happens.

I am presented with my desktop wallpaper.

Blank desktops suck

No Dash, no Launcher, nothing.

fossfreedom
  • 172,746
jrg
  • 60,611
  • 1
    IMHO this is a bug, but I have this since today. Could only find this bug https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1212987 I followed the recommendations here: http://askubuntu.com/questions/17381/unity-doesnt-load-no-launcher-no-dash-appears/286349#286349 Unity did reset but is not working OK, workspaces don't work, even if I enable or disable or change amount. No difference. Put plugin also crashes unity, – Janghou Aug 16 '13 at 09:58
  • 2
    My problems started after switching from nouveau drivers to NVIDIA drivers (system settings / hardware tab). – DanielaWaranie Dec 18 '14 at 12:35
  • i had this problem because my hard drive had filled up without my realising it. clearing up some space let me get into the desktop again. – Nacht Dec 20 '14 at 07:36
  • 19
    After many spent days and many SO threads read, I found that this seems to be an Ubuntu open Bug (Status 'Incomplete' as of Juli 2015). More information about it here: https://bugs.launchpad.net/ubuntu/+bug/1285444 The quick solution seems to be: $ mv ~/.config/dconf/user ~/.config/dconf/user.old – user9869932 Jul 08 '15 at 19:04
  • The only thing which worked for me (Ubuntu 14.04) was to create a new user from the command line and run startx in a hard terminal (I couldn't even login with GUI) to login with that new user (after startx, guest user would also work fine). – Rui Marques Oct 14 '15 at 16:48
  • 1
    @julianromera's was the only solution on this thread that helped me – Dziamid Dec 29 '15 at 07:26
  • 1
    @julianromera answer was the only one that worked for me. – Paweł Adamski May 11 '16 at 11:50
  • I solved opening the terminal with Ctrl+Alt+F1 and then sudo apt-get update, sudo apt-get -f upgrade, sudo apt-get --reinstall ubuntu-desktop unity, sudo service lightdm restart – collimarco May 14 '16 at 09:27

35 Answers35

484

This answer applies to versions of Ubuntu running Compiz.

This answer assumes Unity is being run through Compiz. If you don't have compiz installed (ex: on non-Unity versions of Ubuntu, such as the Gnome-based Ubuntu 18.04 and later) this answer doesn't apply to you.

You just need to turn the Unity plugin back on. The problem is this is a pain in the bottom because you've now got no graphical method to do this. So:

  1. Try to open a terminal with Ctrl+Alt+T.
    This may not work but you can try right clicking on the desktop and selecting "Open terminal here." Otherwise, you may need to change to a "hard" terminal by pressing Ctrl+Alt+F1 and log in.

  2. Install compizconfig-settings-manager by running

    sudo apt-get install compizconfig-settings-manager
    
  3. Then run it with this:

    DISPLAY=:0 ccsm &
    

    The first part tells the terminal which display you want it to load on (otherwise it won't have a clue).

  4. If you switched to a TTY in step 1, switch back to the graphical server by pressing Ctrl+Alt+F7 (or Ctrl+Alt+F8 sometimes).
    There there should be a CompizConfig Settings Manager waiting for you.

  5. Find the Unity plugin. Enable it (detailed instructions just below). You will be asked "Ubuntu Unity Plugin requires the plugin OpenGL. Enable Ubuntu Unity Plugin / Enable OpenGL"

    • 1) To enable the Unity Plugin: Click "Desktop" (left side) --> Ubuntu Unity Plugin. You can also type "unity plugin" into the "Filter" search box. Screenshot: enter image description here
    • From here, click the checkbox for "Enable Ubuntu Unity Plugin": enter image description here
    • 2) To enable OpenGL: click "General" (left side) --> then check the box for "OpenGL", as shown below. You can also type "opengl" into the "Filter" search box to bring it up. enter image description here
  6. Everything should spring into life but if it doesn't, you might have to restart. You can do that by going back to the terminal and running sudo reboot.

Oli
  • 293,335
  • I just got the same issue (thanks for the answer). In CCSM I saw that all my plugins had been removed. Any idea why such a thing could have happened? – Shahbaz Mar 11 '13 at 23:21
  • 3
    (But none of the answers here got it back, nevertheless) – Shahbaz Mar 11 '13 at 23:42
  • 27
    Worked perfectly well for me. As a side note, I did not need to enter the TTY terminal, was able to use the terminal shortcut (ctrl + alt + t). – Tass Apr 24 '13 at 16:47
  • In fact this is what I used to get rid of unity and now my desktop is super minimalistic. I installed gnome-do and few keyboard shortcuts and it works awesome without any wastage of screen real estate. – harry Oct 01 '13 at 04:53
  • 13
    If you get to step 5 and don't see unity on the list, try this: sudo apt-get -f install && sudo apt-get --reinstall install unity – Collinux Mar 18 '14 at 01:18
  • For me some parts of the window manager again crashed after I first enabled the unity plugin, during which I was asked to also enable required dependencies such as the plugins 'scale' and 'expo'. It helps to always keep a terminal open. Then one can try to restart the window manager by typing compiz & in that terminal and then repeat to enable the unity plugin. – cfi Mar 24 '14 at 00:40
  • 16
    Had this problem myself but I'm unlucky with the solution far, doesn't work for me, still get the same empty screen on Ubuntu 14.04 LTS 64bit. Will go over the steps again to check if any thing was missed. Lenovo X201S Thinkpad i7 2.0Ghz 8Gb RAM. Never had this issue with 12.04 LTS – therobyouknow May 19 '14 at 16:24
  • 3
    Tip: @Shahbaz For me, I found that the original problem was for one of my accounts. When I logged into another account everything was normal. So my approach to the problem would be to move any valuable personal files from the faulty account to the working account, delete the faulty account and the recreate it and move the files back. – therobyouknow May 20 '14 at 08:13
  • I had this problem and it was because the unity plugin got deactivated somehow. Using ccsm, selecting the unity plugin and putting a check in the box to enable it did the trick for me. – mchid Jun 04 '14 at 12:06
  • 12
    The fact that this is problem so common and long-lasting is, to me, rather disturbing. Does anyone know why this keeps happening, and what's causing it? – fouric Nov 21 '14 at 22:38
  • This solution doesn't work, I can only log with one of my accounts on atrl-alt-f7, with the others I'm kicked out. My pc has become almost useless. No solution in this page has worked. – jimifiki Dec 18 '14 at 04:22
  • This solution does not work for me. This really should have been added to an existing answer in order to improve it! http://askubuntu.com/a/18996 as should many of the other suggestions/answers :) – geezanansa Feb 14 '15 at 15:17
  • 1
    We just used your answer in class to get back Unity that professor borked after messing with a bunch of things :) – No Time Feb 25 '15 at 16:14
  • This (partially) worked for me, thanks! What's still messing is the menu bar with the controls for sound, networks, etc. – Steve Kroon Mar 02 '15 at 18:34
  • 11
    ccsm hangs on Loading Icons, but if I ctrl-alt-F7 back to the main display, the compiz options ARE there. I've enabled the Unity desktop, switched back to tty1 (ccsm has executed successfully)... but no Unity. Reboot: no Unity. If I reload ccsm, Unity is still selected and "on" but no Unity appears. – JeanSibelius Mar 07 '15 at 13:50
  • is this a good solution if we have a NVIDIA linux grafics card driver installed? Thanks for that. I heard, that compiz might conflict with that? – Gabriel Jun 14 '15 at 09:38
  • There is no unity setting for me. And is everything in compiz supposed to be disabled? It was by default – Gradyn Wursten Sep 21 '15 at 23:31
  • Yesterday my Ubuntu 15.10 was working, today it got stuck in a login loop after installing uodates. (I thought only Windoze did this). The compiz config setting manager seems to have worked for me. – Nigel Ellis Nov 22 '15 at 14:53
  • @Oli I did what you recommended above and got the unity launcher but I have to drag the cursor there to display it,means It is not continuous displaying Unity launcher how can I fix it. – Rahul Raj Nov 27 '15 at 16:53
  • god bless your soul! @Oli – Lucian Tarna Feb 09 '16 at 07:48
  • @Oli Such a really Good Answer i have fixed my issue thank you so much .. – DaSaDiYa ChaiTAnYa Feb 11 '16 at 10:19
  • Without GUI how we can connect to internet?? How we can install compiz manager without connect to internet.. Please.. Can anyone explain the process.. – Yuvaraj V Mar 09 '16 at 04:50
  • 2
    I have been stopped in step 3. It is saying "Invalid MIT-MAGIC-COOKIE-1 " – Priyadarshi Paul May 16 '16 at 18:57
  • Should this be possible in Lubuntu 14.04 as well? It doesn't seem to be for me. Have tried all steps, but even after installing Unity and checking it's enabled I don't get anything on desktop. Is there an alternative for Unity for Lubuntu? – Ingrid Jul 04 '16 at 18:04
  • 1
    @Ingrid No. Lubuntu doesn't use Compiz so unless you've added it, it's unlikely to help. – Oli Jul 04 '16 at 22:01
  • 1
    Unfortunately, this solution is not applicable to Ubuntu 16.04. – Luís de Sousa Aug 02 '16 at 18:17
  • 2
    I agree with Luis de Soussa. I'm also using 16.04. I cannot get my taskbar or the titlebar/system bar to show at all using this method. – jetimms Aug 11 '16 at 12:23
  • 2
    I tried followi g this solution for 16.04 LTS. It doesn't seem to apply the settings when I enable the Unity Plugin. I try a second time, and the checkbox is unchecked! Any ideas why? – jvriesem Nov 01 '16 at 19:48
  • Thanks so much for this answer. My main system is running ubuntu and if I had not gotten this up I probably would have lost more than a ubuntu installation –  Feb 11 '17 at 18:26
  • I try this sudo apt-get -f install && sudo apt-get --reinstall install unity – Thilina Sampath Mar 14 '17 at 03:53
  • Its working only once for me, when I restart, I'm back to the same issue. – Dushyant Bangal May 24 '17 at 09:28
  • @jvriesem how did you solve the problem? I can't enable the Unity plugin as well. – Sasha Shpota Mar 07 '18 at 21:56
  • @OleksandrShpota I didn’t fix it. I stopped using Linux for many months in frustration. :-( – jvriesem Mar 09 '18 at 14:51
  • I get ImportError: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Reference_Face – OrangeDog Dec 17 '18 at 11:44
  • For everyone with Ubuntu 16.04 or get the "Invalid MIT-MAGIC-COOKIE-1" problem like I did, the solution you are looking for is likely way down here: https://askubuntu.com/a/827296/452147 – Frikster Jan 09 '19 at 03:44
  • How do you know if you have compiz installed? Adding how to know if you have compiz installed to the top of this question would be very helpful. I initially glossed over this answer because I don't know what compiz is and didn't know if I have it. I'm running Ubuntu 14.04. Apparently I have it installed, so this answer worked for me. – Gabriel Staples May 24 '19 at 15:44
174

A solution good for me (has solved the same problem):

in a terminal:

export DISPLAY=:0   
sudo dconf reset -f /org/compiz/

and then

setsid unity
user155373
  • 1,749
  • 1
  • 10
  • 2
  • Yep, works great with 13.10 too, greatly resets the buggy hud – JB. Feb 08 '14 at 17:58
  • 3
    Fantastic. Works with Ubuntu Linux 13.04 Desktop in Parallels on Mac OS X. – Elliot Jul 01 '14 at 06:47
  • 4
    Thanks! Works with Ubuntu 14.04 too. I wonder why this happened out of the blue though :-( – Sadi Jul 30 '14 at 09:28
  • 5
    I needed export DISPLAY=:0 first. – Uri Oct 06 '14 at 17:30
  • 1
    The first command did the trick for me. (Had to additionally export DISPLAY=:0 and set the DBUS_SESSION_BUS_ADDRESS variable as outlined in http://askubuntu.com/questions/457016/how-to-change-gsettings-via-remote-shell) – Janaka Bandara Nov 27 '14 at 01:00
  • ERROR: Plugin 'opengl' not loaded. What does it mean? – jimifiki Dec 18 '14 at 04:10
  • 1
    Worked perfectly for me.. – Amandeep Singh Feb 15 '15 at 06:33
  • 7
    sudo dconf reset -f /org/compiz/

    Error spawning command line 'dbus-launch --autholaunch=c0c0f8bf86119c64ccb710000000006 --binary-syntax --close-stderr': child process exited with code 1

    – JeanSibelius Mar 07 '15 at 13:54
  • this worked for me on 14.04 – Mandeep Singh Apr 02 '15 at 14:23
  • 1
    Thanks! This really dug me out of a hole. Just to add that if like me, Unity had lost the ability to run a terminal with ctlr+alt+t, then just type ctrl+alt+F1, and drop into a command line screen, log in and follow the instructions given in this answer. Good luck! – Andrew Fielden Oct 28 '15 at 09:21
  • I had to run export DISPLAY=<HOSTNAME/IP>:0 following the answer on http://unix.stackexchange.com/questions/199891/invalid-mit-magic-cookie-1-key-when-trying-to-run-program-remotely – Vaishak Feb 10 '16 at 06:33
  • I was able to rescue my wife's 16.04 beta system with DISPLAY=:0 sudo dconf reset -f /org/compiz/ from TTY1 – HarlemSquirrel Apr 19 '16 at 15:51
  • this solved my problem, the accepted solution does not solve my problem, infact compiz make all my window border gone because of some conflict with "theme corations" and "gnome theme", i think there is 2 different problem that produce similar symptoms, and this solution and the accepted solution fix different area of the problem – am05mhz May 23 '16 at 07:28
  • On Ubuntu 14.04.3 this method does exactly nothing. – Luís de Sousa May 26 '16 at 06:35
  • On Ubuntu 16.04 this method brings the launcher back, but not the dash, nor the desktop. Also, all the theming settings are lost. – Luís de Sousa Aug 02 '16 at 18:18
  • 4
    One issue with this is that running dconf as sudo made my ~/.config/dconf/user file have root ownership (it had my user ownership before). I'm wondering if it should be done without sudo. This was much better than removing the file and starting from scratch! – Tim Tisdall Oct 05 '16 at 11:48
  • working at 16.04 – jef Oct 25 '17 at 14:10
  • 1
    This worked for me... Ubuntu 16.04 LTS – Robin Hood Mar 13 '18 at 15:49
  • 1
    For everyone with Ubuntu 16.04 or get the "Error spawning command line 'dbus-launch --autholaunch=c0c0f8bf86119c64ccb710000000006 --binary-syntax --close-stderr': child process exited with code 1" problem like I did, the solution you are looking for is likely way down here: https://askubuntu.com/a/827296/452147 – Frikster Jan 09 '19 at 03:44
  • Worked with me in Ubuntu 16.04 running inside VirtualBox – ofarouk Dec 09 '20 at 18:06
76

In 13.04 and 14.04:

unity --replace is deprecated. Instead, use the following:

dconf reset -f /org/compiz/ 
unity --reset-icons &disown

Reboot if it doesn't work right away.

  • 1
    This worked for me after installing appropriate drivers for my Nvidia graphics card. See my answer http://askubuntu.com/questions/288235/launcher-and-panel-missing-ubuntu-13-04/289498#289498 – Thomas Arildsen May 02 '13 at 11:12
  • 2
    dconf reset command gives exitcode error 1 and won't work on 13.10. – Peterdk Oct 24 '13 at 16:10
  • works when I ran at the second time dconf reset -f /org/compiz/ && unity --reset-icons &disown – Claudio Santos Dec 17 '13 at 22:29
  • I'm again stuck at Initializing core options...done.. how long should I wait for this to complete?! – rusty Mar 20 '14 at 07:58
  • @rusty should be instantaneous. If none of these fixed your issue I would recommend opening a new question. – Brandon Bertelsen Mar 20 '14 at 19:21
  • 5
    enabling Unity plugins with ccsm fixed some of the problems, the rest were fixed with rm -r .Xauthority .ICEauthority .compiz-1/ .gconf/ .config/compiz-1/ .config/dconf/ – rusty Mar 20 '14 at 19:29
  • Were you using a program that messes with Unity's settings like Unity Tweak at some point? – Brandon Bertelsen Mar 20 '14 at 21:20
  • The slash after compiz is REALLY important. – HongboZhu Oct 24 '14 at 14:56
  • 3
    Cannot autolaunch D-bus without X11 $DISPLAY. Nothing worked so far – jimifiki Dec 18 '14 at 04:06
  • 2
    @jimifiki I had the same problem because I rebooted between previous instructions and these. Try export DISPLAY=:0 first, then try these instructions again. Of course, I got a core dump when I did the unity --reset-icons &disown so maybe that doesn't help. – GlenPeterson Mar 17 '15 at 14:03
  • 2
    It works for ubuntu 16.04 also , just resolved my issue – Priyadarshi Paul May 16 '16 at 19:04
62

For 12.10 and below:

Press Ctrl+Alt+T for a terminal and run ccsm, then re-enable your 'Unity' plugin.

You also may then need to run a unity --replace.

SkorpEN
  • 149
xyzzyman
  • 896
  • 5
    unity --reset is deprecated now and doesn't work. Is there a replacement? – Shahbaz Mar 11 '13 at 23:41
  • 5
    @Shahbaz - unity --replace. – horIzoN Apr 02 '13 at 14:48
  • 1
    @nerof61 also deprecated as of 13.04. See my answer below: http://askubuntu.com/a/286349/2638 – Brandon Bertelsen Apr 27 '13 at 02:40
  • 1
    neither --reset nor --replace worked for me with my Ubuntu 12.04 ..running the commands instantly displayed unity-panel-service: no process found Backend : ini Integration : true Profile : default Adding plugins Initializing core options...done ...I waited and waited, and then I couldn't, interrupted with ctrl + c.. and now looking to try what other answers suggested.. – rusty Mar 20 '14 at 07:44
54

It is a good idea to check your graphics driver is configured to use hardware acceleration and it is configured to use OpenGL. Try searching Ask Ubuntu and Ubuntu Forums for information specific to your GPUs and Ubuntu flavour. For hybrid graphics users see the last section "Hybrid Graphics" below.

You might want to run the compizconfig-settings-manager Install compizconfig-settings-manager package and make sure that the Unity plugin is checked (see What are some of the issues with CCSM and why would I want to avoid it?).

For 12.04 And Newer

  1. Change to tty1 by pressing Ctrl+Alt+F1 and log in.

  2. Install compizconfig-settings-manager by running

    sudo apt-get install compizconfig-settings-manager
    
  3. Then run it by doing this:

    export DISPLAY=:0
    ccsm
    

    The first part tells the terminal which display you want it to load on (otherwise it won't have a clue).

  4. Press Ctrl+Alt+F7 (or Ctrl+Alt+F8 sometimes) to get back to the graphical display where there should be a CompizConfig Settings Manager screen sitting there.

  5. Find the Unity plugin. Enable it. CCSM

  6. Everything should spring into life but if it doesn't, you might have to restart. You can do that by going back to tty1 and running sudo reboot.

If unity still does not load try:

dconf reset -f /org/compiz/
unity --reset-icons &disown

Reboot if it doesn't work right away.

For 11.10 And Older

If you hope into a TTY (Ctrl+Alt+F1 through F6) and run:

DISPLAY=:0 unity --replace

It will reset Unity back on TTY 7 (Ctrl+Alt++F7).

You can also try just:

DISPLAY=:0 unity

But that won't work if a windows manager is already running on display 0 (it will give you an error, just use unity --replace in that case).

If Unity absolutely refuses to restart try this:

Install gnome-panel:

sudo apt-get install gnome-panel

Than run it on display 0:

DISPLAY=:0 gnome-panel

You should then have Gnome 2 style panels on your desktop, which you can use to logout.

Hybrid Graphics

Some very useful information and further reading for hybrid graphics users can be found here.

Once GPUs are configured appropriately for 3D acceleration and OpenGL you can:

  1. Install Nvidia drivers from https://edge.launchpad.net/~xorg-edgers/+archive/ppa:

    sudo apt-add repository ppa:xorg-edgers/ppa
    

    or:

    I would really prefer the stable PPA, but it does not seem to have packages for 13.04 yet. Update: these seem to be available as of Sep. 25. I would install this stable PPA - you can try but I have not tested it.

    The Ubuntu-supplied Nvidia drivers were already installed and I simply installed from this PPA by adding it and doing a package update using update-manager.

    sudo apt-add repository ppa:ubuntu-x-swat/x-updates
    
  2. Install Bumblebee from https://launchpad.net/~bumblebee/+archive/stable

    UPDATE: As of Oct. 6, ppa:xorg-edgers/ppa seems to contain bumblebee as well. So if you install from this PPA, you might want to try skipping the addition of the Bumblebee PPA and installing it from here instead.

    If you chose the stable PPA in step 1, install the Bumblebee stable PPA as follows:

    sudo apt-add-repository ppa:bumblebee/stable
    
  3. UPDATE: After adding the PPA(s), update your package lists:

    sudo apt-get update
    

    If you already had nvidia drivers installed from Ubuntu's standard repositories, simply upgrade to get the new version from the repository chosen in step 1:

    sudo apt-get upgrade
    sudo apt-get install bumblebee
    
  4. Perform the following commands to 'repair' Unity (from brandon-bertelsen's answer to Unity doesn't load, no Launcher, no Dash appears):

    dconf reset -f /org/compiz/
    unity --reset-icons & disown
    
  • In 14.10: unity --reset-icons &disown gives me stop: Unknown job: unity-panel-service // start: Unknown job: unity-panel-service // compiz (core) - Info: Loading plugin: core // compiz (core) - Info: starting plugin: core ... and no further action. Alt-F7 takes me back to graphical where I have a side menu but no "start" menu (nothing on the top menu -- no connectivity icon, power icon, etc. -- back to tty1 gives me screens and screens of information ... reboot and I am BACK IN BUSINESS! THANK YOU FOR YOUR MAGIC VOODOO – JeanSibelius Mar 07 '15 at 14:01
  • 4
    Your "For 12.04 and newer" section does not work on Ubuntu 16.04. – Luís de Sousa Aug 02 '16 at 18:31
  • apt-add-repository ? - missing – Kalpesh Soni Aug 15 '18 at 16:14
34

The easiest way to do this is to press Ctrl+Alt+T to get a terminal and then issue:

rm -rf ~/.compiz-1 ~/.config/compiz-1

and your unity session will come back before your eyes..

This technique is better than re-launching ccsm, because you can get into OP's error condition without even accidentally de-selecting unity in ccsm; you can get it simply by accidentally pressing the "preferences" button in ccsm.

Larry Chu
  • 3
  • 2
achiang
  • 3,978
  • 2
    guess you mean .config/compiz-1 – matteo Oct 13 '13 at 21:01
  • I cannot use ctrl-alt-T – jimifiki Dec 18 '14 at 04:12
  • 1
    @jimifiki: press 'crtl' + 'alt' + 'f1' and then do what achiang suggested. though personally I'd move them out of the way incase you find more problems. – isaaclw Dec 19 '14 at 19:40
  • @isaaclw I did what suggests. Nothing has changed. Remarkably the guest session works normally. – jimifiki Dec 29 '14 at 15:05
  • I've seen this so often, and not every time I was able to solve it by just removing compiz configurations in the user's profile.

    Last time I wasn't able to even reinstall anything, as suggested on other comments, because even the network configuration was all screwed up.

    I issued an apt-get check and got a message stating that there was something broken up during a previous install or such, but with clear instructions on how to fix it (it was a dpkg <something> command I can't recall exactly now).

    – Simón Jan 05 '15 at 00:04
  • This is the only thing that worked for me (64-bit 14.10 with nVidia)! You should clarify for people that this deletes your launchers and other customizations you may have made with compiz. Thanks! – GlenPeterson Mar 17 '15 at 15:05
  • 1
    Not a solution for Ubuntu 16.04. – Luís de Sousa Aug 02 '16 at 18:38
  • That one worked for me with 16.04. Thanks! – Giles Thomas Aug 16 '16 at 17:24
  • 1
    Did not work for me on 16.04 – 43Tesseracts May 16 '17 at 21:20
  • 4
    For my Ubuntu 16.04, the relevant files to remove were in .cache, not .config. So rm -rf ~/.cache/compizconfig-1 worked for me. – tparker Mar 14 '18 at 17:54
  • That helped me only after I fixed another issue described here https://askubuntu.com/questions/534135/how-to-fix-unity-locked-disabled-settings – Kos Mar 27 '19 at 10:04
24

I had this problem too. I solved it with deleting the content of the ~/.config/compiz-1/compizconfig file and relog.

rm -rf ~/.config/compiz-1/compizconfig/*
cmcginty
  • 5,888
dome cs
  • 241
22

I have had exactly the same issue.

If you have Compiz Config Settings Manager installed it may be that the Unity Desktop Plugin is disabled.

Log in to a Unity 2D desktop and check that it is enabled in CCSM like this,

CCSM

Unity Shell will not load in the default desktop if the tickbox is not checked and you will get the session in your picture.

Mark Rooney
  • 6,289
20

Developers are always fixing bugs, so an alternative is to wait, and to follow progress on bug fixing (subscribe to Unity development in Launchpad).

  1. Press Ctrl+Alt+F2.

  2. Log in.

  3. Run sudo shutdown -r now in a terminal.

  4. At the login screen after your system restarts, choose Unity 2D (for now) by right-clicking the sprocket icon.

  5. Wait for a fix for Unity 3D/Ubuntu 11.10 (e.g. a week).

  6. Update your system to get the fix; in a terminal type sudo apt-get update && sudo apt-get upgrade.

UPDATE: I was able to resolve this by using ccsm, from Unity 2D login.

(This is adapted from this Ubuntu Forums post.)

  1. At the login screen, select Unity 2D and login.

  2. Install ccsm (CompizConfig Settings Manager) by running in a terminal: sudo apt-get install compizconfig-settings-manager compiz-fusion-plugins-extra.

  3. Start ccsm, and select the category Desktop. Enable the Ubuntu Unity Plugin; if asked to resolve conflicts, select the MIDDLE button for all conflicts. Close ccsm when done.

  4. Restart, select Unity (3D) and login.

david6
  • 14,499
14

I have an Asus U36SD using an "Optimus" (Intel + Nvidia GPUs) set-up. I had Ubuntu 12.04 working just fine, but upgrading to 12.10, this problem appeared and persisted in 13.04. I have managed to fix it trough the following steps:

  1. Install Nvidia drivers from https://edge.launchpad.net/~xorg-edgers/+archive/ppa.

    OR:

    I would really prefer the stable PPA at https://edge.launchpad.net/~ubuntu-x-swat/+archive/x-updates, but it does not seem to have packages for 13.04 yet. Update: these seem to be available as of Sep. 25. I would install this stable PPA - you can try but I have not tested it.

    The Ubuntu-supplied Nvidia drivers were already installed and I simply installed from this PPA by adding it and doing a package update using update-manager. UPDATE:

    sudo apt-add repository ppa:xorg-edgers/ppa
    

    (what I did) or:

    sudo apt-add repository ppa:ubuntu-x-swat/x-updates
    

    (stable release for 13.04 too now - not tested by me).

  2. Install Bumblebee from https://launchpad.net/~bumblebee/+archive/stable

    UPDATE: As of Oct. 6, ppa:xorg-edgers/ppa seems to contain bumblebee as well. So if you install from this PPA, you might want to try skipping the addition of the Bumblebee PPA and installing it from here instead.

    If you chose the stable PPA in step 1, install the Bumblebee stable PPA as follows:

    sudo apt-add-repository ppa:bumblebee/stable
    
  3. UPDATE: After adding the PPA(s), update your package lists:

    sudo apt-get update
    

    If you already had nvidia drivers installed from Ubuntu's standard repositories, simply upgrade to get the new version from the repository chosen in step 1.:

    sudo apt-get upgrade
    

    Install Bumblebee

    sudo apt-get install bumblebee
    
  4. Perform the following commands to 'repair' Unity (from brandon-bertelsen's answer to Unity doesn't load, no Launcher, no Dash appears):

    dconf reset -f /org/compiz/ 
    unity --reset-icons &disown
    
  • I just needed to perform the last step of your answer because I have the nvidia card deactivated in bios and never used it but the dconf reset worked perfectly. Thanks! – Daniel W. May 07 '13 at 11:12
  • 1
    Thank you! This happened to me just now after an update and the last step was enough for me too. – TenLeftFingers Jul 06 '13 at 01:15
  • how do you install that stuff from those links while having no launcher and being even unable to move windows around? I've tried skipping that step but it does not work for me. Can you give command-line instructions for adding those ppa's and installing those things? – matteo Oct 13 '13 at 20:46
  • I added some details above - hope it helps. – Thomas Arildsen Oct 14 '13 at 20:42
13

The original poster of the duplicate question, solved in editing his own question:

Solution found : Delete .Xauthority in my home (or rename it)

sudo rm ~/.Xauthority
mchid
  • 43,546
  • 8
  • 97
  • 150
Mateo
  • 8,104
13

This happened to me as well in Ubuntu 16.04 after an upgrade of unity and compiz packages. None of the above worked.

The only way I found to have launchers and dashes back was to remove (while NOT logged into Unity) the directory .cache in my home.

  • 5
    Thanks, having tried so many other solutions in vain (ccsm, resetting, deleting config dirs etc.), this solved the problem for good! – fuenfundachtzig Sep 27 '16 at 21:02
  • This is often the case if you jiggle with drivers, GPU's and all... deleting .cache will do the job. – stamster Feb 26 '18 at 01:44
  • 1
    Worked for me too (Ubuntu 16.04). Something upgraded when I last shut my machine down. When it started back up, Unity wasn't loading. I tried many of the steps above, and none of them worked. This simple step of deleting ~/.cache did the trick. Thanks! – Anthony V Mar 16 '18 at 18:20
  • This happened to a friend running 16.04. I resolved it by upgrading her to Ubuntu 18.04, using the new Gnome desktop instead of Unity. – Mark Stosberg Mar 28 '18 at 11:59
11

For 13.10:

Just to insure everything is installed:

sudo apt-get install --reinstall unity ubuntu-desktop

Next, reload everything:

dconf reset -f /org/compiz/ && unity --reset-icons &disown

I just tried this and it works!

Source:

https://askubuntu.com/a/204784/54037

If all else fails:

Remember, always make backups! However, sometimes a fresh install is good, reinstall Ubuntu?

  • The 'if all else fails' is a bit useless... see also: http://meta.askubuntu.com/questions/11710/lets-not-do-i-dont-know-how-to-fix-your-problem-so-just-reinstall?cb=1 – Wilf Aug 11 '14 at 20:29
  • @Wilf Fresh installs are never useless. Most people have a poor install or simply mess up their installation. Time for refresh. – Jared Burrows Aug 11 '14 at 20:34
  • 1
    yeah, especially with upgrades... I have found that apt seems to have developed the knack of removing unity to to wacky interpretations for regular expressions (e.g. nuking webapps) - checking whether unity is installed/installing anything that is missing can then be helpful, – Wilf Aug 11 '14 at 20:44
  • This worked after a lightdm restart :D. Thank you, I tried dpk-reconfigure but looks apt-get --reinstall is better in this case. – Thomas15v Feb 23 '15 at 18:28
9

It seems there's a problem with 12.04 Unity 3D and the current Nvidia drivers.

See this post (Unity 3d no longer works after installing 12.04) for details of how to work round the problem.

I have a 32 bit Pentium 4 3.06 GHz Compaq D520SFF, with an Nvidia GeForce 6200, running kernel 3.2.0-24-generic-pae, and had exactly the same problem (2D works, 3D doesn't), and downgrading the Nvidia drivers got 3D working for me in a couple of minutes.

  • 1
    i did almost all the answers in this community related to my issue..please give me some thing work... – Yahya May 01 '12 at 04:38
  • Almost all is a vague phrase.... Have you actually tried downgrading the NVidia drivers from 295.40 to 295.33 as described in the post? – Heimdall May 01 '12 at 07:13
  • i did all described by the post nothing happened... – Yahya May 01 '12 at 11:33
9

For the icons, it is due to Nautilus. Write nautilus & in a terminal, do not close it, and the icons will be back.

EDIT 10/10/2013: for Nautilus you can also type Alt + F2 to open Unity command line prompt and write nautilus in the global search/prompt CLI. A file explorer will open. You can close it if you want.

air-dex
  • 5,889
  • 1
  • 21
  • 21
9

I had a similar problem:

unity with 14.04 in combination with IBM Notes9 resulted in some strange behavior (mouse clicks would stop working). My workaround for that was to open a terminal and restart unity by typing unity &.

The last time I did that, it totally corrupted unity - the no dash, no launcher no nothing. I think I tried EVERY suggestion that is listed on this page - none of it did help.

But a coworker finally had the answer that worked for me:
I installed the unity-tweak-tool; than I ran unity-tweak-tool --reset-unity and rebooted.

Afterwards, unity was back alive. Obviously all prior configuration changes to unity were gone, but that is what --reset-unity is about.

And the big advantage of this solution: it requires you to only add a single package and to redo your unity config changes - but you do not have to reset compiz, install ccsm, or follow all the other lengthy activities.

Update:

the other solution I find very helpful nowadays comes from here - the point: sometimes you have to remove (or even better: pull in a "working" backup) of your ~/.config/dconf/user file.

GhostCat
  • 2,095
  • 1
    This is the only thing that worked for me! – sevenseacat Jun 25 '14 at 13:33
  • On Ubuntu 16.04 this brings back the launcher, but not the dash or desktop. And after rebooting everything is dead again, and you have to repeat the procedure. – Luís de Sousa Aug 02 '16 at 18:30
  • @LuísdeSousa Lets be precise here: that what you probably observed on your system. Thing is: it seems that there can be various reasons leading to such problems; and I found that using the tweak-tool can help. – GhostCat Sep 30 '16 at 07:28
  • @LuísdeSousa For the record; the other solution I found to unity-stuck/not there problems: remove ~/.config/dconf/user ... sometimes restarting unity helps, but sometimes I have to go in and delete that file. – GhostCat Feb 17 '17 at 12:58
7

If you hope into a tty (Ctrl+Alt+F1 through F6) and run:

DISPLAY=:0 unity --replace

It will reset Unity back on tty 7 (Ctrl+Alt++F7).

You can also try just:

DISPLAY=:0 unity

But that won't work if a windows manager is already running on display 0 (it will give you an error, just use unity --replace in that case).

If Unity absolutely refuses to restart try this:

Install gnome-panel:

sudo apt-get install gnome-panel

Than run it on display 0:

DISPLAY=:0 gnome-panel

You should then have Gnome 2 style panels on your desktop, which you can use to logout.

I find Unity to be really buggy on 13.04 with my Nvidia card.. YMMV.

Seth
  • 58,122
6

I have had about 3 times where I needed the Ctrl+Alt+F1 to not loose work and it messed up... I have nvidia also. I would like to suggest this:

Ctrl+Alt+F1 (ok, blank screen) Type your login, hit Enter, then password (all in blank screen) type this now:

sudo startx -- :1

will have to type password again and Enter this will open a X session at Ctrl+Alt+F8 (will jump to it automatically) now create a new empty text file called runBash.sh, and type on it:

bash

save it, change its permissions to executable, and run it, you will get a truly relieving terminal that makes you remember why Linux is good ! :D

after you finish, remember to Ctrl+Alt+F1, hit Ctrl+C (will end the new X session), type exit, Enter, will end the terminal (blank screen) session. if you think you missed typing exit, just hit Ctrl+C and type again, don’t do it too fast.

so you can improve it, make a script to let you type as little as possible, but anyway you will still have to type a lot while the screen is blank, but it is better than nothing :)

Still looking for definitive Ctrl+Alt+F1 proper solution Ubuntu 12.04 + nvidia.

snoop
  • 4,040
  • 9
  • 40
  • 58
  • hi again, I have ABSOLUTELY no idea why, but for some reason, after a system freeze (I was playing a 3D game in wine), I hard reset the computer, and from a sudden I have back my text terminal ctrl+alt+f1 (but my account become unable to login thru lightdm graphical login screen, despite I still can login thru text terminal, I continue this affair on this thread: http://askubuntu.com/questions/133733/cannot-login-via-unity-login-screen-after-upgrade-to-12-04/133754#133754) – Aquarius Power May 28 '12 at 01:33
  • By "blank" screen, do you men "black" or "empty"? Unless your video shows terminals in reverse video, the background is black and thus it looks much more like a black screen. Also, most often, after the Ctrl+Alt+F1 you have to hit Alt-F1, Alt-F2... to Alt-F6 to reach a terminal. – Alexis Wilke May 21 '16 at 20:15
  • @AlexisWilke so long time... but.. as I remember, blank in a sense that you are unable to read things on screen. May be this was a secondary problem happening here also. – Aquarius Power May 22 '16 at 01:54
5

Worked for Ubuntu 16.04:

I reset compizconfig by removing its cache (actually the command makes backup, so it can be restored).

Perform the following commands and logout afterwords:

mv ~/.cache/compizconfig-1 ~/.cache/compizconfig-backup

setsid unity

Attention: This removes your custom Unity setup.

5

It happens when you login with another tty and try, as the same user, to start X (with startx or initx) .

For example, Ubuntu runs in tty7. With Ctrl+Alt+F1 tty1 opens. Log in as the same user, and run startx. Go back to tty7, logout and login. You only get the desktop wall paper.

To solve the problem, choose tty1, login, remove the .Xauthority file in your home directory, logout, login. Solved.

snoop
  • 4,040
  • 9
  • 40
  • 58
5

The first answer works fine, except I needed to install Unity itself:

sudo apt-get install unity

then run:

ccsm

and enable Unity :)

karel
  • 114,770
sobi3ch
  • 1,017
5

I had pretty much the same problem under 12.04. Unity was slow with my aged GPU, so I was using Unity 2d as my desktop for months. For no apparent reason, it suddenly refused to display launchpad and title bar (for all users). Reenabling Unity in CCSM as sugggested here was part of the solution, but none of the other measures suggested here, there or in several other related threads, including, but not limited to:

  • Reinstalling unity

  • Reinstalling ubuntu desktop

  • Removing all relevant (e.g. compiz, gconf, etc.) configuration information

helped me to completely resolve these symptoms under 12.04 (64 bit).

unity --reset

would not work for me. After delivering a variety of error and information messages, it would always hang at:

Setting Update "run_key"

as shown in the log posted in the thread titled "unity has vanished" for unity run with no arguments.

I noticed that the error message delivered by:

/usr/lib/nux/unity_support_test -p

was similar to some of the errors reported by unity --reset:

error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory.

After extensive searching, I found the following solution:

  • Get the path of libGL.so.1 by using the command locate libGL.so.1.

  • Add a link to the library in /usr/lib/ as shown in the following example:

    sudo ln -s /usr/lib/i386/mesa/libGL.so.1 /usr/lib
    

    (courtesy of J.D. Bartlett)

  • Restart the computer.

This not only allowed both unity_support_test-p and unity --reset to run, it also allowed Unity 2D to start. I have no idea what caused my problems, but since creating the links above (several weeks now) I have had no further problems.

Wilf
  • 30,194
  • 17
  • 108
  • 164
R B
  • 316
  • 1
  • 4
  • 19
5

When I accidentally upgraded from 12.04 LTS Ubuntu to 13.04, I too had to face the same issues such as missing side menu bar, no window options, not being able to switch between applications (alt-tab) and I couldn't even drag windows on the screen. After following so many options I ended up with the following set of commands to fix these issues.

sudo apt-get remove aspell #may not be relevant
sudo apt-get remove dictionaries-common

reboot (you can use sudo reboot)

sudo apt-get install compizconfig-settings-manager
sudo apt-get install dictionaries-common
sudo apt-get install lightdm

reboot (you can use sudo reboot)

dconf reset -f /org/compiz/
unity --reset-icons & disown

I actually removed aspell because of conflicting dependency. This might not have any correlation between this issue. I think re-installing lightdm and resetting compiz helped me in fixing this.

Wilf
  • 30,194
  • 17
  • 108
  • 164
Bunti
  • 243
  • 2
  • 10
4

If you use an acceleration graphics card alongside the default graphics card, it's possibly due to the installation of their drivers. A few updates of acceleration graphics cards drivers in systems that have two graphics card tend to present unstable behavior in some systems. I have an Nvidia card and an Intel card. It used to happen with me when I installed Nvidia drivers. Launcher and panel would disappear from the the desktop. If you use an Nvidia card, installing Bumblebee could be a temporary solution: https://wiki.ubuntu.com/Bumblebee

user153634
  • 211
  • 3
  • 7
  • I've got a ThinkPad T430u with a dedicated nvidia card but I disabled it in the BIOS and never installed any extra drivers or added 'x-swat' or edgers ppa since the intel HD4000 worked perfectly out of the box and I had been running this setup without problems for about 2 months – Daniel W. May 01 '13 at 16:03
  • The behaviour of my Asus U36SD seems to confirm that it is a problem with the combination of two GPUs (Intel/Nvidia). I will post an answer explaining how I fixed it. – Thomas Arildsen May 02 '13 at 10:05
3

Today I've encountered situation where user of my script has decided to launch it by placing the call to script into his $HOME/.profile file. As a result , Unity couldn't launch.

Scripts by nature are sequential, so .profile basically was waiting for the script to finish , and Unity couldn't start if .profile didn't finish running.

I've done the same thing,called the script from .profile, and received the same result - my login screen wallpaper stayed there, no dash or launcher appeared, could not right click on desktop or perform any action other than login to TTY1.

The solution was to remove appropriate line from the .profile. It's possible to detach a command from .profile using the ampersand, <command> & form , but the problem is that every time user opens terminal or logs in to TTY, a new instance of that command is spawned. Hence, I would strongly advise not to launch any programs from .profile unless you know what you're doing.

Link to original script and discussion here: https://askubuntu.com/a/739631/295286

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
3

I had the same issue after doing sudo apt-get install kubuntu-desktop which broke my lightdm install for some reason. I'm running 16.04 here.

Press ctrl - alt - F1 to get to the terminal, then:

sudo service lightdm stop
sudo apt-get remove lightdm
sudo apt-get update && sudo apt-get install lightdm
sudo reboot

That fixed it for me after hours of pulling my hair out.

localhost
  • 243
  • 2
  • 8
3

I had this Problem, I tried a load of things and even enabled unity, but nothing worked. First, you need to open TTY (ctrl+alt+F1) and login. Now use

    env DISLAY:=0 gnome-terminal        

Close TTY with ctrl+alt+F7, then use (in terminal)

dconf reset -f /org/compiz/

After that, use

sudo reboot
2

I am having the same issue, and solved by following using pycharm's terminal.

 - Go to my-computer -> user -> share ->  
 - open pycharm and its terminal
 - sudo apt-get update
 - sudo apt-get upgrade 
 - sudo apt-get install --reinstall ubuntu-desktop
2

Apparently, unplugging my second monitor was the fix, and then I was able to install and update the correct drivers.

2

I tried many of the solutions mentioned in this thread as well as others. Finally this worked for me:

dconf reset -f /org/compiz/

then

setsid unity

Thanks everybody for contributing.

0xF2
  • 3,154
Ashu
  • 3,966
1

If nothing works out so far (from this thread itself, here or with initctl), try the following (tested on Ubuntu16.04):

  1. type in terminal:

    $ software-center

  2. then you can install Main Menu (alacarte) in Ubuntu software center

  3. right click on the panel and choose " add applets to the panel"
  4. then add applet "Menu" to panel.

Beware:

Don't install CompizConfig Setting Manager: it'll hang up your system during reboot , in the best case scenario.

Compizconfig is a dangerous toy now:it can break your Ubuntu installation!!

will
  • 91
  • 1
  • 2
1

I had the same problem and all the suggestions above failed for me.

I made the following steps:

  1. Installed kubuntu-desktop as an user interface alternative for Unity (login via ALT + Ctrl + F1, then sudo apt-get install kubuntu-desktop). Sure, you can choose other Unity alternatives.

  2. Restarted the machine and logged in via KDE.

  3. Created a temp user (let's name it alice) with admin rights.
  4. Copied my files in Alice's account.
  5. Deleted the original user (including the files)
  6. Created again the original user (same username, same rights)
  7. Copied the files from backup.
  8. Deleted the temp user (alice).

Then, you don't need KDE anymore. ;-)

  • Shouldn't it be better with juste xfce (not xubuntu-desktop!!) ? I think it's way less heavy to install (kde is so heavy) and not including *-desktop allows to ditch all "recommended" programs. – MrVaykadji May 24 '14 at 18:45
  • @MrVaykadji I chose kubuntu-desktop because I didn't remember another one. :-) – Ionică Bizău May 24 '14 at 19:34
  • Okay, but installing kubuntu-desktop will create a hell lot of dependencies, that's all I'm saying – MrVaykadji May 24 '14 at 19:35
  • KDE is more powerful than xubuntu; so in a certain way: if you accept the overhead of unity and the ubuntu-desktop; then KDE might be the better choice. On the other hand - if your focus is to have a system that reacts immediately you might want to install xubuntu in the first place. With xubuntu, the thunar file manager pops up in a second; nautilus under unity or gnome3; or dolphin with KDE will need at least 3 to 5 seconds. – GhostCat Jun 04 '14 at 10:22
  • On Ubuntu 16.04 I installed xubuntu-desktop but even with DE there is only the desktop background after logging in. – Luís de Sousa Aug 02 '16 at 19:17
1

I had recently edited my .bashrc file with the line guake -r $(hostname) to automatically rename tabs whenever I opened a new tab in guake and everything was working perfectly. Then I restarted my computer a few days later and encountered this problem. I can only assume that trying to start guake without a valid display resulted in some error that completely destroyed something in the unity pipeline.

So if you've recently modified your ~/.bashrc try undoing changes.

TheSchwa
  • 3,820
1

I just had a black background with a mouse cursor. The following worked for me in addition to enabling the unity plugin again via ccsm, but first I had to do the following because it didn't even properly show the desktop: When doing unity --reset, it stopped at "show session" and some lines before it said "error loading plugin opengl", so i figured this must be related.. and it was! (just be sure to load your specific .so my nvidia installation had a different number of course, just do ls in the folder in described in the link

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1342339

Blub
  • 235
1

If the previous answers do not solve the problem, it might be that your HDD is so full that the system cannot work properly, and cannot manage to load the environment.

This can occur quite easily: you let something downloading overnight without a trigger to make it stop if the free disk space goes under a certain limit. At some point the system freezes because all the disk is full. Next morning you try to start it, and it does not load unity.

This, at least is what happened to me. The solution is simple: switch to TTY and delete manually a few things. Then reboot.