How I made my laptop lock the screen when the lid is closed

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
moi_classic2007
Posts: 23
Joined: Sun 20 Mar 2016, 23:40

How I made my laptop lock the screen when the lid is closed

#1 Post by moi_classic2007 »

Hello all!
I want to make my laptop auto lock the screen when the lid is closed. However I did not find the direct answer for this question, so I did it my self and want to share to everybody
I am using puppy tahr 6.0.5 and xfce 4.12

Just make a change in ~/Startup/acpi
Increase the time for command sleep to 10 seconds or more.
And add this file to startup list by using Session and Startup app (I dont know why but if I dont add it to startup list, the laptop wont lock the screen)
Then you need to change the file /etc/acpi/actions/suspend.sh to make it lock out instead of suspend. In my case, I replaced
#suspend
echo -n mem > /sys/power/state

with:

#suspend
AppRun

Work like a charm!
I am a newbie and sr for my english, just want to share st help full and useful
Last edited by moi_classic2007 on Fri 25 Mar 2016, 18:49, edited 1 time in total.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

What do you mean by "logout" ?

Is it just "wmexit" to exit to prompt ?
Then you likely are not logged out .

You may need to kill the login shell,
that started "xwin" via /etc/profile or /root/.profile
to logout ..
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

Post Reply