LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   logout_command for gnome-screensaver? (https://www.linuxquestions.org/questions/linux-newbie-8/logout_command-for-gnome-screensaver-537800/)

bellman 03-15-2007 02:06 PM

logout_command for gnome-screensaver?
 
Running FC6 in a library/lab environment, trying to get it set so when a patron leaves the workstation unattended for a while it will lock/give the next user the option to log them off (or even better, simply log them off without locking at all, if someone points me in the right direction for that).

My current line of thinking was to use gconf-editor and under apps | gnome-screensaver, I made the following changes:

logout_enabled = checked
logout_delay = 1
logout_command = gnome-session-save --kill

When sufficient time has passed, I do get the unlock prompt with the addition of a logout button, but that does nothing.

I stole that logout command from some other thread/site asking about a command to logout without prompts, but it seems to have no affect in this context (nor would it run from the terminal, though it did work, albeit with a prompt, when run as an executable script from my desktop).

Oh, and I made those setting mandatory (which made changing values later a pain, ended up directly editing etc/gconf/gconf.xml mandatory/%gconf-tree.xml)

Is there a command that will work/work better in this context?

Is there a better approach to this issue?

Thanks for helping the new guy get a clue or two...
-Ian

mccann 03-15-2007 11:54 PM

gnome-session-save only works when you add the --silent option but that was added in GNOME 2.18 (which will be Fedora 7).

http://live.gnome.org/GnomeScreensav...9ad3c4f570ac4b

Regarding your other question about just logging out after a certain time you can use:
http://live.gnome.org/GnomeScreensav...a49ad3c4f570ac

Where instead of the print statement you can use a command to end the session. If you can't come up with another way to kill the session you can always just do "pkill gnome-session". It is crude but works fine unless you have another session running for the same user...

HTH,
Jon

mccann 03-15-2007 11:59 PM

Hmm, looks like that second link got mangled. It should be:
http://live.gnome.org/GnomeScreensav...ed0e8bb9b33043

bellman 03-16-2007 12:36 PM

Quote:

Originally Posted by mccann
Regarding your other question about just logging out after a certain time you can use:
http://live.gnome.org/GnomeScreensav...ed0e8bb9b33043 (link corrected)

Where instead of the print statement you can use a command to end the session. If you can't come up with another way to kill the session you can always just do "pkill gnome-session". It is crude but works fine unless you have another session running for the same user...

HTH,
Jon

Hey, thanks. I had changed the logout command after I posted to "killall gnome-session". Perhaps it is crude, as you say, but it works so far as I have seen, unless this causes problems I am not yet aware of.

So right now it works by locking the machine when the screensaver kicks in, and a logout option will let another user jump on.
While I initially wanted to avoid it, I am not sure if the lock is desirable now, after all. I will still look into that second link you provided and see what can be done.

Thanks again.
-I


All times are GMT -5. The time now is 12:51 AM.