I have Slackware 10.0 and I was wondering If I could make X Sleep. I use GNOME. I have 2 extra buttons on my keyboard and would like to use them for SLEEP and WAKE. I tried using keyboard shortcuts off of the menu "Application>Desktop Preferences>Keyboard shortcuts." How else would I do this????
To check out the keycode of the "extra buttons"
Now, go to your home and create the file called .xmodmap, if its not already created
add the following lines
where you replace x,y with the keycodes you found with xev
keycode x = XF86Standby
keycode y = XF86WakeUp
Now create/append to a file called .xinitrc in your home, the following line
I also use my .bashrc to add that line instead of the .xinitrc, although dunno for sure, if it would work with the sleep/wakeup functions you need
And thats it, that should do it
I ran xev and typed the "wake" and "sleep" keys. Only the wake key had a keycode (227). The sleep button didn't have one. Is it possible that this key is not connected???? Also I tried to type
. And the bash then says
[soyo:thomas]~> nano ~/.xmodmap
bash: nano: command not found
Well, you can also try kate or whatever console/graphical mode editor you have, the point is to open or create that file...