Results 1 to 8 of 8

Thread: Keyboard Shortcuts – why don't they work?

  1. #1
    Rebelli0us is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Feb 2008
    Beans
    722

    Keyboard Shortcuts – why don't they work?

    System > Preferences > Keyboard Shortcuts

    Opens a shortcut configuration applet. Under Desktop there is “Suspend”. I assigned Ctrl+Alt+End to “Suspend” the computer, but it doesn't work.

    How do keyboard shortcuts work?

  2. #2
    Join Date
    Feb 2007
    Location
    Yorkshire, UK
    Beans
    658
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Keyboard Shortcuts – why don't they work?

    Do other keyboard shortcuts work?

    If so, have you tried suspending by another method? It's possible that your machine doesn't want to suspend, rather than this being a problem with shortcuts.
    Before you criticise someone, walk a mile in their shoes. Then, when you do criticise them, you're a mile away and have their shoes.

  3. #3
    Rebelli0us is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Feb 2008
    Beans
    722

    Re: Keyboard Shortcuts – why don't they work?

    thank you. Yes other shortcuts work and machine suspends S3 just fine. I tried different keys, even rebooted, but no luck.

  4. #4
    Join Date
    Feb 2007
    Location
    Yorkshire, UK
    Beans
    658
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Keyboard Shortcuts – why don't they work?

    Mmmm... In that case I can't explain why that shortcut won't work, unless the instruction it generates is faulty. Have you tried another key combination?

    Since other keyboard shortcuts do work, it's unlikely to be a general issue but perhaps specific to that instruction.

    EDIT/ Sorry - you said you'd tried other key combinations - so I'm stumped.
    Before you criticise someone, walk a mile in their shoes. Then, when you do criticise them, you're a mile away and have their shoes.

  5. #5
    Join Date
    Mar 2006
    Location
    brooklyn, ny
    Beans
    290
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: Keyboard Shortcuts – why don't they work?

    Came out with roundabout fix, by custom creating a keyboard shortcut to a command that uses dbus-send to suspend the computer: http://ubuntuforums.org/showpost.php...86&postcount=4

    Basically you just, run gconf-editor, go to /apps/metacity/global_keybindings choose an unused run_command number (say run_command_9), set it to some custom value say <Control><Alt>End, then go to /apps/metacity/keybinding_commands/command_9/ and change the value to:
    Code:
    dbus-send --session --dest=org.freedesktop.PowerManagement --type=method_call /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend
    and it should work.


    EDIT for 10.04: Elsewhere in the thread, the above version stopped working. However, from reddit I saw a post at commandlinefu.com with an updated command is:
    Code:
    dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
    I still would rather recommend just giving your normal user password sudoers privileges to execute /etc/acpi/sleep.sh or /usr/sbin/pm-suspend as that seems less likely to change on subsequent upgrades.
    Last edited by jamesrl; August 9th, 2010 at 02:40 PM. Reason: added detailed description.

  6. #6
    Rebelli0us is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Feb 2008
    Beans
    722

    Re: Keyboard Shortcuts – why don't they work?

    Still not working, Keyboard Shortcuts is basic stuff! Any ideas?

  7. #7
    Rebelli0us is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Feb 2008
    Beans
    722

    Re: Keyboard Shortcuts – why don't they work?

    OK then, in new version Jaunty 9.04 my "Suspend" shortcut (Ctrl+Alt+End) finally does something, but it doesn't suspend, it just blanks the screen! Then, with the next key-press it un-blanks the screen.

    Is anybody using keyboard shortcuts successfully?

  8. #8
    Join Date
    Mar 2006
    Location
    brooklyn, ny
    Beans
    290
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: Keyboard Shortcuts – why don't they work?

    Finally upgraded to 9.10 (preparing to eventually upgrade to lucid) and the previous dbus command stopped working for me, and I couldn't find another dbus command to send.

    So my current workaround involves granting me privileges to suspend via
    Code:
    sudo /etc/acpi/sleep.sh force
    without using a password.
    (Advice taken from here: http://www.gratisoft.us/sudo/man/sud...swd_and_passwd)

    If you are user name "jamesrl" on computer "jamesrl_computer", you can give that user permission to initiate sleep by editing the /etc/sudoers (e.g., sudo nano /etc/sudoers ), and adding the following line at the end:

    Code:
    jamesrl jamesrl_computer = NOPASSWD: /etc/acpi/sleep.sh
    If you don't know your computer's name, just go to a terminal and type 'hostname'.
    Then go to System->Prefs->Shortcut Editor, and a custom shortcut with a command "sudo /etc/acpi/sleep.sh force", bind it to a key sequence (e.g., Ctrl-Alt-End for me) and you are done.

Bookmarks

Posting Permissions

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