On Thu, Feb 20, 2003 at 12:00:43AM -0600, Omon Edeki wrote:
> Dear all,
> I am desperately trying to write a program to log out a user from a  linux
> KDE/GNOME X window session.In trying to do this, I am killing all the
> users' processes using kill(pid_t pid, SIGKILL) to all the users
> processes. The user's processes actually do get killed but Xwindows
> refuses to completely die out. An x server (?) is still running somewhere
> in the background, and I WANT to completely stop it so that another user
> can have a chance to login and run X windows.
> 
> Basically I amtrying to log out a user from an Xsession.Are there any
> available signals that X windows catches that makes it to shutdown
> correctly? Is there some order of how you kill the x processes? I am doing
> a linear sequential traversal of the users processes and killing them all.
> Is this the right approach to take?
> 

There is a standard way to do this, which is to use the XSMP protocol
to ask the session manager to perform the logout. This is what the
'gnome-session-save --kill' command does; at least theoretically, that
command also works under KDE.

If implementing it yourself, I would start by reading the XSMP
specification, but also GNOME/KDE agreed to interpret it in a slightly
funky way in this thread:

 https://listman.redhat.com/pipermail/xdg-list/2001-December/000201.html

fork/exec of gnome-session-save is surely easier than playing with
libICE though. ;-)

Havoc
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to