You are not logged in.

#1 2007-08-26 13:16:24

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

lock screen on lid close

Anyone knows how to configure arch to automatically lock the screen on closing the lid? I know this can be done using gnome-power-manager but I don't want gnome dependencies. Googling, I found a few references to modifying some scripts in /etc/acpi, but that did not work for me.

Offline

#2 2007-08-27 14:48:48

shen
Member
Registered: 2003-09-05
Posts: 272
Website

Re: lock screen on lid close

well I know that I have mine set to automatically shutoff in /etc/acpi/handler.sh. It's around line 60 where it starts the button/lid. Here's the exact code... All you would need is to know the command to lock the screen and replace /sbin/poweroff with that command.. Hope that helps.If you figure it out post it I may switch to locking instead of shutting off.

button/lid)
        #echo "LID switched!">/dev/tty5
        /sbin/poweroff
        ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;

Last edited by shen (2007-08-27 14:50:27)

Offline

#3 2007-08-27 14:51:09

shen
Member
Registered: 2003-09-05
Posts: 272
Website

Re: lock screen on lid close

Another option might be using xscreensaver, it has a screen locking feature.

Last edited by shen (2007-08-27 14:59:10)

Offline

#4 2007-08-27 15:44:31

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

Re: lock screen on lid close

Thanks for the tip! I replaced /sbin/poweroff with /usr/bin/xscreensaver-command -lock, and it's locking properly.

Offline

#5 2007-08-27 16:34:16

tanis
Member
From: Poland / Waterloo, ON, Canada
Registered: 2007-04-21
Posts: 259

Re: lock screen on lid close

You could also try:

kdesktop_lock -forcelock

Last edited by tanis (2007-08-27 16:34:24)

Offline

Board footer

Powered by FluxBB