Jump to content
Compatible Support Forums
Sign in to follow this  
ndering

how to end an x client session

Recommended Posts

Hi,

 

I want to upgrade the latest version of Xfree86 and the install script (Xinstall.sh) says I should end my x session before I continue with installation. But how do I do that? Help I can't find anything that shows me how ;(

 

thanks for any help!!

Share this post


Link to post

ctrl-alt-backspace will end your current xsession. But if you run xdm or gdm you should log out, switch to a console terminal (ctrl-alt-1 through 4 usually) and stop the gdm or xdm from running. Then you can upgrade X.

 

(xdm and gdm are the graphical login screens, if you run these they'll try to keep restarting X, so just log out, then switch to the console by pressing ctrl-alt-1)

 

If you run RedHat you can stop gdm or xdm by typing:

Code:
$ service xdm stop

for xdm, or

Code:
$ service gdm stop

for gdm.

 

If you run debian do:

Code:
$ /etc/init.d/xdm stop

or

Code:
$ /etc/init.d/gdm stop

as required.

Share this post


Link to post

hi again,

 

ok, I tried

 

"service xdm stop," and i got "bash: service: command not found"

 

i tried the debian one even though i'm running rh 9 and it told me that the directory doesn't exist. is there a service manager or something that i'm supposed to have installed somewhere?

Share this post


Link to post

ok, thanks for the help guys laugh

 

this is what I did that finally worked:

 

1. opened /etc/inittab with vi

 

2. changed the line 'id:5:initdefault:' to 'id:3:initdefault'

 

3. rebooted the computer and it booted to the text login so I wouldn't have to figure out how to kill gdm. Then I was able to install the new version of Xfree86

 

but if anybody can give me some insight about what i'm doing wrong concerning killing gdm without editing inittab I'm still curious

Share this post


Link to post

Were you logged in as root or su'd? If you were su'd you need to do "su -" in order for the path to be changed to the proper root path, the service executable is in /sbin on rh systems iirc. I haven't played with redhat since 7.3 tho so I'm not sure if they changed anything with their system.

 

I don't know why /etc/init.d/ doesn't exist for you, thats a bit weird. Does an "ls /etc/init.d" work?

Share this post


Link to post

Anyone ever figure this out? I'm having the exact same problem. DPKG tells me I should stop GDM before installing a package. But I can't figure out how to stop it. I know the ctr alt F1 to switch to terminal command line, but that does not _stop_ gdm. It is still running and I can switch back by hitting alt F7. I need to actually kill the program and exit to command line. That's one of the frustrating things about Linux (Debian) that I have found. Why is there no exit key? I also tried going to the command line, switching to the /etc/init.d and typed gdm stop This did not work. It said "aborting... GDM already running."

Such simple things seem to have difficult answers with Linux.

Share this post


Link to post

Here's one, admittedly inelegant, method that should work on most any Linux system to kill gdm:

 

# ps auxw | grep gdm

 

[identify PID (the number following "root") of the first instance of gdm]

 

# kill [PID of gdm]

 

For example, when I do this, ps returns:

 

root 2221 0.0 0.6 11852 3168 ? S 12:15 0:00 /usr/bin/gdm

root 14463 0.0 0.0 11908 3444 ? S 12:28 0:00 /usr/bin/gdm

root 14464 0.1 1.5 13652 7864 ? S 12:28 0:00 /etc/X11/X :0 -nolisten...

 

etc.

 

The command

kill 2221

 

halts all instances of gdm and its child processes (including the X server).

 

Hope that helps.

Share this post


Link to post

Would typing (as root):

Code:
/sbin/init 3

 

do the same? wink

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×