You are not logged in.

#1 2014-05-02 18:14:20

mako2580
Member
Registered: 2013-12-23
Posts: 2

[SOLVED] Xfce4 Lock after suspend

Hello everyone,
I know that there was it already asked, but in my question is something different. Is there any option to lock screen with LightDM in Xfce4 when is system going to suspend ? I already edited /usr/bin/xflock4 and it locks screen when is executed from terminal or simply locked from xfce panel, but it doesn't lock screen when i suspend computer. In power manager and in session settings is option already ticked to lock the screen after suspend.

PS: I know that "dm-tool lock" doesn't really lock the screen only redirect you to tty2.

EDIT: Now it works so here is solution:

1. Install light-locker

pacman -S light-locker

2. Create systemd service

nano /etc/systemd/system/lock.service

[Unit]
Description=Lock X session
Before=suspend.target

[Service]
Type=oneshot
ExecStart=/usr/bin/xflock4

[Install]
WantedBy=suspend.target

3. Enable systemd service

systemctl enable lock

4. Add light-locker to xflock4 script

nano /usr/bin/xflock4

#!/bin/sh
light-locker-command -l

Last edited by mako2580 (2014-05-07 16:46:26)

Offline

#2 2014-05-03 22:22:01

cacplate
Member
Registered: 2013-08-30
Posts: 14

Re: [SOLVED] Xfce4 Lock after suspend

You should place [SOLVED] in the Title.

Offline

Board footer

Powered by FluxBB