I found a way to prevent the system from suspending and/or hibernating. The suspend/hibernate options still show up in the menu but if you click on one of them it just locks the screen.
You just need to edit: /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy
And change the
Code:
<allow_active>yes</allow_active>
entries for suspend and/or hibernate to
Code:
<allow_active>no</allow_active>
So it should look something like this:
Code:
<action id="org.freedesktop.devicekit.power.suspend">
<description>Suspend the system</description>
<message>Authentication is required to suspend the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>no</allow_active>
</defaults>
</action>
<action id="org.freedesktop.devicekit.power.hibernate">
<description>Hibernate the system</description>
<message>Authentication is required to hibernate the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>no</allow_active>
</defaults>
</action>
Then you will probably need to restart your machine for the changes to take effect.
Bookmarks