Can't start unity from command line
The DISPLAY environment variable indicates X11 programs which X11 screen they should connect to. If you only start unity, it tries to connect to the "default" X11 screen, :0, which fails because there is no X11 server to accept such connections.
You'll want to start a full X11 session; you can install and use the startx command, which will start an X11 server and fire up processes with the associated DISPLAY environment variable.
You'll have to configure it to start unity by creating a .xinitrc in your home directory; for the simplest session, you can try the following contents:
#!/bin/sh
exec unity
Related videos on Youtube
gsingh2011
Updated on September 18, 2022Comments
-
gsingh2011 over 1 year
For learning purposes, I'm trying to start my GUI (unity) on Ubuntu 12.04 from the command line.
I've changed
quiet splash
in/etc/default/grub
totext
and I successfully booted into the command line. I was able to start X11 and play around with some lightweight window managers like icewm-lite. Now I want to start the full unity desktop that's default with ubuntu 12.04, so I typeunity
in the command line and I getWARNING: no DISPLAY variable set, setting it to :0 compiz (core) - Fatal: Couldn't open display :0 unity-panel-service: no process found
and unity doesn't start. What am I doing wrong?
-
gsingh2011 over 11 yearsThanks Pierre, I had a line in there that had another window manager running and I think that's what caused the problem. Now that unity is running, the issue is that the screen doesn't seem to redraw/refresh properly. I have to move my mouse across certain regions of the screen to get those regions to redraw. I'm going to make a separate issue for that though.
-
Admin almost 11 yearsty! i had to do this first: forums.freebsd.org/showthread.php?t=12447