Hi Gilbert,

On Mon, Jun 8, 2015, at 03:04 PM, Gilbert E. Detillieux wrote:
> I had a working setup for our lab computers running SL6, so that Gnome 
> sessions would auto-logout after some number of hours (since students 
> would often lock and abandon sessions for days).  I'm trying to 
> replicate this same behaviour under SL7, but (of course) Gnome settings 
> have changed drastically since SL6.
> 
> I thought I had a solution when I followed the instructions found here:
> 
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Desktop_Migration_and_Administration_Guide/user-sessions.html
> (Search for "logout" on the page.)
> 
> However, that setup doesn't seem to work, as my idle session stays 
> locked well past the specified inactive timeout.  (And, yes, I 
> remembered the "dconf update" and remembered to log out and back in.  I 
> even tried rebooting, in case something was being cached.)
> 
> Has anyone come across this one?  Any ideas on how to fix it?  I'm 
> coming up empty on my Google searches.
> 
> Thanks,
> Gilbert

Can you try this? I have tested it, and was able to get it to work for
me.  We should file a bug against the upstream docs, though.

The commands should be entered with root or sudo privileges (shown here
as root). The dashes are just shown to separate the commands from the
text. You shouldn't include the dashes in your file, though.

# vi /etc/dconf/profile/user
--------------------------------------------------------------------
user-db:user
system-db:local
--------------------------------------------------------------------

# mkdir -p /etc/dconf/db/local.d/locks

# vi /etc/dconf/db/local.d/00-autologout
--------------------------------------------------------------------
[org/gnome/settings-daemon/plugins/power]
# Set the timeout to 900 seconds when on primary power
sleep-inactive-ac-timeout=900
# Set action after timeout to be logout when on primary power
sleep-inactive-ac-type='logout'
--------------------------------------------------------------------

this next step prevents regular users from changing the setting...

# vi /etc/dconf/db/local.d/locks/autologout
--------------------------------------------------------------------
# Lock automatic logout settings
/org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-timeout
/org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type
--------------------------------------------------------------------

# dconf update

You'll need to log out and log back in for the settings to take effect.
Let us know if it works for you. Thanks,

Jim