LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   KDE hibernate? (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/kde-hibernate-364627/)

microsoft/linux 09-18-2005 06:00 PM

KDE hibernate?
 
ok, so I got hibernate working, but I was wondering. Is it possible to make KDE hibernate? How do I have it return to KDE? thoughts?

Earthwings 09-19-2005 01:27 PM

Assuming hibernate works fine from within X, just write a wrapper script for the hibernate call that locks the KDE session. This can be done easily with dcop. Better yet use the hibernate-script provided by http://www.suspend2.net. It has configuration options to lock KDE and various other things. It works with the other hibernate methods as well, not only suspend2.

microsoft/linux 09-19-2005 04:07 PM

it works if I initiate hibernate from the command line(ctrl-alt-F1). Can you explain in more detail what you're saying, I don't understand a 'wrapper script'

Earthwings 09-20-2005 04:16 AM

A minimal wrapper script could look like this:
Code:

#!/bin/sh

echo > /proc/swsusp/activate
dcop --all-users --all-sessions kdesktop KScreensaverIface lock

This activates hibernate and locks alls KDE sessions on resume. You can place it somewhere in /usr/local/bin for example and assign a keyboard shortcut for it. Many laptops have sleep keys, acpid usually is able to process them. Just map the sleep event to your script.

However, I'd strongly recommend to use the hibernate script from suspend2.net instead of a homebrewed script like above. Furthermore make sure to backup your data before calling hibernate from within KDE, it's still rather experimental.

microsoft/linux 09-20-2005 09:41 AM

ok, I'm using hibernate from debian repositories. I did however patch my kernel w/ the suspend2 patch. I'm assuming debian's hibernate script is from suspend2.net...


All times are GMT -5. The time now is 03:58 AM.