LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-19-2007, 09:24 PM   #1
sureshot324
Member
 
Registered: Mar 2004
Posts: 49

Rep: Reputation: 15
How to start X server automatically?


I have done a Debian minimum install, and installed xorg, gdm, and xfce. When I boot up my machine, I get a command prompt login. After I login, I type startx, and it successfully loads xserver and I get to the desktop.

How do I make it automatically start xserver and use a graphical login (GDM which I've already installed)?
 
Old 08-19-2007, 10:22 PM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
go to the file /etc/inittab and change id:2:initdefault to id:5:initdefault

Last edited by ncsuapex; 08-19-2007 at 10:25 PM. Reason: 2
 
Old 08-20-2007, 01:01 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by ncsuapex View Post
go to the file /etc/inittab and change id:2:initdefault to id:5:initdefault
That won't work on Debian and most Debian based distros because the way they configure runlevels is different to most distros.

Code:
#update-rc.d gdm defaults
That should start a GUI at boot up.
 
Old 08-20-2007, 02:50 PM   #4
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
^

hmm not trying to stir anything up but it's been a while since I used debian so I googled "debian and runlevel" just to be sure and found this page.

http://www.debianadmin.com/debian-an...un-levels.html



Quote:
If you wanted runlevel 3 to be the default, then you need to edit /etc/inittab.

# The default runlevel.

id:2:initdefault:

You’d change the ‘2′ to a ‘3′. Next time you reboot, your system will start in runlevel 3. There will be no display manager running in runlevel 3, because you turned it off. Therefore, runlevel 3 will become text only, and it will be the default. If that’s what you want to do.
 
Old 08-20-2007, 03:30 PM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
/etc/init.d/gdm start

That is assuming that gdm isn't running yet (check ps -ax to make sure).
 
Old 08-20-2007, 03:52 PM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by ncsuapex View Post
^

hmm not trying to stir anything up but it's been a while since I used debian so I googled "debian and runlevel" just to be sure and found this page.

http://www.debianadmin.com/debian-an...un-levels.html
On Debian, runlevels 3 to 5 are configured the same as runlevel 2 unlike in Red Hat and some other distros where runlevel 5 (or 4 in the case of Slack) is configured to start a login manager. You can change the runlevel on Debian to runlevel 5, but thats not going to automatically start a login manager at boot up.

The link you provided has the similar info that I just posted.
 
  


Reply



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
Terminal server start automatically on Edubuntu? maxsanders Linux - Server 1 07-01-2007 03:31 AM
Start a server automatically? timmyk0 Linux - General 8 06-24-2006 02:58 AM
Can't get apache server to automatically start on boot bowie101 Linux - Newbie 11 05-03-2006 11:07 AM
Automatically start a game server when system boots Kahless Linux - Software 6 08-01-2004 01:23 AM
how to start automatically apache server when boot-up? eye Linux - Software 7 10-28-2003 01:22 PM

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

All times are GMT -5. The time now is 04:31 PM.

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
Open Source Consulting | Domain Registration