Booting in to the command prompt January 22, 2006
Posted by Carthik in commands, snippets, ubuntu.trackback
Recently, I switched to using multiple monitors at work. At home, however, I have only the laptop screen. I did not want the GUI login (GDM/KDM) to come up on boot. I wanted to be able to change the xorg.conf file before starting X, depending on whether I was at home or at work.
I found a reversible way to disable booting into the graphical display.
To disable graphical login (to log into the command prompt) do:
$echo "false" | sudo tee /etc/X11/default-display-manager
The next time you reboot, you will find yourself staring at the command prompt.
To enable it again, do:
$echo "/usr/bin/gdm" | sudo tee /etc/X11/default-display-manager
Note: replace gdm in the above with kdm if you use kde’s display manager, or xdm, if, for some reason you use that.
Hat tip to Peter Garrett on the ubuntu-users list.
I found it easier when running multiple monitors to simply mod the xorg.conf layout to have a second screen (on a separate device) in my ServerLayout. If there is no external monitor plugged in, I simply work on the primary laptop monitor, but if an external monitor is plugged in I can load apps in that display too.
Here you are an alternative way of doing it
http://gr33ndata.blogspot.com/2006/01/get-out-of-gnome.html
This just didn’t sound right to me…
Why can’t you just make a bash script to ask where you are at boot? I mean, I’m not very familier with the Debian/Ubuntu boot process, but it was possible to do that in ArchLinux.
I think you mean /usr/sbin/gdm
rcconf also lets you enable or disable kdm or gdm without much room for error.
Supposing you have two x server layouts (one for each monitor), here’s what works for me (part of my /etc/X11/xorg.conf):
Section “ServerLayout”
Identifier “CustomerX”
Screen “FP91G”
InputDevice “Generic Keyboard”
InputDevice “Configured Mouse”
InputDevice “Synaptics Touchpad”
EndSection
Section “ServerFlags”
DefaultServerLayout “OnTheRoad”
EndSection
Section “ServerLayout”
Identifier “OnTheRoad”
Screen “LCD”
InputDevice “Generic Keyboard”
InputDevice “Configured Mouse”
InputDevice “Synaptics Touchpad”
EndSection
Then if I am on the road I just issue a “startx” command. If I am at Customer X, I issue :
startx — – CuxtomerX
thnks
Help please,
I managed to boot to command line using
$echo “false” | sudo tee /etc/X11/default-display-manager
but I cant get back to GUI with
$echo “/usr/bin/gdm” | sudo tee /etc/X11/default-display-manager
I dont appear to have a gdm, kdm kde directory. under user bin
Im using hardy 8.04
I hope you’ve sorted your box now already(!) but for future viewers, it should be /usr/sbin/gdm (not /usr/bin/gdm). KDM, if present, is in /usr/bin however – how confusing.
The more reliable way to select your display manager is dpkg-reconfigure gdm and then select from the list. Substitute kdm or xdm, etc if you have one of those installed instead.
I think you mean
Help please,
I managed to boot to command line using