I typed this in tty1 (ctrl+alt+F1):

gnome-shell --display :0 --replace

and then the theme of desktop changed. I want to go back to the previous one but cant because this theme is broken and doesn’t open "appearance" in setting. If there is some one who could help.

  • unity --replace if you're using usually Unity
    – A.B.
    Sep 12, 2015 at 13:30
  • sudo service lightdm restart Sep 12, 2015 at 13:37
  • Which version of Ubuntu are you using, with which desktop envionment?
    – Wilf
    Sep 12, 2015 at 13:39

2 Answers 2


If you are using Gnome: Restarting gnome from a TTY can occasionally break things, so the shell is no longer 'attached' to some backends for themes, power management etc (probably). If some action is possible in the Gnome Shell, Alt+F2+r+Enter is usually the easiest way of restarting Gnome.

If you are (supposed to be) using another Desktop Environment (DE), like Unity: You have replaced the DE with another DE...

Either of these should only be temporary, and can be fixed by logging out and logging in again (if possible), or rebooting. If you can't log out etc from the shell, save any work, switch back to the TTY and run this to restart your machine:

sudo reboot

HOWEVER it can also be possible to log out via terminal, you may want to try this first. Restarting the login screen (GDM/LightDM) can also sometimes work - e.g. for systems not using systemd and using lightdm:

sudo service lightdm restart
  • 1
    Reboot? Reboot. askubuntu.com/q/672223/367165 =)
    – A.B.
    Sep 12, 2015 at 13:36
  • @A.B. generic all round quick way... other methods are available just whether they work depends exactly on what happened....
    – Wilf
    Sep 12, 2015 at 13:38

If you are using Lubuntu:

nohup openbox-lubuntu --replace &;
lxpanelctl restart;

If you are using LXDE (that is, not the full Lubuntu environment):

nohup openbox-lxde --replace &

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.