Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Keyboard mappings



Botond, Greg,

Thank you for replying.

Greg said:
You need to use a little utility call xev.
I tried this, and whenever I pressed the special keys, instead of their output being trapped in xev, it would actually do the action. i.e. pressing the "Sleep" button put the computer to sleep, and even upon waking it up again, there was no recorded response in the xev output.

Botond said:
There are a bunch of utilities/deamons that can be responsible. acpid and
apmd are two of those (possibly you have acpi),
I do have acpid running as a daemon. And looking in /etc/acpi, there's a whole bunch of shell scripts.

dave@example.com:~$ cd /etc/acpi
dave@example.com:/etc/acpi$ ls
ac.d lid.sh power.sh stopbtn.sh...

There's one in there called "sleep.sh", which I assume is the one being called (?).

Looking at it, it was above my ability to make any corrections, and I'm not 100% sure this is the responsible script.

At this point I realized that maybe having additional functions like putting the hard drives to sleep and whatnot are a good thing.

So I've rephrased my objectives, and posted them to the Ubuntu mailing list. That message reads as below:

- - - - -

Ubuntu Users,

On my keyboard, I have two keys marked "Sleep" and "Wake Up".

They work fine, except that I want to make one modification. When "Sleep" mode is initiated, the screen saver gets locked so that I have to enter a password when the system is activated again.

That's a good security default I suppose, but I also use my computer as a MythTV entertainment system, and the password entry screen prevents me from easily waking the system up from remote.

What I would like to be able to do is the following 3 things:

1. Alter the "Sleep" button so that it does not lock the system with any password settings.

2. Map one of the buttons on my remote control to do the exact same action as the "Sleep" button on the keyboard.

3. Map one of the buttons on my remote control to do the exact same action as the "Wake Up" button on the keyboard.

What I've done so far:

My remote works, and I have two buttons mapped to do the following:
xset dpms force off
xset dpms force on

However, if I hit "Sleep" on the keyboard, the remote button won't wake the system up. I'm not sure if the system has a way of shutting down the daemon that is responsible for listening for the remote control. Also, there is the aforementioned password problem.

I had a little help from my local Linux User's Group, and also looking on the web, so I think the process responsible for the keyboard keys is "acpi", and that it's settings are in /etc/acpi

However, what I found there were a multitude of shell scripts that are on a level much above me. And this is where I got stuck.

I can't quite determine how to track where and how commands from these special keys are initiated, and also I can't determine how to modify them so as to lose the password security option.

Any advice would be much appreciated. Thank you.

ï--
Dave M G
Ubuntu 6.10 Edgy Eft
Kernel 2.6.17.7
Pentium D Dual Core Processor
PHP 5, MySQL 5, Apache 2


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links