4

When I'm Log in the Tray bar works. After the correct login it disappear , also the unity bar doesn't appear. so I can not even start a terminal session for making changes, since it does not work the keyboard shortcut to launch it (CTRL + ALT + T). How can I restore the tray and unity bar, provided that this is the problem?

Thanks all.

2707974
  • 10,553
  • 6
  • 33
  • 45
nen-95
  • 43
  • 1
  • 5

3 Answers3

4

CTRL + ALT + F1 can be used to bring up a terminal. Once you log in press those keys and type in your username and password (the password will not display, just type it in anyway). Once that is done you will have a functioning terminal. Run the command unity. Then press CTRL + ALT + F7 to return to the desktop.

If Unity is still not running then switch back to the terminal (with CTRL + ALT + F1) and see if there was an error, especially in the "Initializing" section, each of those should lines should end with "...done".

Additional Suggestions:

Try running sudo apt-get install compizconfig-settings-manager followed by export DISPLAY=0:0 followed by ccsm then switch to the desktop, if it comes up make sure that the check box next to unity is checked then go to preferences on the left and click reset to defaults. After that restart the computer and try logging in.

Commands that might work:

xhost +localhost This will add you to the xhosts, I doubt that you aren't in it but probably should try anyway.

/usr/lib/nux/unity_support_test -p Run this command to check if the computer supports unity, if it doesn't you can't run it. In that case I would click the Ubuntu logo on the login screen and select Ubuntu 2D and try that.

unity --reset

sudo rm /etc/X11/xorg.conf This will reset your X11 config file.

If all of those fail you can reinstall unity:

sudo apt-get --purge remove unity
sudo apt-get install unity
sudo services lightdm restart

This will reset all of your graphical settings:

gconftool --shutdown
sudo killall -r -I gconf
sudo killall -r -I dconf
rm -rf .compiz* .gconf* .config/dconf/ .config/compiz*

If that fails this will reinstall the graphical portion of Ubuntu.

sudo apt-get install --reinstall ubuntu-desktop

You can try the same thing with compiz:

sudo apt-get install --reinstall compiz

john
  • 139
  • Done. It gaves me --> "WARNING: no DISPLAY variable set, setting it to :0 " and " stop: Unknown job: unity-panel-service " and " start: Unknown job: unity-panel-service" and " compiz(core) - Info: loading plugin: core " and " compiz(core) - Info: starting plugin: core ". Those 5 lines – nen-95 Jun 03 '14 at 08:25
  • Try running /usr/lib/unity/unity-panel-service and show me what that says. – john Jun 03 '14 at 08:28
  • ( unity-panel-service: 3343): Gtk-warning **: cannot open display: – nen-95 Jun 03 '14 at 09:01
  • Try running export DISPLAY=0:0 followed by exec unity. If that doesn't work try startx, and if that doesn't work run ps -x | grep lightdm and tell me what it says. – john Jun 03 '14 at 09:22
  • Ok, the first nothing change. Whit "startx" came back the menu of the window but not the tray bar and unity. Finally the last command gave me ---> " 4052 tty1 S+ 0:00 grep --color=auto lightdm " – nen-95 Jun 03 '14 at 09:37
  • Ok, using ccsm from a tty1 gave me some error and when i go to the desktop there' s nothing. – nen-95 Jun 03 '14 at 10:48
  • I don' t know if it care but with "xhost +localhost" and "/usr/lib/nux/unity_support_test -p" it gaves me that error "unable to open display "" " – nen-95 Jun 03 '14 at 11:02
  • If you tried using Unity/Ubuntu 2D, and that didn't work, tried reinstalling those programs listed above, and that hasn't worked, and cleared your settings like listed above then the only answer may be to reinstall Ubuntu. – john Jun 03 '14 at 11:21
  • Ok i use command startx from tty1, came back to the desktop, run a terminal ( with ctrl+alt+t ), run ccsm, set the things that you told me befor and all came back (unity and tray) all works fine Like it has to be ever but when i restart we are back to square one. – nen-95 Jun 03 '14 at 11:31
  • If you run startxat boot then does it work or do you also have to run ccsm? Also, does startx "give up" at the end of the file, that would mean that it is already working. – john Jun 03 '14 at 11:39
  • Ok it works reset the graphic settings. I reboot and now it work. I hope it will continue. THANKS MAN. – nen-95 Jun 03 '14 at 11:44
  • That's good! I hope you don't have any more problems. – john Jun 03 '14 at 11:46
  • Just for clarity, is "Ubuntu 2D" referenced above exactly the same thing as Unity 2D as installed by sudo apt-get install unity-2d? – CynicallyNaive Apr 18 '17 at 03:20
2

I've tried john and Erv Gunter answers, however for me what did it was this last line :

sudo apt-get purge nvidia-*
sudo apt-get install ubuntu-desktop
export DISPLAY=:0 
gsettings reset org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins

source

0

I "lost" unity too, at some point. The one and only thing that fixed the problem for me:

sudo apt-get install unity-tweak-tool
unity-tweak-tool --reset

Afterwards reboot your system. After the next login, unity should be fully working again.

(I am not 100% sure if the argument is really named --reset; if that doesnt work; -help should tell you the option you need)

Disclaimer: of course this will reset all config changes you made to unity (launcher width, elements in there). But again: it once worked for me, when all the other "askubuntu" answers you can find did not.

GhostCat
  • 2,095