Re: CTRL+ALT+Backspace will kill the X-server

2003-11-26 Thread Arnt Karlsen
On Fri, 21 Nov 2003 11:57:19 -0500, 
David Z Maze [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]:

 John Peter [EMAIL PROTECTED] writes:
 
  Or, if you want to get X out of the way, edit /etc/inittab , look
  for the lines :
  # The default runlevel.
  id:2:initdefault:
  and replace the runlevel 2 with 1.
 
 ...which will also conveniently stop your Web server, your ssh server,
 your power-management daemon, your print system, multiple console
 logins, and so on.  Far less brutal to just remove the
 /etc/rc2.d/S99xdm link.

..I just use one of the vacant runlevels and customize that, 
in RH et al runlevel 4, Debian has 3,4 and 5 free.

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-25 Thread David Z Maze
John Peter [EMAIL PROTECTED] writes:

 Or, if you want to get X out of the way, edit /etc/inittab , look for
 the lines :
 # The default runlevel.
 id:2:initdefault:
 and replace the runlevel 2 with 1.

...which will also conveniently stop your Web server, your ssh server,
your power-management daemon, your print system, multiple console
logins, and so on.  Far less brutal to just remove the
/etc/rc2.d/S99xdm link.

-- 
David Maze [EMAIL PROTECTED]  http://people.debian.org/~dmaze/
Theoretical politics is interesting.  Politicking should be illegal.
-- Abra Mitchell


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-25 Thread csj
On November 21, 2003 at 8:13AM +0800,
Dan Jacobson [EMAIL PROTECTED] wrote:

  is that the usual way to get rid of X windows if in case one
  wants just to use the humble console?  I know there is a
  startx program, but no stopx.
 
 Preston CTRL+ALT+Backspace will kill the X-server.
 
 Indeed it does, with no questions asked.
 
 But then it just springs back to life again, with a login
 prompt (at least with xdm here).
 
 Let's pretend my monitor is being borrowed for a few days and
 being replaced by a VT100, and I want to properly end all X
 processes and revert to plain tty mode, without rebooting or
 editing any files.

The stop xdm.  At least with gdm, I can do /etc/init.d gdm
stop.  Doesn't xdm have a file in /etc/init.d?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-25 Thread David Z Maze
Sridhar M.A. [EMAIL PROTECTED] writes:

 If you want to temporarily disable booting to xdm on your VT100 and
 revert to xdm once you get back the monitor, just disable the xdm
 startup from all levels.

# update-rc.d -f xdm remove

 After you get back the monitor,

# update-rc.d xdm defaults

Neither of these are the right answer.  (a) will cause the /etc/rc?.d
links to be put back into place if the package gets upgraded; (b) will
put the links back, but at the wrong priority, so xdm would get
started before things like cron.  Not a huge deal, but it's probably
easier to leave one runlevel (say, 5) in the pristine state; delete
/etc/rc2.d/S99xdm if you don't want xdm to start, and then use 'ln -s'
to make a link identical to what's in /etc/rc5.d if you want to bring
it back.

-- 
David Maze [EMAIL PROTECTED]  http://people.debian.org/~dmaze/
Theoretical politics is interesting.  Politicking should be illegal.
-- Abra Mitchell


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-25 Thread Mark Roach
On Thu, 2003-11-20 at 19:13, Dan Jacobson wrote:
[...]
 Let's pretend my monitor is being borrowed for a few days and being
 replaced by a VT100, and I want to properly end all X processes and
 revert to plain tty mode, without rebooting or editing any files.

Well, if you _really_ mean you're getting a vt100, you will need to set
up getty on your serial port ;-) And X will never (AFAIK) even attempt
to display over a serial connection.

(yes, I know what you actually meant)
-- 
Mark Roach


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-25 Thread Wilko Fokken
On Fri, Nov 21, 2003 at 12:00:32PM -0500, David Z Maze wrote:
 Sridhar M.A. [EMAIL PROTECTED] writes:
 
  If you want to temporarily disable booting to xdm on your VT100 and
  revert to xdm once you get back the monitor, just disable the xdm
  startup from all levels.
 
 # update-rc.d -f xdm remove
 
  After you get back the monitor,
 
 # update-rc.d xdm defaults
 
 Neither of these are the right answer.  (a) will cause the /etc/rc?.d
 links to be put back into place if the package gets upgraded; (b) will
 put the links back, but at the wrong priority, so xdm would get
 started before things like cron.  Not a huge deal, but it's probably
 easier to leave one runlevel (say, 5) in the pristine state; delete
 /etc/rc2.d/S99xdm if you don't want xdm to start, and then use 'ln -s'
 to make a link identical to what's in /etc/rc5.d if you want to bring
 it back.
 

I have written a bash script to remove/restore any file entry
  in '/etc/init.d',
including ALL links and save them
  to '/etc/init.d/SAVE/'   as file.tar.gz.



e.g. init.d -s xdm
  saves /etc/init.d/xdm and ALL links referring to xdm 
  to /etc/init.d/SAVE/xdm.tar.gz

 init.d -r xdm will restore xdm and ALL links to place

