0

This is a follow-up question to 15.10: 'startx $(which unity)' fails when booting to console.

I finally managed to load the Unity Desktop after having booted into text-mode. But the desktop I get is still not usable. It has a screen resolution of 800x600 and all indicators are missing, the panel is completely empty. Also I can't change the settings (e.g. the display resolution), which results in an error like this:

screenshot: Failed to apply configuration

What is happening here? When I boot directly into the graphical desktop environment, there are zero problems. What am I missing when booting to console and starting the desktop manually?

I currently do that by executing startx $(which unity).

Please help me to be able to successfully start the Unity desktop manually from a pure console.

Byte Commander
  • 107,489
  • As before, how about startx /usr/bin/gnome-session --session=ubuntu? – muru Feb 03 '16 at 13:25
  • @muru Nope. As before, I get the absolutely unusable wallpaper plus X-shaped mouse cursor which only moves on a diagonal line. – Byte Commander Feb 03 '16 at 13:53
  • It's not recommended to use startx in Ubuntu. – xangua Feb 03 '16 at 14:03
  • @xangua It does not help when you tell me that I should not do it that way without providing a better alternative... – Byte Commander Feb 03 '16 at 14:05
  • @ByteCommander That is very unusual. What does grep Exec /usr/share/xsessions/ubuntu.desktop say? That's the command that actually launches the unity session, so if it still doesn't work, I'd think something very wrong – muru Feb 03 '16 at 14:05
  • @muru Output: Exec=gnome-session --session=ubuntu, TryExec=unity – Byte Commander Feb 03 '16 at 14:06

1 Answers1

2

You could follow the chain of targets from the point you stopped at and manually load the graphical target as if you didn't stop at the multi-user target at all:

sudo systemctl start graphical.target

That will handle everything correctly.

But bear in mind that this will start LightDM, which will in turn start Unity upon login, and not Unity directly.


To leave the graphical desktop again in favor of the console, load the multi-user.target:

sudo chvt 1 && sudo systemctl start multi-user.target

The sudo chvt 1 additionally switches back from TTY7 (GUI) to TTY1 (console), because otherwise you would stay on a black screen.

kos
  • 35,891