LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Boot to Text in Debian (https://www.linuxquestions.org/questions/debian-26/boot-to-text-in-debian-566470/)

Mario1776 07-03-2007 10:47 PM

Boot to Text in Debian
 
I have installed the latest stable version of Debian on my DEC Alpha with a network install using debian-40r0-alpha-netinst.iso. When the computer boots it automatically goes in to the GUI login shown here. I would like for it to boot to a command line text interface. Can anyone tell me how to do this?

When it does get setup to boot to a text interface, I would like to be able to start the GUI manually. How would I do this?

Once the GUI is started how can I exit the GUI and go back to the text interface? On this topic I have gotten the suggestion to use Ctrl-Alt-F1 to go from the GUI to text, but from what I understand when using Ctrl-Alt-F1 the GUI is still running. I want to actually exit the GUI so that it is no longer running and be at a command line.

I used to use CentOS in which there was a key sequence (that I cannot recall) that could be used to exit the GUI, then to get back in to the GUI you would just enter "startx" at the command line and that would start the GUI. Trying to find out how to do this in Debian has been like beating my head against a wall. Please advise if you can.

IsaacKuo 07-03-2007 11:16 PM

The easiest way to deactivate the gdm graphical login manager is to just uninstall it (apt-get remove gdm).

I can think of several ways to only have gdm not start, but I'm not sure what the prefered method is. I'd guess the prefered method is to remove s21gdm from /etc/rc5.d.

I don't know if there's a magic key combination to kill gdm. I know that if you log in to a command prompt, you can gracefully stop gdm with "/etc/init.d/gdm stop".

farslayer 07-04-2007 12:26 AM

mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm
That will prevent gdm from starting automatically and leave the link if you want to change it back later.

to easily manage services in Debian you can install sysv-rc-conf it will give you a nice curses interface for enabling and disabling services.

Mario1776 07-04-2007 02:12 AM

IsaacKuo
1st you suggested uninstalling gdm.
I do not want to get rid of the GUI, I just to be able to choose whether or not I am using it.

2nd you suggest removing s21gdm from /etc/rc5.d.
OK. So if this action will lead to booting to the command line, how would I start the GUI from the command line should I wish to do so?

3rd, with regard to going from GUI to text you suggest "/etc/init.d/gdm stop"
When I tried entering "/etc/init.d/gdm stop" I received the error
"Stopping GNOME Display Manager: gdmstart-stop-daemon: warning: failed to kill 22"
"13: Operation not permitted"

farslayer
You suggest using mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm to boot to text.
OK. So if this action will lead to booting to the command line, how would I start the GUI from the command line should I wish to do so?

You also mention installing sysv-rc-conf. I found this website that provides instructions for installing sysv-rc-conf. When I try to follow the instructions I receive the errors:
E: Could not open lock file /var/lib/dpkg/lock - open (13 permission denied)
E: Unable to lock the administrative directory (/var/lib/dpkg/), are you root?

When I logout and try to log in as root I get the message "The system administrator is not allowed to login from this screen."
WTF?

AceofSpades19 07-04-2007 02:17 AM

use the command su to log in as root at a terminal

reddazz 07-04-2007 04:29 AM

You can prevent automatic running of the GUI by disabling your login manager be it KDM, GDM or XDM from running at boot time. To disable the login manager from automatically running at boot up, do
Code:

#update-rc.d -f gdm remove
Replace gdm with kdm or xdm if they are what you use.

To start X manually, you would then have to login at the command prompt and enter the command "startx".

To reset your login manager so that it runs at boot up, do
Code:

#update-rc.d -f gdm defaults

Telemachos 07-04-2007 08:27 AM

Quote:

Originally Posted by Mario1776
3rd, with regard to going from GUI to text you suggest "/etc/init.d/gdm stop"
When I tried entering "/etc/init.d/gdm stop" I received the error
"Stopping GNOME Display Manager: gdmstart-stop-daemon: warning: failed to kill 22"
"13: Operation not permitted"
<snip>
You also mention installing sysv-rc-conf. I found this website that provides instructions for installing sysv-rc-conf. When I try to follow the instructions I receive the errors:
E: Could not open lock file /var/lib/dpkg/lock - open (13 permission denied)
E: Unable to lock the administrative directory (/var/lib/dpkg/), are you root?

When I logout and try to log in as root I get the message "The system administrator is not allowed to login from this screen."
WTF?

In Debian, by default root is not allowed to log in through a gui. But, as you see from the problems above, you need to have superuser privileges to stop/start daemons like GDM and to add software. The default way in Debian to do this is to log into GDM as a regular user, then open a terminal and use "su". You could also add yourself to the sudoers file, if you prefer sudo.

Other than that, I think you have the basics of your answer: sysv-rc-conf will allow you to chose what init scripts start at each runlevel. One way to do what you want is to remove GDM from runlevel two (Debian's default). After boot, you should be at a text-only console. Then to get to a gui login, you simply enter (as root or with sudo) telinit 3, and to get back to the text only, you enter (from a gui terminal as root or with sudo) telinit 2. I think that would work, though it might require further tweaking to make sure that when you go back to the text-only runlevel GDM brings down all parts of Gnome (or whatever gui you use).

IsaacKuo 07-04-2007 09:18 AM

You can also log in as root at a text console using ctrl-alt-f1. It takes less time than logging in to gdm, and if you stop gdm then your terminal session doesn't get yanked down along with the rest of X.

C4bo 07-04-2007 12:03 PM

Hej

I use sid so i install a base system to start with. but i think you can do the same. then i install wat i need or wat the box can run.
wenn you do it this way, you will boot up to user. then you start x.
no kdm or gdm if you downt need it.
bertil

farslayer 07-04-2007 01:44 PM

Quote:

Originally Posted by Mario1776
farslayer
You suggest using mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm to boot to text.
OK. So if this action will lead to booting to the command line, how would I start the GUI from the command line should I wish to do so?


startx as a normal user will launch the gui.


Quote:

You also mention installing sysv-rc-conf. I found this website that provides instructions for installing sysv-rc-conf. When I try to follow the instructions I receive the errors:
E: Could not open lock file /var/lib/dpkg/lock - open (13 permission denied)
E: Unable to lock the administrative directory (/var/lib/dpkg/), are you root?

When I logout and try to log in as root I get the message "The system administrator is not allowed to login from this screen."
WTF?
Open a Terminal window (Applications -> Accessories -> Terminal )
switch to the root user, you can not install system software unless you have root user permissions.
Quote:

default@debian:~$ su -
Password:
debian:~#
Install sysv-rc-conf

Quote:


debian:~# aptitude update
debian:~# aptitude keep-all
debian:~# aptitude install sysv-rc-conf
debian:~# sysv-rc-conf

C4bo 07-04-2007 04:53 PM

Hej
This is wat i mean.(sory for bad english).
I use use deb sid amd 64 and gentoo 86. and wen you install the base system you make root and a user mode. so if your box is p11 with 128 ram you su to root in textmood and apt-get. then you downt use gnome or kde. is to havy.

Dam smal and all the rest of dist for old box with ram < then 128 is based on deb. and gentoo. so keeb on learning and hav fun.
Bertil

Mario1776 07-12-2007 04:10 AM

I executed "mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm" at the command line and from that point I booted to the command line. It worked perfectly until I decided to make things more complicated. I decided to install KDE. KDE installed surprisingly easy, just "aptitude install kde" and it was in. I ran "mv /etc/rc2.d/K21gdm /etc/rc2.d/S21gdm" to switch back to booting to the GUI. Then I selected "Session" at the log in manager and chose KDE. A window popped up asking if I wanted to use KDE as the default desktop and I selected yes. From within KDE I ran "mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm" to go back to booting to the command line. When I next booted the computer it correctly came up to the command line, but when I entered startx the gnome desktop loaded instead of the KDE desktop.

How can I change the default desktop for startx to display to kde?

HappyTux 07-12-2007 01:27 PM

Quote:

Originally Posted by Mario1776
I executed "mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm" at the command line and from that point I booted to the command line. It worked perfectly until I decided to make things more complicated. I decided to install KDE. KDE installed surprisingly easy, just "aptitude install kde" and it was in. I ran "mv /etc/rc2.d/K21gdm /etc/rc2.d/S21gdm" to switch back to booting to the GUI. Then I selected "Session" at the log in manager and chose KDE. A window popped up asking if I wanted to use KDE as the default desktop and I selected yes. From within KDE I ran "mv /etc/rc2.d/S21gdm /etc/rc2.d/K21gdm" to go back to booting to the command line. When I next booted the computer it correctly came up to the command line, but when I entered startx the gnome desktop loaded instead of the KDE desktop.

How can I change the default desktop for startx to display to kde?

The easiest way is simply use the startkde command (you need the ksmserver package installed to get it) and let startx continue to be gnome.

Mario1776 07-13-2007 01:48 AM

Quote:

Originally Posted by HappyTux
Quote:

Originally Posted by Mario1776
How can I change the default desktop for startx to display to kde?
The easiest way is simply use the startkde command (you need the ksmserver package installed to get it) and let startx continue to be gnome.
HappyTux did not specify how to install "ksmserver". I took a guess that the command "aptitude install ksmserver" would install ksmserver. I ran the install command and then tried to run the command "startkde". The effort was not successful. The following image shows the output the two afore mentioned commands generated.

http://img256.imageshack.us/my.php?i...mserverpz0.jpg

nx5000 07-13-2007 04:54 AM

What about
xinit /usr/bin/startkde


All times are GMT -5. The time now is 08:51 PM.