Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm in fluxbox on Arch on a Macbook 5,1. New to linux. I'm trying to get Arch to suspend when I close my laptop. Lately I've just been using sudo pm-suspend.

I installed slimlock, and inserted

button/lid)
    case $3 in
        close)
            #echo "LID switched!">/dev/tty5
         /usr/sbin/pm-suspend &
         DISPLAY=:0.0 su -c - username /usr/bin/slimlock
            ;;

in my /etc/acpi/handler.sh, which I read to do here, but it doesn't work. I tried installing xscreensaver, but I get a weird error:

error: perl-lwp-mediatypes: signature from "Justin Davis (juster) <jrcd83@gmail.com>" is unknown trust
error: failed to commit transaction (invalid or corrupted package (PGP signature))
share|improve this question
    
Did you try pacman -Syy before trying to install xscreensaver? And what laptop do you have? –  mtahmed Sep 4 '12 at 9:35
    
yup didn't help –  Jack Stewart Sep 4 '12 at 18:04
    
add comment

2 Answers

Follow this: https://wiki.archlinux.org/index.php/Pacman

Being new to Linux and going directly to Arch is not a good idea. Take a look at Fedora/Ubuntu or Debian.

Ps: You need to generate the PGP keys for arch linux so you can add them.

share|improve this answer
    
But I was under the impression that installing (or updating pacman) did that automatically... –  mtahmed Sep 4 '12 at 18:53
    
thanks, this helped getting xscreensaver. but that script still isn't running anything on lid close –  Jack Stewart Sep 4 '12 at 19:04
2  
@mtahmed Actually it depends on the installation you are using. Last time I installed using the new Arch version, I didn't need to do anything. If you do, you usually need; pacman-key --init ; pacman-key --populate archlinux. JackStewart: I remember having the same problem with XFCE4. I The only way for me to close the lid was telling XFCE4 to suspend and not hibernate. Maybe a hint, perhaps you tried laptop-tools from the repo? wiki.archlinux.org/index.php/Laptop_Mode_Tools –  Ephexeve Sep 11 '12 at 10:14
add comment

You will need to install archlinux-keyring package to have all needed public key.

pacman -S archlinux-keyring

More information here.

Also you should lock first, suspend later:

button/lid)
    case $3 in
        close)
            #echo "LID switched!">/dev/tty5
            DISPLAY=:0.0 su -c - username /usr/bin/slimlock &
            /usr/sbin/pm-suspend
            ;;
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.