Find the answer to your Linux question:
Results 1 to 4 of 4
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Apr 2005
    Location
    NJ, USA
    Posts
    104

    SLEEP


    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????
    My New years Resolution is 1280x1024

  2. #2
    Linux Newbie
    Join Date
    Apr 2005
    Location
    South America
    Posts
    152
    First, run

    Code:
    xev
    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
    Code:
    nano ~/.xmodmap
    add the following lines
    Code:
    keycode x = XF86Standby
    keycode y = XF86WakeUp
    where you replace x,y with the keycodes you found with xev

    Now create/append to a file called .xinitrc in your home, the following line
    Code:
    xmodmap ~/.xmodmap
    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

    cheers mate

  3. #3
    Linux Newbie
    Join Date
    Apr 2005
    Location
    NJ, USA
    Posts
    104

    Wake

    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
    Code:
    nano ~/.xmodmap
    . And the bash then says
    Code:
    [soyo:thomas]~> nano ~/.xmodmap
    bash: nano: command not found
    [soyo:thomas]~>
    My New years Resolution is 1280x1024

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Apr 2005
    Location
    South America
    Posts
    152
    Well, you can also try kate or whatever console/graphical mode editor you have, the point is to open or create that file...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •