LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-03-2007, 10:47 PM   #1
Mario1776
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Rep: Reputation: 0
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.
 
Old 07-03-2007, 11:16 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,349
Blog Entries: 8

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
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".
 
Old 07-04-2007, 12:26 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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.
 
Old 07-04-2007, 02:12 AM   #4
Mario1776
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Original Poster
Rep: Reputation: 0
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?
 
Old 07-04-2007, 02:17 AM   #5
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
use the command su to log in as root at a terminal
 
Old 07-04-2007, 04:29 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
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

Last edited by reddazz; 07-04-2007 at 04:30 AM.
 
Old 07-04-2007, 08:27 AM   #7
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
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).
 
Old 07-04-2007, 09:18 AM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,349
Blog Entries: 8

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
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.
 
Old 07-04-2007, 12:03 PM   #9
C4bo
Member
 
Registered: Feb 2005
Posts: 51

Rep: Reputation: 15
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

Last edited by C4bo; 07-04-2007 at 12:53 PM.
 
Old 07-04-2007, 01:44 PM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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
 
Old 07-04-2007, 04:53 PM   #11
C4bo
Member
 
Registered: Feb 2005
Posts: 51

Rep: Reputation: 15
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
 
Old 07-12-2007, 04:10 AM   #12
Mario1776
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Original Poster
Rep: Reputation: 0
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?
 
Old 07-12-2007, 01:27 PM   #13
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,619

Rep: Reputation: 104Reputation: 104
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.
 
Old 07-13-2007, 01:48 AM   #14
Mario1776
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 07-13-2007, 04:54 AM   #15
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
What about
xinit /usr/bin/startkde
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a file that Linux writes upon boot that is the EXACT text as the boot screen lostboy Linux - General 21 01-08-2008 02:10 PM
grub issues: dual boot Debian i386 & Debian amd64 ErrorBound Debian 1 03-09-2007 07:41 PM
how boot in text-mode on Debian? xcore_on Linux - Newbie 8 04-01-2006 02:15 PM
switching graphical boot up to text boot up? chunlee Linux - Newbie 4 12-03-2004 03:55 AM
How to turn text anti-aliasing globally off in Debian? sylph Linux - Newbie 2 05-24-2004 05:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration