6

I've installed ubuntu 10.10 x86_64 desktop version, which defaults to Xorg login

I want to temporarily switch this machine to server mode, basically i "suspect" this entails setting to runlevel 3 and headless mode somewhere

what are the details of this? Also very important is how do i re enable desktop mode again?

3
  • there should be a really simple answer for this on linux, but it seems that ubuntu makes it really hard?
    – lurscher
    May 16, 2011 at 2:01
  • Have you tried the solutions given below? I see no comment from you.
    – enzotib
    May 18, 2011 at 14:47
  • you are right, i've added comments on each of the answers
    – lurscher
    May 18, 2011 at 15:25

3 Answers 3

4
+50

If for headless or server mode you mean without graphical interface, it is sufficient to stop gdm:

sudo stop gdm

so that you remain only with virtual consoles.

To enable again the graphical login, start gdm:

sudo start gdm

Be aware that this can make your network stop working.

To avoid this it is probably enough to set the connection as a System connection in network manager

5
  • 1
    Another option is to pre-empt network-manager by configuring networking through /etc/network/interfaces.
    – bgvaughan
    May 16, 2011 at 23:40
  • if i reboot the server it will still boot into gdm
    – lurscher
    May 18, 2011 at 15:24
  • So you should clarify what you means by "temporary" in your question. My solution works without rebooting. If you want to stand without graphics even after reboot you should follow the answer by @Lorem above.
    – enzotib
    May 18, 2011 at 15:27
  • thanks, i appreciate your answer. The reason i've added a bounty is because i was hoping someone would offer a solution using the actual runlevels; whatever scripts/interfaces uses ubuntu for them
    – lurscher
    May 18, 2011 at 15:34
  • I think it should be possible to use runlevels, but not in the default configuration. Doing some modifications to the files in /etc/init and to links in /etc/rc*.d, so that, say, runlevel 3 corresponds to all common services without gdm, you can simply use telinit 3 to go to text-only mode. But I have not tested this, nor advices to do so.
    – enzotib
    May 18, 2011 at 15:42
4

AFAIK Ubuntu doesn't use the runlevel, in fact the /etc/rc*.d directory are the same. If your goal is to not run Xorg automatically just edit /etc/default/grub and modify the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

in

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

then type:

sudo update-grub

to switch back delete "text" and re-run sudo update-grub

3
  • this might be the better option given the above requirements, however i shudder at the thought that to do this i need to tinker with grub
    – lurscher
    May 18, 2011 at 15:25
  • you could also add a custom grub menu item, so that you update-grub once and for all, and to switch to "headless" mode you only need to choose the correct item in the grub menu
    – enzotib
    May 18, 2011 at 15:30
  • that would be acceptable
    – lurscher
    May 18, 2011 at 15:33
0

Try running this command:

sudo telinit 2

That'll make the system go to runlevel 3, if you want to get back to "normal" re-run the command like this:

sudo telinit 5
3
  • after running sudo telinit 3 nothing happens. I reboot and i still get the X server login
    – lurscher
    May 9, 2011 at 16:38
  • 3
    ubuntu uses 2 as default graphical runlevel, and 1 as single user mode.
    – enzotib
    May 9, 2011 at 17:04
  • @enzotib, very non-SySV, but who cares right? so there is not a runlevel for headless server mode?
    – lurscher
    May 9, 2011 at 17:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .