Re: Shutting down X

2002-10-09 Thread Kent West

lameth wrote:

> How do you shut X-windows down and get to the command prompt?
> Depending on the response I get from another post I'm thinking of 
> upgrading the drivers for my video card and I'm sure it wouldn't be a 
> bad idea to turn X off while I do so.
>
>

Depends:
- on the window manager being run
- on whether a session manager (xdm, gdm, etc) is running

Most window managers have a way to logout; find that to get to either a 
console (full screen white text on black background usually) or to a 
graphical login prompt (the session manager). If you get to a graphical 
login prompt, you need to kill the session manager. Do this by pressing 
Ctrl-Alt-F1 to switch to the first virtual terminal (VT - the console 
mentioned above; Ctrl-Alt-F2 switches you to the second VT, and etc). 
Log in if necessary (probably) either as root or as a normal user with 
sudo access, and as root run "/etc/init.d/[xdm or wdm or gdm or kdm] stop".

Now you can upgrade your drivers.

To restart your session manager, as root run "/etc/init.d/[x|w|g|kdm] 
start". You'll probably automatically be switched to the seventh VT 
where the GUI login will probably load; you might want to switch back to 
VT1 and log out of that session, then switch to VT7 to log in as you 
normally would.

All done.

Kent



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




Re: Shutting down X

2002-10-09 Thread Nick Hastings

* lameth <[EMAIL PROTECTED]> [021009 15:45]:
> How do you shut X-windows down and get to the command prompt?
> Depending on the response I get from another post I'm thinking of 
> upgrading the drivers for my video card and I'm sure it wouldn't be a 
> bad idea to turn X off while I do so.

If you use xdm:

/etc/init.d/xdm stop

for gdm

/etc/init.d/gdm stop

Nick.

-- 
Debian unstable/experimental
Linux onefish 2.4.19-lavienx #1 Sat Sep 21 19:58:12 EST 2002
i686 unknown unknown GNU/Linux


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




Re: Shutting down X

2002-10-08 Thread Alex Malinovich

On Wed, 2002-10-09 at 00:46, lameth wrote:
> How do you shut X-windows down and get to the command prompt?
> Depending on the response I get from another post I'm thinking of 
> upgrading the drivers for my video card and I'm sure it wouldn't be a 
> bad idea to turn X off while I do so.
> 

I'm sure that this isn't the right way to go about this, but since I
rely on GDM to start my X sessions, I just switch to a regular tty
screen and kill off gdm-binary. If you're not running gdm I'd imagine
you could just kill off XFree86 with the same result. Be warned, I'm
SURE that there is a cleaner way to do this, I'm just not sure what it
is. :)

But as far as upgrading your video drivers is concerned, I'd think that
upgrading them and then restarting X via C-A-Backspace would work just
fine. I roll my own kernel and recompile the driver modules by hand so I
always have to reboot. But assuming that you're just going to use
precompiled modules, just restarting X via the above key sequence should
be enough. But IANA X Expert. :)

-Alex



signature.asc
Description: This is a digitally signed message part


Shutting down X

2002-10-08 Thread lameth

How do you shut X-windows down and get to the command prompt?
Depending on the response I get from another post I'm thinking of 
upgrading the drivers for my video card and I'm sure it wouldn't be a 
bad idea to turn X off while I do so.


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




Re: shutting down X

1999-09-26 Thread Salman Ahmed
> "Brian" == Brian Servis <[EMAIL PROTECTED]> writes:

Brian> I don't know which kernel RH 5.2 was based on, was it 2.0.x or
Brian> 2.2.x?  Apparently the console device was not around in the
Brian> 2.0.x days, which Debian 2.1 is based on, so a symlink was used
Brian> then.  In 2.2.x kernels it was moved to a device file.

RedHat-5.2 was based on the 2.0.36 kernel. Its been ages literally since I
was running a 2.0.x kernel so I don't know/remember how /dev/console was
setup in RedHat-5.2 `out-of-the-box'.


Brian> This code segment is from the MAKEDEV script on my Debian box,
Brian> notice how it is makes a symlink for 2.0.x kernels and a device
Brian> file for 2.2.x or greater:

I'll try out the MAKEDEV script on my box. I would like to have a real
device for /dev/console.

Thanks for your helpful replies.

-- 
Salman Ahmed
ssahmed AT interlog DOT com


Re: shutting down X

1999-09-26 Thread Brian Servis
*- On 26 Sep, Salman Ahmed wrote about "Re: shutting down X"
>>>>>> "Salman" == Salman Ahmed <[EMAIL PROTECTED]> writes:
> 
> Salman> Ok. I'll also check RedHat-5.2 to see what /dev/console points
> Salman> to under there. Then I'll try symlinking it to /dev/tty1 and
> Salman> see if that solves my problem. BTW, under RH5.2, I am running
> Salman> kernel 2.2.10 and it doesn't have this `problem'.
> 
> Followup:
> 
> Under RedHat-5.2 (w/kernel 2.2.10), /dev/console is not a symlink to
> any device. It seems to be a `true/pure' device.
> 
> For Debian 2.1, I changed /dev/console to point to /dev/tty1 instead
> of /dev/tty0 and now I get the behaviour I want ie when I shutdown I
> see all the service shutdown/stop messages.
> 
> My questions are :
> 
> Salman> I am curious to know : what are the ramifications of changing
> Salman> /dev/console to point to /dev/tty1 instead of /dev/tty0 ?
> 
> and also why /dev/console should be a symlink to some other device ?
> 
> Why not make it a device itself (like RedHat 5.2 has) ?
> 

If you issue 'cd /dev; ./MAKEDEV console' it will create the device
file console.  It will behave in exactly the same way that tty0 does as
specified in the console man page.  Either one will put its output on
the currently active console.  Since tty7 was the last active console
then the output is sent there.

The only ramification of having it symlinked to tty1 is that all system
messages that are destined for console get sent to tty1 regardless of
the current console activity or who is logged into tty1.  I prefer this
since I like to see the shutdown messages when I have to shutdown.

I don't know which kernel RH 5.2 was based on, was it 2.0.x or 2.2.x? 
Apparently the console device was not around in the 2.0.x days, which
Debian 2.1 is based on, so a symlink was used then.  In 2.2.x kernels
it was moved to a device file.  

This code segment is from the MAKEDEV script on my Debian box, notice
how it is makes a symlink for 2.0.x kernels and a device file for 2.2.x
or greater:

console)
major=`Major vcs`   # not fatal
makedev tty0 c 4 0 $cons
# console
#   new kernels need a device, old ones a symlink... sigh
kern_rev1=`uname -r | awk -F'.' '{print $1}'`
kern_rev2=`uname -r | awk -F'.' '{print $2}'`
if [ $kern_rev1 -gt 2 ]
then
makedev console c 5 1 $cons
else
if [ $kern_rev1 -eq 2 -a $kern_rev2 -ge 1 ]
then
makedev console c 5 1 $cons
else
symlink console tty0
fi
fi

HTH,
-- 
Brian 
-
Mechanical Engineering  [EMAIL PROTECTED]
Purdue University   http://www.ecn.purdue.edu/~servis
-


Re: shutting down X

1999-09-26 Thread Salman Ahmed
> "Salman" == Salman Ahmed <[EMAIL PROTECTED]> writes:

Salman> Ok. I'll also check RedHat-5.2 to see what /dev/console points
Salman> to under there. Then I'll try symlinking it to /dev/tty1 and
Salman> see if that solves my problem. BTW, under RH5.2, I am running
Salman> kernel 2.2.10 and it doesn't have this `problem'.

Followup:

Under RedHat-5.2 (w/kernel 2.2.10), /dev/console is not a symlink to
any device. It seems to be a `true/pure' device.

For Debian 2.1, I changed /dev/console to point to /dev/tty1 instead
of /dev/tty0 and now I get the behaviour I want ie when I shutdown I
see all the service shutdown/stop messages.

My questions are :

Salman> I am curious to know : what are the ramifications of changing
Salman> /dev/console to point to /dev/tty1 instead of /dev/tty0 ?

and also why /dev/console should be a symlink to some other device ?

Why not make it a device itself (like RedHat 5.2 has) ?

Thanks.

-- 
Salman Ahmed
ssahmed AT interlog DOT com


Re: shutting down X

1999-09-26 Thread Salman Ahmed
> "Brian" == Brian Servis <[EMAIL PROTECTED]> writes:

Brian> You should always get dumped back to tty1 because that is the
Brian> terminal on which wdm was started.

Brian> Did you force syslogd to reload the syslog.conf file after you
Brian> modified it?  '/etc/init.d/syslogd reload' will force it to
Brian> reload the file.

yes I did. I did so by entering :

kill -HUP `cat /var/run/syslogd.pid`

and I noticed that it had restarted and my changes to /etc/syslog.conf
were read in.

Brian> WaitI just noticed that my /dev/console is symlinked to
Brian> /dev/tty1.  This is the old 2.0.x kernel method.  The newer
Brian> kernels use a true device file for /dev/console.  Check
Brian> /dev/console to see what it is. If it is a true device then
Brian> perhaps it is getting stuck on the last active terminal, was X
Brian> running on vt7?  Try removing /dev/console and making it a
Brian> symlink to /dev/tty1.  (Disclaimer: I don't know the future
Brian> ramifications of this setup, I think I will keep mine this way
Brian> though.)

Yes, X is running on VC/VT 7. I have to press Ctrl+Alt+F7 to get back
to X from a VC.

I am running kernel 2.2.12. I checked /dev/console and notice that it
is a symlink to tty0 :

@phoenix:[/home/ssahmed] dir /dev/console
lrwxrwxrwx   1 root root4 Sep 11 17:04 /dev/console -> tty0


Ok. I'll also check RedHat-5.2 to see what /dev/console points to under
there. Then I'll try symlinking it to /dev/tty1 and see if that solves
my problem. BTW, under RH5.2, I am running kernel 2.2.10 and it doesn't
have this `problem'.

I am curious to know : what are the ramifications of changing /dev/console
to point to /dev/tty1 instead of /dev/tty0 ?

Thanks.

-- 
Salman Ahmed
ssahmed AT interlog DOT com


Re: shutting down X

1999-09-26 Thread Brian Servis
*- On 26 Sep, Salman Ahmed wrote about "Re: shutting down X"
> 
> here is the relevant section from my /etc/syslog.conf before I
> started modifying it:
> 
> begin
> #
> # I like to have messages displayed on the console, but only on a virtual
> # console I usually leave idle.
> #
> #daemon,mail.*;\
> # news.=crit;news.=err;news.=notice;\
> # *.=debug;*.=info;\
> # *.=notice;*.=warn   /dev/tty8
> 
> 
> # The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
> # you must invoke `xconsole' with the `-file' option:
> # 
> #$ xconsole -file /dev/xconsole [...]
> #
> # NOTE: adjust the list below, or you'll go crazy if you have a reasonably
> #  busy site..
> #
> daemon.*;mail.*;\
>   news.crit;news.err;news.notice;\
>   *.=debug;*.=info;\
>   *.=notice;*.=warn   |/dev/xconsole
> -end-
> 
> 
> I tried uncommenting the first block (the one that sends output to
> /dev/tty8) but when I shutdown the system I was still dumped back
> to tty1/VC#1. I still had to press Ctrl+Alt+F7 to see the output
> that I wanted.
> 

You should always get dumped back to tty1 because that is the terminal
on which wdm was started.  

> Commenting out the second block (the one that sends output to
> /dev/xconsole) simply gave me an empty xconsole window as expected.
> It still didn't help me to see the status of shutdown (ie services
> being shutdown) without pressing Ctrl+Alt+F7.
> 
> Any other suggestions ?
> 

Did you force syslogd to reload the syslog.conf file after you modified
it?  '/etc/init.d/syslogd reload' will force it to reload the file.

WaitI just noticed that my /dev/console is symlinked to /dev/tty1.
This is the old 2.0.x kernel method.  The newer kernels use a true
device file for /dev/console.  Check /dev/console to see what it is. If
it is a true device then perhaps it is getting stuck on the last active
terminal, was X running on vt7?  Try removing /dev/console and making it
a symlink to /dev/tty1.  (Disclaimer: I don't know the future
ramifications of this setup, I think I will keep mine this way though.)

> What does your /etc/syslog.conf file look like ?
> 
[This is stripped of all comments]

auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none  -/var/log/syslog
daemon.*/var/log/daemon.log
kern.*  /var/log/kern.log
lpr.*   -/var/log/lpr.log
mail.*  /var/log/mail.log
user.*  -/var/log/user.log
uucp.*  -/var/log/uucp.log
mail.info   -/var/log/mail.info
mail.warn   -/var/log/mail.warn
mail.err/var/log/mail.err
news.crit   /var/log/news/news.crit
news.err/var/log/news/news.err
news.notice -/var/log/news/news.notice
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none  /var/log/messages
*.emerg *
daemon.*;mail.*;\
news.crit;news.err;news.notice;\
*.=debug;*.=info;\
*.=notice;*.=warn   |/dev/xconsole
local2.*-/var/log/ppp.log


At this point I am out of ideas.

-- 
Brian 
-
Mechanical Engineering  [EMAIL PROTECTED]
Purdue University   http://www.ecn.purdue.edu/~servis
-


Re: shutting down X

1999-09-26 Thread Salman Ahmed
> "Brian" == Brian Servis <[EMAIL PROTECTED]> writes:

Brian> Look in your /etc/syslog.conf for output to a different tty.  I
Brian> used to use one of the following and had similiar results, I
Brian> have since commented them out.

Brian> #daemon,mail.*;\ # news.=crit;news.=err;news.=notice;\ #
Brian> *.=debug;*.=info;\ # *.=notice;*.=warn /dev/tty8
Brian> #daemon.*;mail.*;\ # news.crit;news.err;news.notice;\ #
Brian> *.=debug;*.=info;\ # *.=notice;*.=warn /dev/console

Brian> /dev/console is the currently active console.  See 'man console'
Brian> and 'man syslog.conf' for more info.


Hi Brian,

here is the relevant section from my /etc/syslog.conf before I
started modifying it:

begin
#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
#   news.=crit;news.=err;news.=notice;\
#   *.=debug;*.=info;\
#   *.=notice;*.=warn   /dev/tty8


# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
# 
#$ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
#  busy site..
#
daemon.*;mail.*;\
news.crit;news.err;news.notice;\
*.=debug;*.=info;\
*.=notice;*.=warn   |/dev/xconsole
-end-


I tried uncommenting the first block (the one that sends output to
/dev/tty8) but when I shutdown the system I was still dumped back
to tty1/VC#1. I still had to press Ctrl+Alt+F7 to see the output
that I wanted.

Commenting out the second block (the one that sends output to
/dev/xconsole) simply gave me an empty xconsole window as expected.
It still didn't help me to see the status of shutdown (ie services
being shutdown) without pressing Ctrl+Alt+F7.

Any other suggestions ?

What does your /etc/syslog.conf file look like ?

Thanks.


-- 
Salman Ahmed
ssahmed AT interlog DOT com


Re: shutting down X

1999-09-26 Thread Brian Servis
*- On 26 Sep, Salman Ahmed wrote about "shutting down X"
> 
> I use WDM (WINGs Display Manager) instead of xdm to manage
> X on my slink box. I have noticed this weird thing when
> shutting down or rebooting my system.
> 
> After I enter shutdown/poweroff/reboot, the X server is
> terminated but then I am 'dumped' back to the first virtual
> console (tty1). I don't see any of the messages like :
> 
>  shutting down XXX
>  shutting down YYY
>  shutting down ZZZ
>  sending HUP siganl to all processes
>  sending KILL signal to all processes
> 
> However, if I immediately press Ctrl+Alt+F7 right after
> getting dumped to the first VC, I do see these messages.
> 
> My question is : why is this not happening be default so
> that whenever I shutdown/poweroff/reboot the system I should
> see these termination messages ??
> 
> Is this syslog configuration issue or a WDM configuration
> issue ?
> 
> I was used seeing this output from RedHat when it shutdown
> and it didn't require any configuration tweaking.
> 
> Thanks for any help.
> 

Look in your /etc/syslog.conf for output to a different tty.  I used to
use one of the following and had similiar results, I have since
commented them out.

#daemon,mail.*;\
#   news.=crit;news.=err;news.=notice;\
#   *.=debug;*.=info;\
#   *.=notice;*.=warn   /dev/tty8
#daemon.*;mail.*;\
#   news.crit;news.err;news.notice;\
#   *.=debug;*.=info;\
#   *.=notice;*.=warn   /dev/console

/dev/console is the currently active console.  See 'man console' and
'man syslog.conf' for more info.

-- 
Brian 
-
Mechanical Engineering  [EMAIL PROTECTED]
Purdue University   http://www.ecn.purdue.edu/~servis
-


shutting down X

1999-09-26 Thread Salman Ahmed

I use WDM (WINGs Display Manager) instead of xdm to manage
X on my slink box. I have noticed this weird thing when
shutting down or rebooting my system.

After I enter shutdown/poweroff/reboot, the X server is
terminated but then I am 'dumped' back to the first virtual
console (tty1). I don't see any of the messages like :

 shutting down XXX
 shutting down YYY
 shutting down ZZZ
 sending HUP siganl to all processes
 sending KILL signal to all processes

However, if I immediately press Ctrl+Alt+F7 right after
getting dumped to the first VC, I do see these messages.

My question is : why is this not happening be default so
that whenever I shutdown/poweroff/reboot the system I should
see these termination messages ??

Is this syslog configuration issue or a WDM configuration
issue ?

I was used seeing this output from RedHat when it shutdown
and it didn't require any configuration tweaking.

Thanks for any help.

-- 
Salman Ahmed
ssahmed AT interlog DOT com