I installed Natty over my 10.10 that started in text mode. Before Natty, after booting, I run the graphical environment with startx and all was fine. Now, with Natty, if I run startx, the graphical environment starts without any gnome or unity menu!.

  • How do I start X and Unity, without a graphical login manager?

Thanks in advance.


Unity needs gdm to be able to start, so you need to start it:

service start gdm

or the good old:

/etc/init.d/gdm start

If you don't want to have to enter your credentials again you can either activate autologin in Gdm or switch the default session to classic in gdm. After login off and stopping gdm, startx should work again.

  • I know that your system works but I would like to run X without gdm, otherwise I have to give again my login credentials: I am already connected to the tty so I want to avoid having to 're-login'. – user17216 May 10 '11 at 15:39
  • 1
    Looks like unity doesn't work if it's not started from gdm, even kdm can't start it. I have edited the question. – Javier Rivera May 10 '11 at 16:45
  • Again I can't test it right now. I should probably install a Natty VM someday. – Javier Rivera May 10 '11 at 16:49
  • both Unity and Classic Gnome require GDM, or some other graphical login control system. As such, you cannot start Unity or Classic Gnome without GDM. – Thomas Ward Aug 4 '11 at 1:26
  • "you cannot start Unity or Classic Gnome without GDM." this is insanity. Surely, this cannot be true? – Merc Oct 18 '15 at 15:02

startx gets its configuration from the systemwide /etc/X11/xinit/xinitrc if you don't have a ~/.xinitrc of your own. I'm on a KDE system so I can't test this, but I think making a ~/.xinitrc for your user with:

exec $HOME/.gnome2/session

might help. If you don't have a gnome session file there, then use /usr/share/gnome/default.session

  • I tried but it does not work because there is no session file in the directory. gnome2. Again, in /usr/share/ gnome there is no file default.session. I tried to understand what is running when you I do 'gdm start' but without result for me. Only a gdm's guru could answer Thanks, anyway Maco. – user17216 May 11 '11 at 12:57

What you're asking for is impossible, Unity depends on Gdm service dbus (display, user etc) and expects you to log in via that method.

It sounds like you wish to log in using an alternative method of authentication. You should look at pam and the different pam.d modules and configurations if the login automatically option is not what you need.

For instance you can log in if there is an ssh key present in the session, or if you have a usb dongle plugged in. etc.

  • "Unity depends on Gdm service dbus (display, user etc) and expects you to log in via that method." Is that an absolute definite? Is Unity really built so that it's impossible to run the desktop environment manually. Surely dbus can be run manually...? – Merc Oct 19 '15 at 0:00
  • 1
    More recent Ubuntu versions will load any required services. So if you launch the desktop via startx or similar, it /should/ load dbus and other services as needed. – Martin Owens -doctormo- Oct 19 '15 at 15:45

Try to create a .xsession file in your home directory like this:

gnome-session --session=classic-gnome

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.