Ubuntu – How to switch between Unity and GNOME (or recovery console) from serial-console

consolegnomeguiunity

I am currently working over a serial-console (from desktop computer to a developing board)

I tried switching between three visual alternatives: Unity, GNOME and recovery console (using the board devices, not serial-console). They worked perfectly, but for some reason, my keyboard stopped working on the board just when I switched to recovery console, and the only way to control the device is through the desktop serial-console.

How can I go back to GNOME or Unity from serial-console?
I tried gnome-shell --replace and unity --replace but:

Window manager error: Unable to open X display 
** (gnome-shell:6053): WARNING **: Command line `dbus-launch --autolaunch=b6a0f5be3cacff6ccdea054a00000008 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

… so any ideas??

Best Answer

You will probably need to restart the display manager:

# sudo restart lightdm

You can also change virtual terminals using chvt, so if you're on the recovery console (VT1) and X is running on VT7 then the following might help:

# chvt 7