Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 583  / 2 Years ago, sat, february 26, 2022, 11:49:29

I know there's a lot of dupes around the keyring, but I did my research, and I think my question is unique:



Is it possible to



1) lock the screen during autologin-boot (to maintain security, but have the comfortable autologin start the desktop while you fetch coffee)



2) then, when arriving at the computer, you unlock the screensaver with your password, and at the same time (by this process) the keyring gets unlocked? (to save yourself having to enter your password twice in a row, once for the screensaver, once for the keyring)



This approach would have the benefit that Alice could enjoy automatic startup without sacrificing too much security (i.e. no unlocked autologin), and save her from entering her password multiple times (by combining screen and keyring unlock - an OK approach security-wise I think).
It would effectively, from a user perspective, behave like a conventional startup&login process, only that your system is fully ready once you enter the password (under the conditions of one-user systems and unattended boot up - not untypical for laptop users I maintain).



Information found so far:



ad 1): I found this brainstorm, but on adding his code to .profile, my screensaver unlock prompt just endlessly blinks on and off, so this is probably an obsolete process. Any other options or corrections to the linked one?



[edit]: OK, this part worked by adding gnome-screensaver-command -al to the startup applications. Sadly, on unlock the keyring unlock dialog greets me, so #2 is still outstanding.



ad 2): I couldn't find any hints as to if this is possible.



[edit2]: It seems there is currently no way to do this, except by disabling the keyring password.


More From » login

 Answers
3

With unsecure keyring



You could add gnome-screensaver-command -a at Startup Applications:



1) Alt + F2 then paste gnome-session-properties and click Enter



2) Click "Add" and paste the command above.



enter image description here



Regards.



With secure keyring



(If you don't want to empty your keyring password)



After the steps above, you make a script that will run at startup and will check if the screen are locked or not. If it is unlocked, it will run a python script to unlock keyring.



Make this perl script and put it to run at "Startup Applications"



  
#!/usr/bin/perl
my $cmd = "dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'"";

open (IN, "$cmd |");

while () {
if (m/^s+boolean false/) {
exec('/usr/bin/unlock-keyring');
}
}


Make this python script, make it executable and move it to /usr/bin/unlock-keyring



  
#!/usr/bin/env python

import gnomekeyring
import getpass

gnomekeyring.unlock_sync(None, getpass.getpass('Password:your.password.goes.here'));


References: 1, 2, 3.


[#43918] Sunday, February 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
overine

Total Points: 20
Total Questions: 109
Total Answers: 98

Location: Aruba
Member since Fri, Jun 24, 2022
2 Years ago
overine questions
Tue, Jul 12, 22, 00:27, 2 Years ago
Wed, Jan 11, 23, 02:15, 1 Year ago
Tue, Aug 10, 21, 01:39, 3 Years ago
;