You are not logged in.

#1 2014-11-06 10:52:38

TheKing42
Member
Registered: 2014-10-08
Posts: 40

Set up light-locker with XFCE action buttons.

Light-Locker is working with suspend and stuff, but how do I get it to use light-locker when I press the Lockscreen button. I hear it has something to do with xflock4, but I am not sure what.


That question on the noobie form freaked me out. I was able to figure it out, but why do we have that?

Offline

#2 2014-11-06 11:39:35

toz
Member
Registered: 2011-10-28
Posts: 320

Re: Set up light-locker with XFCE action buttons.

The Xfce action buttons "lockscreen" command executes xflock4 to perform the lock screen action. Unfortunately, the xflock4 script that is shipped with Arch doesn't include an option to use the light-locker, so you'll need to either patch the file to include light-locker or use a workaround.

If light-locker is the only locker on your system that you use, you can for a single user:

alias xflock4='light-locker-command -l"

...in your ~/.bashrc file, or for all users, create the file /usr/local/bin/xflock4 (to override the existing file) with the content:

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

...make sure the file is executable.


If you need to patch xflock4, edit the section that reads:

# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
for lock_cmd in \
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock"
do
    $lock_cmd >/dev/null 2>&1 && exit
done

...to read:

# Lock by light-locker, xscreensaver or gnome-screensaver, if a respective daemon is running
for lock_cmd in \
    "light-locker-command -l"\
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock"
do
    $lock_cmd >/dev/null 2>&1 && exit
done

Offline

#3 2016-01-20 10:52:31

avalon
Member
Registered: 2013-12-12
Posts: 5

Re: Set up light-locker with XFCE action buttons.

much better is to use:

$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l"

or if you don't have the variable yet:

$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l" --create -t string

Offline

#4 2016-01-20 13:37:06

toz
Member
Registered: 2011-10-28
Posts: 320

Re: Set up light-locker with XFCE action buttons.

True.

But for clarity sake, you should also mention that the /general/Lockcommand enhancement is not currently part of the xfce4-session package that Arch ships and is currently only in the Xfce git tree upstream. You would have access to this parameter if:

  1. You are using the xfce4-session-git package from the AUR (or building directly from upstream)

  2. You manually edited the /usr/bin/xflock4 script to use this xfconf parameter.

Back in 2014 when this post was created, this was the only option.

Offline

#5 2016-01-20 14:05:58

avalon
Member
Registered: 2013-12-12
Posts: 5

Re: Set up light-locker with XFCE action buttons.

@toz, I don't know these details. I just hit this post searching on the internet so decided to update it with recent information. It doesn't matter for me what situation was at the time of writing. Also here's the upstream bug to make that work OOB:
https://bugzilla.xfce.org/show_bug.cgi?id=12415

Offline

#6 2016-01-20 14:23:25

toz
Member
Registered: 2011-10-28
Posts: 320

Re: Set up light-locker with XFCE action buttons.

avalon wrote:

@toz, I don't know these details. I just hit this post searching on the internet so decided to update it with recent information.

Unfortunately, the information wasn't totally accurate - hence my post to clarify for others who may stumble on this thread.

Offline

#7 2016-01-20 14:30:30

avalon
Member
Registered: 2013-12-12
Posts: 5

Re: Set up light-locker with XFCE action buttons.

You are right, thank you.

Offline

#8 2017-04-10 20:42:57

aten
Member
Registered: 2017-04-10
Posts: 1

Re: Set up light-locker with XFCE action buttons.

avalon wrote:

much better is to use:

$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l"

or if you don't have the variable yet:

$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l" --create -t string

I'm not using Arch, but for Fedora users, like myself, that encountered this problem upon updating to F25 I'd like to confirm that this method works great. Before, I used to patch xflock4 in order to add "light-locker-command -l". It worked fine, except that it is done in system space, so I had to reapply my changes every time after corresponding component was updated.  Now with implementation of "/general/LockCommand" I have done once and hopefully can forget about it.

Offline

#9 2017-04-10 21:17:29

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 238

Re: Set up light-locker with XFCE action buttons.

Hi there and welcome aten

The last post is over a year old. Please do not necrobump:
https://wiki.archlinux.org/index.php/Co … bumping.22

And you do realise that you are on the forums for Arch Linux?
https://wiki.archlinux.org/index.php/Co … .2Aonly.2A


Be aware of my Newbie Powers

Offline

#10 2017-04-11 13:10:54

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 6,793
Website

Re: Set up light-locker with XFCE action buttons.

Closing.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB