LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-02-2005, 06:35 AM   #1
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
X starts up automatically & other problems


Hello
I had a minimal debian (etch) install. I installed the packages x-window-system and wmii. Then when I started my computer; instead of prompting me for my password in text mode, my computer launched automatically X and I was asked to log in with a gui. To avoid this, I commented the only line of the file /etc/X11/default-display-manager :
Code:
# /usr/bin/X11/xdm
But this is not the proper way to do this : at the end of the boot process, my box still wants to launch X :
Code:
Starting up X font server socket directory /tmp/.font-unix...done
Starting X font server: xfs
Starting periodic command scheduler: cron
Not starting X display manager (xdm); it is not the default display manager

Debian GNU/Linux testing/unstable box tty1

box login :
I've read something about changing the default runlevel in /etc/inittab, but it is already set to 2 :
Code:
id:2:initdefault:
Other problem: twm is installed and is launched by X when no .xinitrc (with "exec wmii") can be found. I don't need this wm. Of course I can uninstall it, but I also would like to find the config files which define twm as the default wm, and modify them.

Summary:
1) How can I properly prevent X being launched while my computer boots?
2) Where are the config files which specify that twm is the default wm for X? (how can I properly get rid of twm)?

Thanks in advance ++
Kloss
 
Old 12-02-2005, 09:48 AM   #2
fsateler
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Debian Unstable
Posts: 107

Rep: Reputation: 15
To prevent X from starting, remove /etc/rc2.d/S99xdm, either manually, or with update-rc.d (this is the recommended method, see the man page for details). Changing runlevels doesn't work on debian because by default all runlevels are equal (except, of course, of course, runlevels 0, 1 and 6).
I don't know how to change that, although a dpkg -L twm might give some hints (this commands lists all files installed by twm).
 
Old 12-02-2005, 10:46 AM   #3
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Original Poster
Rep: Reputation: 15
Thanks for your answer.
First of all I uninstalled x-window-system and installed x-window-system-core - this removed all the useless apps like twm.
At the end of the boot process, I got:
Code:
Setting X server socket directory /tmp/.X11-unix...done.
Setting up ICE socket directory /tmp/.ICE-unix...done.
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting internet superserver: inetd
Starting Xprint server: Xprt.
/etc/rc2.d/S20xprint: ## ERROR: Can't find "/usr/X11R6/bin/Xprt".
Starting periodic command scheduler: cron

Debian GNU/Linux testing/unstable box tty1

box login :
Following your advice, I simply did:
Code:
cd /etc/rc2.d
mv S20xprint disabled.S20xprint
mv s99xdm disabled.s99xdm
This solved the problem. Thanks.
++
 
Old 12-02-2005, 01:49 PM   #4
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 866

Rep: Reputation: 45
Quote:
Changing runlevels doesn't work on debian because by default all runlevels are equal (except, of course, of course, runlevels 0, 1 and 6).
I don't know how to change that, although a dpkg -L twm might give some hints (this commands lists all files installed by twm).
The easy way I stumbled on is to use SysV Init Editor. You edit the run levels graphically.
I have set up run level 2 to start Gnome and run level to start KDE.

Not perfect because when I boot to level 2 I get a message on the lines "GDM is not your default, so I won't start it". I have to startx, at which point Gnome starts OK.

I haven't played with it any further but see no reason why one cannot play with another level until it come out right. I don't think that anything you do wrong here will affect other levels BUT I COULD BE VERY WRONG!
 
Old 12-02-2005, 01:51 PM   #5
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
I Thought It Was 3

Shouldn't the runlevel in inittab be set to 3 if you don't want to start x?
 
Old 12-02-2005, 03:32 PM   #6
acker
Member
 
Registered: Apr 2004
Location: Timisoara, Romania
Distribution: Debian
Posts: 90

Rep: Reputation: 15
Re: I Thought It Was 3

Quote:
Originally posted by Dragineez
Shouldn't the runlevel in inittab be set to 3 if you don't want to start x?
No. And it shouldn't be 2 either. You'll have to remove the appropriate symbolic links from /etc/rcX.d/ (See man update-rc.d for a way to change that links)
In other distros changing to level 2 will stop (and not start) the gdm, xdm, kdm, whatever... But this is Debian and we love it
 
Old 12-02-2005, 08:10 PM   #7
fsateler
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Debian Unstable
Posts: 107

Rep: Reputation: 15
Re: Re: I Thought It Was 3

Quote:
Originally posted by acker
In other distros changing to level 2 will stop (and not start) the gdm, xdm, kdm, whatever... But this is Debian and we love it
As far as I know, most distros follow RedHat's lead (actually I don't even know if it is indeed RedHat's, but anyways), as follows:[list=1][*]Single User (Mainteinance)[*]Multiple users, command line, no network[*]Multiple users, command line, with network[*]Unused[*]Multiple users, with X (GUI)[/list=1]
 
Old 12-02-2005, 11:43 PM   #8
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 866

Rep: Reputation: 45
This is Debian! Run Level 1 is Single user - for maintainance.

2-5 are identical, out of the box. At first I scratched my head over this but then realised that that you can configure them as you wish.

You'll be relieved that 0 and 6 are conventional.
 
Old 12-09-2005, 12:17 AM   #9
Bremsstrahlung
Member
 
Registered: Jul 2005
Location: Maine, USA
Distribution: Debian & Slackware
Posts: 77

Rep: Reputation: 15
The best way to edit each runlevel, instead of deleting each symbolic link, is by changing them. Every symlnk that starts a program begins with an "S" (for "start" I presume). If you change just that letter to "K" (for "kill" no doubt) then it will kill that process if it is running. This preserves the differences between runlevels, so you can switch back and forth normally at your will. It's also just good practice. And I've had a lot of fun seeing what kinds of crazy runlevels I can think up
 
  


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
knode starts automatically?? attila_66 Linux - Newbie 1 10-22-2005 04:50 PM
How do I start a program automatically when KDE starts up? zmaint Linux - Software 8 12-21-2004 04:52 PM
mozilla starts automatically bm1 Linux - Software 1 08-29-2004 06:10 AM
how do i automatically mount partitions when system starts coolinuxguy246 Linux - Newbie 3 04-25-2004 09:38 AM
Run programs automatically when KDE starts koyi Linux - General 2 09-01-2003 06:34 AM

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

All times are GMT -5. The time now is 05:04 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