Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-02-26 01:37:04

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

xflock4

The keyboard binding ctrl-alt-del was not locking my screen. So, I checked to make sure the binding was there. Check.

Next I did xflock4 from the command line. It executed, but did nothing. Hmmmm ...

Looked at xfclock4. It's a simple shell script which __I think__ tries to look though some possible screen lockers and hope that one of them works. I am not an expert as sh programming, but I don't see why it's not. Anyway, I reordered the list an put "gnome-screensaver-command --lock" at the top of the list. And, not the xflock4 works.

Is this a bug?

Offline

#2 2018-02-26 02:11:00

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

Re: xflock4

Silly question, but is gnome-screensaver installed? What happens if you run that command directly?

gnome-screensaver-command --lock

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 ---

Offline

#3 2018-02-26 02:20:19

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: xflock4

Yes, gnome-screensaver was installed all along. And gnome-screensaver-command --lock always worked from the command line.

It did not work when it was the 3rd line in the xflock4 script; but it did when it was the 1st.

And, no, I did not install any other programs between not-working and working smile

Offline

#4 2018-02-26 02:52:39

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

Re: xflock4

Can you post the contents of the original script on your system?

(the script has changed over time - it's current version looks like this: https://git.xfce.org/xfce/xfce4-session … ts/xflock4.)

Is it possible that for the first or second original entries, you have those programs installed? If so, they would take preference over gnome-screensaver and their commands would be run.


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 ---

Offline

#5 2018-02-26 03:43:27

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: xflock4

Ahhh, this is definitely NOT the script that was on my computer.

Has this been pushed out in new versions of xfce4? I'm running Mint 18.3 and my xfce4 is 4,12

I just tried the main command in the new script from a terminal:

  bob$ xfconf-query -c xfce4-session -p /general/LockCommand
Property "/general/LockCommand" does not exist on channel "xfce4-session".

So, it really looks like I'm behind in my versions? It's all not a big deal since I have it working now. And, it would be easy as well to just point the keyboard combo to the gnome application.

Offline

#6 2018-02-26 11:21:41

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

Re: xflock4

Yes, you have an older version.

bob$ xfconf-query -c xfce4-session -p /general/LockCommand
Property "/general/LockCommand" does not exist on channel "xfce4-session".

This functionality was added in a later version than you have - it allows to specify a custom lock command via an xfconf setting.

As long as its working now, you should be fine. The next version of Xfce will have some more added functionality with respect to locking.

EDIT: But as for the reason as to why it didn't originally work, do you have xscreensaver (or another screensaver) application installed?

Last edited by ToZ (2018-02-26 11:22:41)


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 ---

Offline

#7 2018-02-26 16:17:27

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: xflock4

I had gnome-screensaver installed.

I did have xscreensaver installed at one point, but (if I recall smile ) I deleted it. Could be that some files were hanging around from that which confused the script.

Oh well ... it works now.

Offline

#8 2021-04-10 12:17:23

jarnos
Member
From: Finland
Registered: 2009-03-22
Posts: 50
Website

Re: xflock4

GNOME Screensaver has a regression bug: 'gnome-screensaver-command --lock' will exit with status 0 and do nothing, if 'gnome-screensaver' (i.e. the daemon) is not running. That confuses xflock4 script. GNOME Screensaver is unmaintained, so we can not expect the bug to be fixed.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 10 queries executed - Memory usage: 543.76 KiB (Peak: 544.6 KiB) ]