The advantage: any change made to xdm or to any link adjustment will
be saved and, if needed, later restored to its original state.

One can easily test the system's reaction to removing a file, and, if
problems show up, restore the file.




Here is this script:   (on my system stored in '/usr/local/sh')
-


#!/bin/sh

# \wwf 9.3.02

USE ()  {
  echo
  echo 
  echo Save+Remove // Restore  Start_Stop Files in /etc/init.d/
  echo 
  setterm -bold on
  echo 'including related Links in   /etc/rc?.d/'
  setterm -bold off
  echo
  echo
  echo usage:
  echo
  echo $0  [{-s|-r}] fname ...(-s = default)
  echo 
  echo '( put Filename Wildcards in Double-Quotes:   *,  ? )'
  echo
  echo
  echo 'Options:'
  echo ''
  echo '-s = (S)avefiles to   /etc/init.d/SAVE/file.tar.gz'
  echo '-r = (R)estore files from /etc/init.d/SAVE/file.tar.gz'
  echo
  echo '(-s:  Files are MOVED from Directories to Archive)'
  echo '(-r:  Files are MOVED from Archive to Directories)'
  echo
  echo
}


Save () {
  test -d /etc/init.d/SAVE || mkdir /etc/init.d/SAVE

  echo Save+Deinstall init.d Files to /etc/init.d/SAVE/file.tar.gz
  echo =
  cd /etc/init.d
  for FILE in [EMAIL PROTECTED]; do
echo

#   Skip bad Params
if [ ! -f ${FILE} ]; then
  echo /etc/init.d/${FILE}:  NO FILE -- skipping Param
  echo --
  echo
  continue  ## comment this line: save links only
#   ## when /etc/init.d/file is missing
fi

if [ -f SAVE/${FILE}.tar.gz ]; then
  echo Dest_Archive already exists:
  echo NO REwriting to /etc/SAVE/${FILE}.tar.gz -- skipping Param
  echo --
  echo
  continue
fi

#   Begin of Job
echo -n Save+Deinstall /etc/init.d/${FILE} ? ; read answ
case $answ in
  y*|Y*|j*|J*)  echo Answer = ${answ};;   # Save Files
  *  )  echo Answer = ${answ}:NO Action -- skipping Param
echo
continue
esac

echo
echo Saving spec''d Files to /etc/init.d/SAVE/${FILE}.tar.gz
echo -
find /etc/rc* /etc/init.d -name *${FILE} | \
tar -cvzf /etc/init.d/SAVE/${FILE}.tar.gz -PT -
echo
echo Comparing Tar Archive to orig. Source Files
echo ---
tar -dvzf /etc/init.d/SAVE/${FILE}.tar.gz

if [ `echo $?` = 0 ]; then
  echo
  echo ==
  echo All Files saved OK
  echo ==
  echo
  echo -n Remove saved Source Files now ? ; read answ
  case $answ in
y*|Y*|j*|J*) echo Answer = ${answ};;  # Remove Files
*  ) echo Answer = ${answ}: Files NOT removed
iecho
 continue
  esac
  echo
  echo Removing saved Files from /etc/rc*/   /etc/init.a/
  find /etc/rc* /etc/init.d -name *${FILE} -exec rm {} \;
else
  echo
  echo ERROR, BAD Match!!
  echo ==
  echo /etc/init.d/SAVE/${FILE}.tar.gz differs to
  echo Source Files in /etc/rc*/, /etc/init.d/
  echo NO File removed
  echo
fi
  done
}


