[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-pm-utils
Subject:    Re: [Pm-utils] Writing a sleep.d hook that accepts user input?
From:       Dan Nicholson <dbn.lists () gmail ! com>
Date:       2010-03-16 13:18:41
Message-ID: 91705d081003160618sb20ff38w88001808f660b42e () mail ! gmail ! com
[Download RAW message or body]

On Tue, Mar 16, 2010 at 5:38 AM, Vale Cofer-Shabica
<vale.cofershabica@gmail.com> wrote:
> Hi,
> I use loop-aes to encrypt all the partitions on my machine. I would
> like to be able to unmount some directories (e.g. /home) on suspend
> and then be required to enter a password to remount on resume. Finding
> open files, syncing and unmounting isn't a problem, but resuming is.
> Is there a way to get user input into a process spawned by a hook? In
> the case that X is running, it's almost trivial since I can create an
> xterm with the command I need, but since I'm not always running X, I
> need a solution that doesn't rely on it. All I need to be able to do
> is call "#mount /home" and then enter a password at a prompt. Any
> thoughts?

It would be really tough since the hook is running as root outside the
user's session. The only really sensible way to do this would be to
wait in the user session for a dbus signal sent from a hook or from
HAL/upower on resume. But then you're in the user session and past the
time when /home would probably need to be mounted.

pm-utils isn't prepared to handle interactive sessions, but I also
don't think the resume process in general could handle it without
custom patching.

--
Dan
_______________________________________________
Pm-utils mailing list
Pm-utils@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pm-utils
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic