LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   how to startx automatically on login (http://www.linuxquestions.org/questions/debian-26/how-to-startx-automatically-on-login-377271/)

kushalkoolwal 10-26-2005 10:54 PM

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

kmoffat 10-26-2005 10:58 PM

run gdm for login, and choose fluxbox as default wm?

XavierP 10-28-2005 07:59 AM

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.

lugoteehalt 10-28-2005 11:26 AM

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.

Wells 10-28-2005 01:01 PM

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

kushalkoolwal 10-28-2005 01:56 PM

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

lugoteehalt 10-29-2005 10:22 AM

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.

kmoffat 10-29-2005 10:46 AM

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.

mrcheeks 10-29-2005 10:51 AM

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;


kmoffat 10-29-2005 10:53 AM

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

Thanks.

mrcheeks 10-29-2005 11:50 AM

It doesn't remove the script but the symlink to start it at boot.

kmoffat 10-29-2005 12:16 PM

From the current runlevel only, I assume?


All times are GMT -5. The time now is 07:57 PM.