Restore ()  {
  echo Reinstall Files from /etc/init.d/SAVE/file.tar.gz
  echo ---
  cd /etc/init.d/SAVE/
  for 

Re: CTRL+ALT+Backspace will kill the X-server

2003-11-25 Thread Kent West
Wilko Fokken wrote:

On Fri, Nov 21, 2003 at 12:00:32PM -0500, David Z Maze wrote:
 

Sridhar M.A. [EMAIL PROTECTED] writes:

   

If you want to temporarily disable booting to xdm on your VT100 and
revert to xdm once you get back the monitor, just disable the xdm
startup from all levels.
  # update-rc.d -f xdm remove

After you get back the monitor,

  # update-rc.d xdm defaults
 

Neither of these are the right answer.  (a) will cause the /etc/rc?.d
links to be put back into place if the package gets upgraded; (b) will
put the links back, but at the wrong priority, so xdm would get
started before things like cron.  Not a huge deal, but it's probably
easier to leave one runlevel (say, 5) in the pristine state; delete
/etc/rc2.d/S99xdm if you don't want xdm to start, and then use 'ln -s'
to make a link identical to what's in /etc/rc5.d if you want to bring
it back.
   

I have written a bash script to remove/restore any file entry
 in '/etc/init.d',
including ALL links and save them
 to '/etc/init.d/SAVE/'   as file.tar.gz.
 

snip

If there's a startup script I want to temporarily disable, I just put 
the line exit 0 as the first executable line in the script. Easy to 
do; easy to undo.

--
Kent


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-21 Thread John Peter
Travis Crump wrote:

Dan Jacobson wrote:

is that the usual way to get rid of X windows if in case one
wants just to use the humble console?  I know there is a startx
program, but no stopx.



Preston CTRL+ALT+Backspace will kill the X-server.

Indeed it does, with no questions asked.

But then it just springs back to life again, with a login prompt (at
least with xdm here).
Let's pretend my monitor is being borrowed for a few days and being
replaced by a VT100, and I want to properly end all X processes and
revert to plain tty mode, without rebooting or editing any files.

#/etc/init.d/xdm stop

Probably best done when the display manager is in the login screen 
state, but works anytime...
Or, if you want to get X out of the way, edit /etc/inittab , look for 
the lines :
# The default runlevel.
id:2:initdefault:
and replace the runlevel 2 with 1.

John

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-21 Thread Sridhar M.A.
On Fri, Nov 21, 2003 at 08:13:08AM +0800, Dan Jacobson wrote:

But then it just springs back to life again, with a login prompt (at
least with xdm here).

Let's pretend my monitor is being borrowed for a few days and being
replaced by a VT100, and I want to properly end all X processes and
revert to plain tty mode, without rebooting or editing any files.


If you want to temporarily disable booting to xdm on your VT100 and
revert to xdm once you get back the monitor, just disable the xdm
startup from all levels.

   # update-rc.d -f xdm remove

After you get back the monitor,

   # update-rc.d xdm defaults
   
Regards,

-- 
Sridhar M.A.GPG KeyID : F0225B2C
  Fingerprint: F7CC 61A8 C6C1 D29C 2863  4E20 8A78 A19D F022

I always pass on good advice.  It is the only thing to do with it.
It is never any good to oneself.
-- Oscar Wilde, An Ideal Husband


pgp0.pgp
Description: PGP signature


Re: CTRL+ALT+Backspace will kill the X-server

2003-11-21 Thread Haines Brown
 From: Dan Jacobson [EMAIL PROTECTED]

 Preston CTRL+ALT+Backspace will kill the X-server.
 
 Indeed it does, with no questions asked.

A question I asked before, for for which I never received an answer:
Is this a dirty shutdown of X and so to be avoided, or is it a
proper shutdown, whatever that means?

Haines Brown


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-21 Thread Kent West
Haines Brown wrote:

From: Dan Jacobson [EMAIL PROTECTED]
   

 

Preston CTRL+ALT+Backspace will kill the X-server.

Indeed it does, with no questions asked.
   

A question I asked before, for for which I never received an answer:
Is this a dirty shutdown of X and so to be avoided, or is it a
proper shutdown, whatever that means?
 

Dirty. If a process has a file open, that file might get corrupted, or a 
temp file might not get erased, etc. If you don't have any apps running 
other than your window manager/desktop environment, usually nothing will 
get hurt.

For a clean shutdown:
Log out of X; then if a login manager  (xdm, gdm, wdm, kdm) is still 
running, you can stop it by switching to a console (Ctrl-Alft-F1 should 
work in most cases) and then as root run /etc/init.d/[xgwk]dm stop 
(use the letter that corresponds to the login manager that you're running.

--
Kent West ([EMAIL PROTECTED])


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



CTRL+ALT+Backspace will kill the X-server

2003-11-20 Thread Dan Jacobson
 is that the usual way to get rid of X windows if in case one
 wants just to use the humble console?  I know there is a startx
 program, but no stopx.

Preston CTRL+ALT+Backspace will kill the X-server.

Indeed it does, with no questions asked.

But then it just springs back to life again, with a login prompt (at
least with xdm here).

Let's pretend my monitor is being borrowed for a few days and being
replaced by a VT100, and I want to properly end all X processes and
revert to plain tty mode, without rebooting or editing any files.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-20 Thread Pascal Hakim
On Fri, Nov 21, 2003 at 08:13:08AM +0800, Dan Jacobson wrote:
 But then it just springs back to life again, with a login prompt (at
 least with xdm here).
 
 Let's pretend my monitor is being borrowed for a few days and being
 replaced by a VT100, and I want to properly end all X processes and
 revert to plain tty mode, without rebooting or editing any files.
 

You can stop xdm with /etc/init.d/xdm stop

Cheers,

Pasc


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CTRL+ALT+Backspace will kill the X-server

2003-11-20 Thread Travis Crump
Dan Jacobson wrote:
is that the usual way to get rid of X windows if in case one
wants just to use the humble console?  I know there is a startx
program, but no stopx.


Preston CTRL+ALT+Backspace will kill the X-server.

Indeed it does, with no questions asked.

But then it just springs back to life again, with a login prompt (at
least with xdm here).
Let's pretend my monitor is being borrowed for a few days and being
replaced by a VT100, and I want to properly end all X processes and
revert to plain tty mode, without rebooting or editing any files.

#/etc/init.d/xdm stop

Probably best done when the display manager is in the login screen 
state, but works anytime...


pgp0.pgp
Description: PGP signature