Programmatically showing the gnome panel logout dialog from external program



Hello everybody,

  I've been faced with a problem by a customer of mine where they need their
users to be optionally logged out (with timeout) of GNOME after a certain
program exits. A
normal user session looks like this:

 1. they log in at which time rdesktop is run in full screen session,
    connecting them to a windows terminal service (rdesktop is modified to
    reuse the user's login password, so that they don't have to type it
    twice. Users are authenticated from ActiveDirectory with winbind)

 2. After they finish working with their Windows desktop, they close
    rdesktop and walk away from the computer.

All of this is happening in a university lab where each and every computer
is used by many students and it is required that they do not use the same
account on the client machine (all the machines will run Ubuntu/Dapper with
GNOME 2.14, btw). Yet it is a rare case that a student does log out of their
GNOME session. That's why I need to implement a solution which will cause
the gnome panel logout dialog after rdesktop quits (rdesktop is ran from a
launcher script). I think that the best way would be to have gnome panel
show its logout dialog and have it time out so that they have the option to
stay in their GNOME session, and default to log out after a certain time
passes.

I saw in the gnome panel sources that it does have a default logout/shutdown
timeout of 60s, so that would be done. But I can't figure out how to force
gnome panel from an external program to show its logout dialog. I would like
to know whether it's possible to do it at all (preferably without modifying
the panel sources) and if yes, how do I go to implement that. If it is not
possible, then I will probably have to write a small program that will reuse
code from the panel to implement what I described above.

Thanks in advance for your help, best regards

marek

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]