running puppy 9.5 on a stick. is there anyway to have the desktop lock when i close the lid. if so how. tks
note no problem when in ubuntu
How to lock my laptop when the lid is closed? (Solved)
Moderator: Forum moderators
-
- Posts: 237
- Joined: Thu Feb 25, 2021 12:29 am
- Been thanked: 4 times
How to lock my laptop when the lid is closed? (Solved)
- mikewalsh
- Moderator
- Posts: 6208
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 806 times
- Been thanked: 1998 times
Re: locking laptop
@rburkartjo :-
Wot? no "cheese-maker's"....?? We miss you, mate. (NickAu's done a sterling job keeping it going, y'know....)
Mike.
- bigpup
- Moderator
- Posts: 7072
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 926 times
- Been thanked: 1537 times
Re: locking laptop
Not exactly by just closing the lid.
Xlock will lock the screen, by clicking on the lock icon, on the desktop.
To unlock, you have to enter a password, that you make, before using Xlock.
Right click on the desktop lock icon.
The right click menu gives you some options and selections, for Lock.
Do not forget the password.
To set password.
Click on the Lock icon.
A input window will open.
To set password:
Type it in
Press enter key
It will ask to Repeat, to make sure it got it correctly set.
I know, on the lock icon right click menu. It has option to clear the password.
But you are the one that unlocked the screen, so you are the one that set it.
If you have cleared the password.
When you click on the Lock icon.
It will ask you to make a password, before it locks the screen.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
Re: How to lock my laptop when the lid is closed?
You could edit the file /etc/acpi/actions/suspend.sh
and add this line to the bottom of the file:
Code: Select all
xlock -mode blank
Closing the lid should suspend the computer,
then lock the screen when the lid is opened.
You can disable ctrl+alt+backspace if you want to prevent it from killing X.
-
- Posts: 237
- Joined: Thu Feb 25, 2021 12:29 am
- Been thanked: 4 times
Re: How to lock my laptop when the lid is closed? (Solved)
Hey, slacko 7.0 user here. I found out that in my case for the suspend.sh to work, apart from adding the xlock line, I also had to comment out the detection of USB devices which prevents the script from executing the suspend:
Code: Select all
# do not suspend if usb media mounted
USBS=$(probedisk2|grep '|usb' | cut -d'|' -f1 )
for USB in $USBS
do
mount | grep -q "^$USB" && rm -f "$LOCKFILE" && exit 0
done
In my case, a built-in SD card reader is detected by probedisk2 as usb drive, even if the card is not inserted:
Code: Select all
# probedisk2
/dev/sda|drive|ATA WDC WD800BEVS-22
/dev/sdb|usbdrv|Generic- Multi-Card
# probedisk2|grep '|usb' | cut -d'|' -f1
/dev/sdb
Either comment this out or modify $USBS to your hardware specifications and needs. I am not sure what is even the purpose of this preventive check.
- mikewalsh
- Moderator
- Posts: 6208
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 806 times
- Been thanked: 1998 times
Re: How to lock my laptop when the lid is closed? (Solved)
@elovelo :- Hi.....and to the "kennels".
Mm. That kinda sounds vaguely familiar, y'know. I'm thinking back to MY early days with Puppy, and the elderly Compaq desktop I was using at the time.
I'd inherited it from my sister - she'd "retired" it for a new Windows 7 machine when Windows XP went EOL, and I said I'd take it off her hands. It was around 10 yrs old then, and it had a 4-in-one multi-card reader. Which hadn't worked for years.....but Puppy saw that card reader as occupying 4 mount-points, regardless of whether it functioned or not.
My available mount-points always went from sdb direct to sdg; sdc, sdd, sde AND sdf were simply "unavailable" for use.....
So, yes; I'd say it's a long-standing, and in all likelihood well-known and/or well-documented issue. I doubt either you OR I are the first ones to have encountered it. Not by a long chalk..!
Mike.
- bigpup
- Moderator
- Posts: 7072
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 926 times
- Been thanked: 1537 times
Re: How to lock my laptop when the lid is closed? (Solved)
suspend.sh to work, apart from adding the xlock line, I also had to comment out the detection of USB devices which prevents the script from executing the suspend:
That was in suspend.sh if you are booting from Puppy installed on a USB with the save on the USB.
If it suspended at the time the save was being written to, not a good idea.
Slacko 7 is not that updated to all the changes, to how Puppy works, that are in newer versions.
Slacko 7 is still a little buggy.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected