PDA

View Full Version : 12.04.2 LTS - startx gives me an empty screen



Motley Fool
June 10th, 2013, 04:41 PM
I'm going to be using Ubuntu 12.04.2 LTS for my server, so I've done the following:

Installed Ubuntu off the CD
Added the "ubuntu-desktop" package, since I will occasionally need Firefox and other graphical apps
Rebooted to see that the system would successfully put me into a graphical environment where I could login, start Ubuntu Desktop, launch Firefox, etc.
Edited /etc/default/grub, set GRUB_CMDLINE_LINUX_DEFAULT="text", and ran "update-grub", because I usually want to boot into text-only mode, and only startup X if I need it.
Rebooted to confirm that I was now booting into a text console instead of the graphical startup screen.


So far so good. But now when I run "startx", all I get is an empty screen. It has the purple-orange Ubuntu background, but no icons or menus. I can right-click the mouse and get a few popup menu items ("Create New Folder", "Create New Document", etc.) but no way to actually run any programs.

If I undo step #4 above and have the system boot back into graphical mode, it works fine. But when I'm booting into text/console mode, "startx" doesn't start the GUI correctly.

What am I doing wrong here? Thanks to anyone who can help!

dino99
June 10th, 2013, 06:04 PM
try that howto: http://virtual-drive.in/2012/05/20/ubuntu-12-04-text-boot/

Motley Fool
June 10th, 2013, 06:33 PM
dino99, thanks for the reply. That does actually give me more debugging/boot messages during the boot process, which is nice to have.

But unfortunately it doesn't fix the main problem: "startx" still drops me into a screen with a pretty background but no icons.

steeldriver
June 10th, 2013, 06:39 PM
I'm not sure that 'startx' works with the full ubuntu desktop session (possibly because of all the dbus stuff under the hood) - have you tried


sudo service lightdm start

and then logging in via the session manager instead?

Motley Fool
June 10th, 2013, 10:28 PM
steeldriver: that's very interesting. Ok, so I now have a couple of possible solutions:


Run sudo service lightdm start . This will launch lightdm and let me get into the full Ubuntu desktop. Disadvantage: I have to log in again, and there's no easy way to get rid of it without returning to the console (CTRL-ALT-1) and stopping the service. (or rebooting).


Run xinit . This puts up a minimal GUI with an xterm window, but from within that window I can run gnome-session, which seems to trigger the launch of the full Ubuntu desktop. Disadvantage: the xterm window has to remain running (gnome-session can't be put in the background). Quitting the GUI is a matter of using "Log Out" or hitting Ctrl-C in the xterm window (stopping gnome-session), then exiting the xterm window to quit the X session.


So, nothing quite as quick-and-easy as the old "startx", but at least it works. Thanks!