Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of the "session locked" screen delay #93

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brentr
Copy link

@brentr brentr commented Jan 22, 2017

On our family desktop, multiple sessions remain open.
We use <F7...12> to switch users quickly many takes during the day.
The resulting hard coded 10 second delay light-locker enforces is annoying.
This patch makes allows that delay to be configured for any number of seconds
down to a minimum of 2. The default is 10.
I've tried to implement this analogously to "lock-after-screensaver"

Tested on Debian unstable.

@cavalier38
Copy link
Contributor

Thank you for the patch, however it needs some changes.

Just wondering about your use case. If you switch using F7...F12, that means that you don't lock all the time? Meaning something you can switch quickly other times you would be redirected to the lock screen.
Light-locker is intended that you use LightDM user switching, meaning you need to login to the other account every time you switch.

About the diff itself. The 10s delay is to explain the user what is happening. It isn't meant as a way to access the greeter. If a user uses F7...F12 alot, after the first couple of times, there is no need to explain it with a 10s delay. During this delay the user can switch screens again manually, the user isn't "force" to wait this time (referring to your the comment in ll-config.c).
As in your use case you have this many times a day, I assume that when you get the greeter instead of the session you would understand what has happened. Why keep a minimum of 2s and not allow 0 to directly switch to the greeter, if that works for the user?
The diff doesn't include the changes needed in apps.light-locker.gschema.xml.in.in and light-locker.1
I would like the command-line option and the settings to have the same name, in your patch "--wait" and "lock-wait". Also I think this name is too ambiguous, maybe something like "locked-message", open to suggestions.

It is a trivial patch, I'll merge it after the above changes. Will you make the changes? Otherwise I can take care of it.

@brentr
Copy link
Author

brentr commented Jun 5, 2017 via email

lock-wait and wait are too ambiguous.
Added locked-message to the gschema, man page and README.
@cavalier38
Copy link
Contributor

Indeed, you don't know which VT LightDM uses, the same goes for knowing which sessions is in which VT. However, light-locker is meant to be used with lock sessions commands. For example bind Ctrl + Alt + L to light-locker-command -l and use that instead of Ctrl + Alt + F7. But that won't work if you want to switch between F1...F6.

Good that you told about the race, I guessed that would be the reason. I think I have solved it.

There is a command Switch To User, and also Lock would set the username. However, I don't think that is possible to change the username if the greeter has already spawn.

The message is shown, when the user did something we didn't intend. Or, if something unexpected happened. In the first case we try to discourage the user (not really neat). In the later it is good to inform the user something is happening.

For now I picked the name "locked-message", I'll give it another thought, maybe you can too.

<range min="0" max="30" />
<default>10</default>
<summary>Seconds locked message is shown</summary>
<description>Switch to the greeter after this mumber of seconds. Durings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mumber -> number
Durings -> During

<key name="locked-message" type="u">
<range min="0" max="30" />
<default>10</default>
<summary>Seconds locked message is shown</summary>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amount of time (seconds) the lock message is shown

<default>10</default>
<summary>Seconds locked message is shown</summary>
<description>Switch to the greeter after this mumber of seconds. Durings
this time the session is locked message is shown. This time gives the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"During this time the lock message is shown. This should help users to understand what is happening."

@@ -37,5 +37,14 @@
</description>
</key>

<key name="locked-message" type="u">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lockscreen-timeout may be more meaningful as key/settings name?

@foresto
Copy link

foresto commented Jul 28, 2018

I just upgraded to the latest xubuntu release, and found that light-locker still forces me to wait 10 seconds when switching between user sessions. The bug report I filed a year and a half ago (#94) was closed with no explanation other than a reference to this PR. Is there something blocking a fix here? I can't imagine that forcibly wasting users' time is intended behavior.

@selurvedu
Copy link

Please do something... Those 10 seconds are really painful.

@@ -16,14 +16,16 @@ Usage
=====

After installing light-locker, it will auto start along your session and you will be able to lock your session with "light-locker-command -l".
This will redirect you to VT8 (assuming that your open session was on VT7 and is now kept safe by light-locker) and present LightDM's greeter for unlocking your session again.
This will redirect you to VT8 (assuming that your open session was on VT7 and is now kept safe by light-locker) and presents LightDM's greeter for unlocking your session.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

«present» was correct, the sentence here is «this will redirect [...] and present»

@stefanct
Copy link

My hopes are low to see this soon integrated in any way but if anybody spends more time on this issue for my use case it would be great if the switch does (optionally) not happen at any predefined time but only once a key is pressed (or mouse cursor is moved). The reason is that I don't actually want to be redirected at all in the common use case but let a background application (blueproximity) determine my presence and call loginctl lock-session and loginctl unlock-session automatically in the background. As of now, whenever I am longer "away" than 10 seconds I have to login manually which is the main annoyance that makes me avoid locking my screen in the first place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants