Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-08-04 18:37:15

johnywhy
Member
Registered: 2011-10-09
Posts: 288

[Solved] How to change lock program to xtrlock?

i installed xtrlock. Works great!
How can i set xfce "Lock" feature to use xtrlock instead of Light Locker?

thx

Last edited by johnywhy (2018-08-05 00:55:20)


arch xfce x86_64

Offline

#2 2018-08-04 18:48:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

If you are using xfce4-session 4.13, then:

xfconf-query -c xfce4-session -p /general/LockCommand -s "xtrlock" --create -t string

...assuming "xtrlock" is the actual command. Replace if required.

If earlier version, you'll need to manually edit the xflock4 script to include the option.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#3 2018-08-04 19:16:26

johnywhy
Member
Registered: 2011-10-09
Posts: 288

Re: [Solved] How to change lock program to xtrlock?

i get:

Failed to init libxfconf: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

THX


arch xfce x86_64

Offline

#4 2018-08-04 20:23:55

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

Is xfconfd not running?

ps -ef | grep xfconfd

Also make sure that you are running that command in your user profile, not as root.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#5 2018-08-04 21:08:30

johnywhy
Member
Registered: 2011-10-09
Posts: 288

Re: [Solved] How to change lock program to xtrlock?

ToZ wrote:

Is xfconfd not running?

# ps -ef | grep xfconfd
johny     1242  1088  0 14:04 ?        00:00:00 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
root      2050  1983  0 14:06 pts/0    00:00:00 grep --color=auto xfconfd

Also make sure that you are running that command in your user profile, not as root.

failed both ways.

- when run as root, Received the error .
- when run as local user, no error, but the Lock Screen option on Action menu does nothing.

Last edited by johnywhy (2018-08-04 21:10:58)


arch xfce x86_64

Offline

#6 2018-08-04 21:13:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

Don't run as root - run command as johny.

What version of xfce4-session?

xfce4-session -V | head -1

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#7 2018-08-04 21:25:35

johnywhy
Member
Registered: 2011-10-09
Posts: 288

Re: [Solved] How to change lock program to xtrlock?

ah, i guess that's the issue. I didn't have `xfce4-about` installed, so i wasn't sure how to check version. I guess `xfce4-session -V` gives xfce version, correct?

$ xfce4-session -V | head -1
xfce4-session 4.12.1 (Xfce 4.12)

so i need to edit /usr/bin/xflock? Looking at it, not sure where to put xtrlock.

THX


arch xfce x86_64

Offline

#8 2018-08-04 21:54:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

Change this section:

for lock_cmd in \
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock"
do
    $lock_cmd >/dev/null 2>&1 && exit
done

...to read:

for lock_cmd in \
    "xtrlock" \
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock"
do
    $lock_cmd >/dev/null 2>&1 && exit
done

Understand that the file will get overwritten if xfce4-session is ever updated.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#9 2018-08-04 21:56:46

johnywhy
Member
Registered: 2011-10-09
Posts: 288

Re: [Solved] How to change lock program to xtrlock?

ToZ wrote:

the file will get overwritten if xfce4-session is ever updated.

What causes that?


arch xfce x86_64

Offline

#10 2018-08-04 21:58:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

The action of updating the xfce4-session package will install all new files from the package. Since xflock4 is a file in the package, it will be overwritten.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#11 2018-08-04 22:01:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

Another option, to avoid the overwrite, is to create the file /usr/local/bin/xflock4 with the following contents: https://git.xfce.org/xfce/xfce4-session … ts/xflock4 and make the file executable.

It will be executed instead of /usr/bin/xflock4 and it supports the xfconf-query command that you ran in earlier (post #2).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#12 2018-08-04 22:20:54

johnywhy
Member
Registered: 2011-10-09
Posts: 288

Re: [Solved] How to change lock program to xtrlock?

ToZ wrote:

to avoid the overwrite, is to create the file /usr/local/bin/xflock4 with the following contents: https://git.xfce.org/xfce/xfce4-session … ts/xflock4 and make the file executable.


awesome! But does not seem to work

in the file you linked, i assume i replace
    "$LOCK_CMD" \

with
    "xtrlock" \

correct? (Neither way works.)

any reason i can't just copy the default xflock4 into the local folder, instead of copying the file you linked? (Neither one works.)

THX

Last edited by johnywhy (2018-08-04 22:37:01)


arch xfce x86_64

Offline

#13 2018-08-04 23:07:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,492

Re: [Solved] How to change lock program to xtrlock?

in the file you linked, i assume i replace
    "$LOCK_CMD" \

with
    "xtrlock" \

correct? (Neither way works.)

No. Leave the file as is.

What is the exact xtrlock command you use? From here, it looks like it is "xtrlock -b".

Can you post back the contents of /usr/bin/xflock4, /usr/local/bin/xflock4 as well as the results of the following:

ls -l /usr/local/bin/xflock4

...and:

xfconf-query -c xfce4-session -p /general/LockCommand

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#14 2018-08-05 00:55:03

johnywhy
Member
Registered: 2011-10-09
Posts: 288

Re: [Solved] How to change lock program to xtrlock?

well i'm embarrassed. i was using ...bin/local...

all good

THX

Last edited by johnywhy (2018-08-05 00:55:42)


arch xfce x86_64

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 8 queries executed - Memory usage: 597.6 KiB (Peak: 614.45 KiB) ]