LinuxQuestions.org
Help answer threads with 0 replies.
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 10-26-2005, 09:54 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
how to startx automatically on login


I am using Debian Sarge3.1. I just installed Xorg from testing repo. Also Installed fluxbox. I added exec /usr/bin/fluxbox in the file .xinitrc.

Now, I have to start fluxbox by giving the command startx whenever I log into my account. How can I automate this process i.e. whenever I log into my account, the startx command should be launched so that my Fluxbox window manager starts automatically.

Thanks
 
Old 10-26-2005, 09:58 PM   #2
kmoffat
Member
 
Registered: Jul 2003
Location: near Seattle
Distribution: Debian/Ubuntu/Suse
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
run gdm for login, and choose fluxbox as default wm?
 
Old 10-28-2005, 06:59 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Open your /etc/inittab file in an editor. Look at the listing of the various runlevels. Here's the relevant part of mine:
Code:
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Version:      @(#)inittab             2.04    17/05/93        MvS
#                                       2.10    02/10/95        PV
#                                       3.00    02/06/1999      PV
#                                       4.00    04/10/2002      PV
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified by:  Patrick J. Volkerding, <volkerdi@slackware.com>
#

# These are the default runlevels in Slackware:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
(I run Slackware, your entries may be different.

In the "id:3:initdefault:" change the number to whatever is shown in your inittab file as the "# 4 = X11 with KDM/GDM/XDM (session managers)" equivalent. Reboot and you will have a graphical login.
 
Old 10-28-2005, 10:26 AM   #4
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Recently installed Sarge and had opposite problem: X starting automatically drives me insane.

Stopped it by commenting out last line of the configuration file of the thing that starts X - is it xdm? Surprisingly I think this is what you are supposed to do: xdm stops running outomatically and is a dependency of X.

So you could try the opposite.

Hope helps.

Sorry the last line is in Xsession, I think /etc/X11/Xsession, not in xdm's configuration file. Presumably this is for when xdm is doing the managing.

Last edited by lugoteehalt; 10-31-2005 at 09:40 AM.
 
Old 10-28-2005, 12:01 PM   #5
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Quote:
Originally posted by lugoteehalt
Recently installed Sarge and had opposite problem: X starting automatically drives me insane.

Stopped it by commenting out last line of the configuration file of the thing that starts X - is it xdm? Surprisingly I think this is what you are supposed to do: xdm stops running outomatically and is a dependency of X.

So you could try the opposite.

Hope helps.
It is somewhat different in debian. By default, when X is installed on debian the GDM manager is also installed. The GDM manager is called from the rc2.d symlinks, and not from /etc/inittab directly. As such, to get rid of GDM in debian it is a simple task of removing the symbolic link in /etc/rc2.d that point to GDM (usually S99gdm).

From my experience, debian only uses four different run levels:

0: Shutdown
1: Single User
2: Multi-User
6: Reboot
 
Old 10-28-2005, 12:56 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally posted by XavierP
Open your /etc/inittab file in an editor. Look at the listing of the various runlevels. Here's the relevant part of mine:
Code:
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Version:      @(#)inittab             2.04    17/05/93        MvS
#                                       2.10    02/10/95        PV
#                                       3.00    02/06/1999      PV
#                                       4.00    04/10/2002      PV
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified by:  Patrick J. Volkerding, <volkerdi@slackware.com>
#

# These are the default runlevels in Slackware:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
(I run Slackware, your entries may be different.

In the "id:3:initdefault:" change the number to whatever is shown in your inittab file as the "# 4 = X11 with KDM/GDM/XDM (session managers)" equivalent. Reboot and you will have a graphical login.
Thanks I will try your suggestion. Also, someone said that when we installed X, gdm gets automatically installed in Debian. But in my case when I installed Xorg from testing repository, kdm did not get installed. Is this something unusal?

Nways, I don;t plan to install KDM, as it takes too much of space on my system and th at;s why I would just like to have a simple lightweight WM with minimal login manager.

Thanks
 
Old 10-29-2005, 09:22 AM   #7
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally posted by lugoteehalt
Recently installed Sarge and had opposite problem: X starting automatically drives me insane.

Stopped it by commenting out last line of the configuration file of the thing that starts X - is it xdm? Surprisingly I think this is what you are supposed to do: xdm stops running outomatically and is a dependency of X.

So you could try the opposite.

Hope helps.
I was talking about Debian Sarge. There's a mistake in what I said it isn't the xdm configuration file its another file. Sorry to be vaugue but have an idea it's called session, or nearly, and lives in same directory as previous.
 
Old 10-29-2005, 09:46 AM   #8
kmoffat
Member
 
Registered: Jul 2003
Location: near Seattle
Distribution: Debian/Ubuntu/Suse
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
Quote:
Originally posted by lugoteehalt
Recently installed Sarge and had opposite problem: X starting automatically drives me insane.
Code:
cd /etc/rc2.d
mv S99gdm s99gdm
will stop gdm from running, delivering you to a command line when you boot.

(assuming you haven't changed the default runlevel, which is 2.
 
Old 10-29-2005, 09:51 AM   #9
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
In debian you don't necessarily have to edit /etc/inittab.
If you have installed gdm or kdm with synaptic or apt-get
Code:
apt-get install gdm kdm
, apt should have asked you if you want to start the login manager at boot.
If not,
Code:
update-rc.d -f gdm remove;
update-rc.d -f kdm remove;
update-rc.d kdm defaults;
reboot;
To prevent X to start at boot :
Code:
update-rc.d -f gdm remove;
update-rc.d -f kdm remove;
 
Old 10-29-2005, 09:53 AM   #10
kmoffat
Member
 
Registered: Jul 2003
Location: near Seattle
Distribution: Debian/Ubuntu/Suse
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
Does the "update-rc.d -f gdm remove;" command actually remove the gdm script or just rename it?

Thanks.
 
Old 10-29-2005, 10:50 AM   #11
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
It doesn't remove the script but the symlink to start it at boot.
 
Old 10-29-2005, 11:16 AM   #12
kmoffat
Member
 
Registered: Jul 2003
Location: near Seattle
Distribution: Debian/Ubuntu/Suse
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
From the current runlevel only, I assume?
 
  


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
startx automatically free_andrew Slackware 17 11-10-2014 09:40 AM
Execute an application automatically after startx gilan Debian 6 03-24-2005 10:34 PM
automatically enable numlock on startx dbkluck Linux - Software 2 06-19-2004 11:53 AM
How to startx automatically (and a modem question) prcarp Slackware - Installation 10 02-22-2004 09:58 AM
startx -- -dpi 100 .. automatically? doublefailure Linux - General 5 03-17-2003 10:19 PM

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

All times are GMT -5. The time now is 03:40 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
Open Source Consulting | Domain Registration