! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
add more locking alternatives to xflock4
Status:
RESOLVED: WONTFIX
Product:
Xfce-utils
Component:
General

Comments

Description Christoph Mende 2008-09-26 14:31:17 CEST
like xtrlock, slock and maybe alock
Comment 1 Jarno Suni 2009-01-29 16:30:35 CET
I think it is not good to restrict locking alternatives to a specific list of utilities. Xfce may have a default utility for xflock4, but user should be able to override the utility xflock4 uses. xflock4 could check for a configuration file setting or a custom script in certain location(s). one location under current user's home directory and one location for system-wide setting, if the former is not set.
Comment 2 Yves-Alexis Perez editbugs 2009-01-29 16:56:51 CET
What you can do is putting another xflock4 before in the PATH.

Another solution would be to use an environment variable.
Comment 3 Jarno Suni 2009-01-29 17:56:59 CET
(In reply to comment #2)
> What you can do is putting another xflock4 before in the PATH.

Like in /usr/local/bin in Xubuntu; I had to log out and log in to make it work.
 
> Another solution would be to use an environment variable.

I suppose that does not help, if you don't change the xflock4.
Comment 4 Yves-Alexis Perez editbugs 2009-01-29 18:41:08 CET
Yes I meant using an env in the script.
Comment 5 Jarno Suni 2009-02-10 11:29:36 CET
(In reply to comment #4)
> Yes I meant using an env in the script.

I think it is more secure to create another instance of xflock4 like you told, or by just editing xflock4 script as superuser, if you want to use an alternative utility for screen locking.
Comment 6 Jarno Suni 2009-02-10 13:25:47 CET
To allow different users to use different locking method, a check for a custom script in $HOME could be done in the main script.
Comment 7 Jarno Suni 2009-03-26 09:08:32 CET
(In reply to comment #6)
> To allow different users to use different locking method, a check for a custom
> script in $HOME could be done in the main script.

But that would pose a risk since regular user could execute any regular command by xflock4 then. Using an environment variable token to choose from a limited set of utilities would be safer, I think.
Comment 8 Jarno Suni 2009-03-26 13:18:06 CET
Created attachment 2254 
diff file for the rewrite

(In reply to comment #0)
> like xtrlock, slock and maybe alock

I tried slock that made my computer screen go crazy and alock that I could not use (in Xubuntu 8.10). However, I added xtrlock as a new alternative. Environment variable SCREEN_LOCK_UTILITY is used for choosing preferred utility (in the proposed patch). The variable should be initialized and exported somewhere. A distribution should have the respective package (or xlockmore or xlockmore-gl for xlock) installed together with Xfce.
Comment 9 Jarno Suni 2009-03-26 15:13:28 CET
Created attachment 2255 
script that does not stop control

I modified the script so that daemon-less lockers don't keep the script waiting until they exit. The name of the environment variable changed to DESKTOP_LOCK_UTILITY.
Comment 10 Jarno Suni 2009-04-01 09:56:47 CEST
(In reply to comment #8)

> I tried slock that made my computer screen go crazy and alock that I could not
> use (in Xubuntu 8.10). However, I added xtrlock as a new alternative.

I would withdraw xtrlock for now: It does not always lock when launched by a keybinding (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325613). I found out that it does not always lock even if it was launched from a script and no key was pressed.
Comment 11 Jérôme Guelfucci editbugs 2010-10-25 22:46:23 CEST
We can't add support for every exotic screen locker out there. I will try to see if I can implement something for the user to enter a custom command as screen locker.
Comment 12 Yves-Alexis Perez editbugs 2010-10-26 08:09:48 CEST
(In reply to comment #11)
> We can't add support for every exotic screen locker out there. I will try to
> see if I can implement something for the user to enter a custom command as
> screen locker.

Another solution would be to ditch xflock4 completely and use xdg-screensaver which has more or less the same purpose (no idea if it works fine though).

Bug #4417

Reported by:
Christoph Mende
Reported on: 2008-09-26
Last modified on: 2010-10-26

People

Assignee:
Xfce Bug Triage
CC List:
3 users

Version

Attachments

diff file for the rewrite (870 bytes, patch)
2009-03-26 13:18 CET , Jarno Suni
no flags
script that does not stop control (934 bytes, patch)
2009-03-26 15:13 CET , Jarno Suni
no flags

Additional information