Re: APM -- wmapm and user-initiated sleep/suspend?
On 07-Nov-2001 Karsten M. Self wrote:
> I've got APM configured, and can initiate a sleep/suspend from root. I
> can't do this as an unprivileged user either from the command line or
> via wmapm (a WindowMaker dock app).
>
> Attempting same from command line:
>
> $ apm -S
> Cannot open APM device: Permission denied
>
I opened up the source and here is the flow:
if (access(/proc/apm, R_OK) || apm_read(&i) == 1) /* reads /proc/apm */
return -1
if ((fd = open(/dev/apm_bios)) < 0) {
/* attempt to create /dev/apm_bios, this is supposed to be for backwards
compatibility only */
if (mknod())
return -1
}
return fd
Check out the flow on your machine and see where it is failing and take
appropriate actions.
Reply to: