3

One of my applications is at a infinite loop in the runlevel 1 by printing No protocol specified continuously after running startx -- :1. The run level does not listen to my commands given at the run level. I can of course give kernel Magic*B, but that would close all my other run levels which I do not want. Magic*K is not working.

One nasty way of stopping the run level is by removing components such as /etc/rc1.d/*.*bluetooth.*. However, I do not see this a good way in the long run.

How can you kill all processes at the run level 1 which belongs to the open prompt in the given run level?

John T
  • 163,373
  • 27
  • 341
  • 348
Léo Léopold Hertz 준영
  • 5,686
  • 12
  • 68
  • 115
  • I think you'll have better luck at superuser.com. –  Dec 04 '09 at 21:05
  • your use of the term "runlevel" is confusing. the system is only in a single runlevel at a time. could you please clarify? maybe give the steps you're using to arrive at the problem state. like this: "1. boot into runlevel 1; 2. run `startx -- :1` ; 3. can't `kill -9` it and nothing works!" – quack quixote Dec 23 '09 at 08:37

1 Answers1

3

A clean way to do this would be to use update-rc.d. You can configure the program to not run at all during runlevel 1:

$update-rc.d script_name stop 1 .

where script_name is the init.d script. So for example, to stop Apache from running in runlevel 1:

$update-rc.d apache2 stop 1 .

If you want to completely disable the specified service:

$update-rc.d -f script_name remove

If you are going to disable a service, you should also stop it from running in all runlevels. Next time a service is upgraded, the init.d scripts may be recreated, essentially re-enabling your service.

To disable it in all runlevels:

$update-rc.d script_name stop 80 0 1 2 3 4 5 6 .
John T
  • 163,373
  • 27
  • 341
  • 348