You are not logged in.

#1 2016-09-19 15:45:47

hughparker1
Member
Registered: 2016-05-05
Posts: 51

[SOLVED] Disable password when screen saver activated & screen locked?

I would like to disable need to enter username and password when screen is idle for a period and screen is locked, I would just like to move the mouse or hit enter on keyboard.

I did a search and someone suggested edit /etc/xdg/autostart/light-locker.desktop

... at the end, replace  "Exec=light-locker"  by  "Exec=light-locker --lock-after-screensaver=0"

Is this the best way to handle this or is there a better way?  I'm still learning linux but can use the terminal if I know the correct syntax to enter.

Last edited by hughparker1 (2016-09-21 17:44:40)

Offline

#2 2016-09-19 15:57:40

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: [SOLVED] Disable password when screen saver activated & screen locked?

There's an altogether different mechanism: If you do not need screen locking, you can just let X blank and poweroff the screen by itself after configurable intervals of non-interaction using DPMS. It's configurable from the command line using the xset tool. In order to make changed options persistent, you need to use a config file in /etc/X11/xorg.conf.d/ or execute xset with the correct parameters in your openbox autostart file.

Screen blanking means the screen just turns all black, and then off. It turns on again as soon as you interact with the computer (keyboard, mouse, joystick etc events).

In order to make use of screen blanking, uninstall light-locker. Run this to get the current blanking settings:

xset q

outputs a swath of info,  at the bottom with info as such:

...SKIP...
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
...SKIP...
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Enabled
  Monitor is On

That means my screen will blank after 10 minutes of inactivity (no event input from peripherals), and the display will also shut off after 10 minutes.

Here's some reading on how you modify these settings, and what they mean in detail.

Offline

#3 2016-09-19 17:49:17

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

nobody wrote:

Screen blanking means the screen just turns all black, and then off. It turns on again as soon as you interact with the computer (keyboard, mouse, joystick etc events).

That means my screen will blank after 10 minutes of inactivity (no event input from peripherals), and the display will also shut off after 10 minutes.

This is exactly what I would like.

nobody wrote:

In order to make use of screen blanking, uninstall light-locker.

So I should just open terminal and run ...

$ sudo apt uninstall light-locker
nobody wrote:

There's an altogether different mechanism: If you do not need screen locking, you can just let X blank and poweroff the screen by itself after configurable intervals of non-interaction using DPMS. It's configurable from the command line using the xset tool. In order to make changed options persistent, you need to use a config file in /etc/X11/xorg.conf.d/ or execute xset with the correct parameters in your openbox autostart file.

Thanks for your detailed reply. I do not need screen locking.

I had a look but couldn't find directory  /etc/X11/xorg.conf.d/   see below....

hugh@DELL-VOSTRO-BUNSENLABS:/etc/X11$ ls
app-defaults             rgb.txt  Xreset      Xsession.d        Xwrapper.config
default-display-manager  X        Xreset.d    Xsession.options
fonts                    xinit    Xresources  xsm
openbox                  xkb      Xsession    XvMCConfig

So should I create  /etc/X11/xorg.conf.d/ directory and create file "10-monitor.conf" with the content you have suggested ?

Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600

DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Enabled
  Monitor is On

Thanks again for your help it is much appreciated.

EDIT: I just read the link you included and perhaps the "10-monitor.conf" file should have the following contents and format...

Section "ServerLayout"
    Identifier "ServerLayout0"
    Option "StandbyTime" "10"
    Option "SuspendTime" "10"
    Option "OffTime"     "10"
    Option "BlankTime"   "10"
EndSection

value "10" is in minutes. Do I need the above four values?  I'm not sure if this is correct so any guidance would be appreciated.

Last edited by hughparker1 (2016-09-19 18:22:13)

Offline

#4 2016-09-19 18:37:18

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] Disable password when screen saver activated & screen locked?

yes to all your questions.
if you feel uncomfortable sudo-editing files under /etc, just use the ~/.config/openbox/autostart method
(read "man xset")

Offline

#5 2016-09-19 20:57:21

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: [SOLVED] Disable password when screen saver activated & screen locked?

I would recommend using the `xset` command in ~/.config/autostart instead as that would apply per-user (/etc/X11/xorg.conf.d is system-wide).

See https://github.com/BunsenLabs/bunsen-co … ostart#L29 & https://github.com/BunsenLabs/bunsen-co … ostart#L32 for examples.

In a similar vein, rather than removing light-locker, why not just disable it for your user?

https://forums.bunsenlabs.org/viewtopic.php?id=2080

Offline

#6 2016-09-20 21:22:29

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

Head_on_a_Stick wrote:

I would recommend using the `xset` command in ~/.config/autostart instead as that would apply per-user (/etc/X11/xorg.conf.d is system-wide).

See https://github.com/BunsenLabs/bunsen-co … ostart#L29 & https://github.com/BunsenLabs/bunsen-co … ostart#L32 for examples.

In a similar vein, rather than removing light-locker, why not just disable it for your user?

https://forums.bunsenlabs.org/viewtopic.php?id=2080

thanks for feedback. I think it would be good to use the `xset` command in  ~/.config/autostart.  But I'm not sure how to structure the correct code ...

I found some data on xset code:

xset s blank
xset s 600

blank, says to X that it wants blanking and 600 set the time in seconds(10 min)

EDIT: also found following command...

sleep 600; xset s activate		# blank screen (or activate the screensaver program, if using one)
					# after a delay of 10 minutes. 

sleep 600; xset dpms force off		# will turn the screen OFF after a delay of 10 minutes. 

Do I just add the above two lines followed by "&"?  Any advice on the correct syntax would be appreciated.

I would like the screen to go blank after 10 minutes of inactivity and the display to also shut off after 10 minutes, then turn on again as soon as I use keyboard or mouse.

I guess to use above solution I need to prevent light-locker from activating after screen saver. I tried using instructions provided in https://forums.bunsenlabs.org/viewtopic.php?id=2080

... but it didn't seem to have any effect even after reboot, here are the steps I did ....

1. copy over the .desktop file to Home folder:

$ cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart

2. edit the copied file and change the "Exec=" line to:

    Exec=/usr/bin/light-locker --lock-after-screensaver=0

3. reboot but after inactive period the lock screen was still acivated. Not sure what I did wrong.  Again, any help/advice would be appreciated.

Last edited by hughparker1 (2016-09-20 21:55:02)

Offline

#7 2016-09-21 06:17:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: [SOLVED] Disable password when screen saver activated & screen locked?

hughparker1 wrote:

I would like the screen to go blank after 10 minutes of inactivity and the display to also shut off after 10 minutes, then turn on again as soon as I use keyboard or mouse.

Good news then -- that is the default setting and requires no extra commands big_smile

For the record, `xset` options can be strung together on the same line, for example I use:

xset s 300 -dpms

Rather than:

xset s 300
xset -dpms

Also, no ampersand ("&") is needed as the command will return pretty much instantly and forking it may introduce race conditions which can conflict with other startup programs.

In respect of light-locker, you can check which options are being used with:

pgrep -a light-locker

However, I think you just want to disable it so simply adding this line to the end of the file should do the trick:

Hidden=true

Offline

#8 2016-09-21 09:45:04

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

Head_on_a_Stick wrote:
hughparker1 wrote:

I would like the screen to go blank after 10 minutes of inactivity and the display to also shut off after 10 minutes, then turn on again as soon as I use keyboard or mouse.

Good news then -- that is the default setting and requires no extra commands big_smile

That sounds perfect!  And also thanks for taking the time to explain how `xset` options can be strung together on the same line, even I can understand that big_smile


Head_on_a_Stick wrote:

In respect of light-locker, you can check which options are being used with:

pgrep -a light-locker

However, I think you just want to disable it so simply adding this line to the end of the file should do the trick:

Hidden=true

Do you mean add the above line to file /etc/xdg/autostart/light-locker.desktop

Thanks again for all your help, it's much appreciated. BunsenLabs is a very good system.

Offline

#9 2016-09-21 10:09:44

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] Disable password when screen saver activated & screen locked?

hughparker1 wrote:

....
Do you mean add the above line to file /etc/xdg/autostart/light-locker.desktop
....

Yes. Or the one you copied to your $HOME


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#10 2016-09-21 13:43:09

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

damo wrote:
hughparker1 wrote:

....
Do you mean add the above line to file /etc/xdg/autostart/light-locker.desktop
....

Yes. Or the one you copied to your $HOME

Thanks for quick reply, I did as suggested and restarted laptop but after 10 minutes the screen locked same as before, I must have done a step incorrectly.

Here is the steps I did....

1. copy over the .desktop file to Home folder:

   $ cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart

2. add following line to end of ~/.config/autostart

   Hidden=true

3. check contents of ~/.config/autostart

hugh@DELL-VOSTRO-BUNSENLABS:~$ cat .config/autostart
[Desktop Entry]
Type=Application
Name=Screen Locker
Name[ca]=Bloquejador de pantalla
Name[de]=Bildschirmsperre
Name[en_GB]=Screen Locker
Name[es]=Bloqueador de pantalla
Name[fi]=Näytön lukitusohjelma
Name[fr]=Verrouilleur d'écran
Name[gu]=સ્ક્રીન લૉકર
Name[hi]=परदा अबरोधक
Name[hu]=Képernyőzár
Name[it]=Blocca schermo
Name[kk]=Экран блоктаушысы
Name[nl]=Schermvergrendeling
Name[or]=ପରଦା ଅବରୋଧକ
Name[pl]=Blokada ekranu
Name[pt]=Bloqueio de Ecrã
Name[pt_BR]=Bloqueio de Tela
Name[ru]=Блокировщик экрана
Name[tr]=Ekran Kilitleyici
Comment=Launch screen locker program
Comment[ca]=Obre el programa de blocatge de la pantalla
Comment[de]=Bildschirmsperre starten
Comment[en_GB]=Launch screen locker program
Comment[es]=Abrir el programa de bloqueo de pantalla
Comment[fi]=Käynnistä näytön lukitusohjelma
Comment[fr]=Lancer le vérouilleur d'écran
Comment[gu]=સ્ક્રીન લૉકર પ્રક્રિયાને શરુ કરો
Comment[hi]=परदा अबरोधक प्रोग्राम आरम्भ करें
Comment[hu]=Képernyőzár program indítása
Comment[it]=Lancia il programma blocca schermo
Comment[kk]=Экранды блоктау бағдарламасын жөнелту
Comment[nl]=Schermvergrendelingsprogramma starten
Comment[or]=ପରଦା ଅବରୋଧକ ଆରମ୍ଭ କରନ୍ତୁ
Comment[pl]=Uruchom program blokady ekranu
Comment[pt]=Lançar o programa de bloqueio do ecrã
Comment[pt_BR]=Iniciar o programa de bloqueio de tela
Comment[ru]=Запустить программу блокировки экрана
Comment[tr]=Ekran kilitleyici programı başlat
Icon=preferences-desktop-screensaver
Exec=light-locker
NoDisplay=true
Hidden=true
hugh@DELL-VOSTRO-BUNSENLABS:~$ 

    REBOOT

Can you spot any mistakes?

Last edited by hughparker1 (2016-09-21 13:44:19)

Offline

#11 2016-09-21 13:56:31

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] Disable password when screen saver activated & screen locked?

^ If that is what you did you created a file called "~/.config/autostart",  instead of copying light-locker.desktop to the autostart directory.  You should use a trailing "/", or specify the name

cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart/light-locker.desktop

Last edited by damo (2016-09-21 14:19:14)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#12 2016-09-21 14:11:16

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Disable password when screen saver activated & screen locked?

Hmm I seem to remember that both DPMS and xset need to be disabled. If you do a

xset q 

you can see a readout of your screen settings. if you could post the results, it may help.

Also If I have this right, the command:

xset s off -dpms

Should disable DPMS  AND prevent screen locking..

Last edited by Horizon_Brave (2016-09-21 14:12:32)


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#13 2016-09-21 15:28:19

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

damo wrote:

^ If that is what you did you created a file called "~/.config/autostart",  instead of copying light-locker.desktop to the autostart directory.  You should use a trailing "/", or specify the name

cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart/light-locker.desktop

Thanks for picking up my mistake.

I didn't have a directory ~/.config/autostart/ so I created one and then ran the command

$ cp /etc/xdg/autostart/light-locker.desktop ~/.config/autostart/light-locker.desktop

this successully created the file "light-locker.desktop"

then I added line to end of the file

	   Hidden=true

It now works perfectly, the screen to go blank after 10 minutes of inactivity and the display to also shut off after 10 minutes, now as soon as I use keyboard or mouse the screen turns on again.  No need for password. That's geat.

just one last question...

I understand 10 minutes is the default setting and so requires no extra commands.

But if I wanted to increase the time to 20 minutes, my understanding is I would need to add a single line to file  ~/.config/openbox/autostart     

xset s 1200 -dpms

would this blank the screen, then turn off the screen after a delay of 20 minutes?

Offline

#14 2016-09-21 15:45:46

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] Disable password when screen saver activated & screen locked?

hughparker1 wrote:

...

just one last question...

I understand 10 minutes is the default setting and so requires no extra commands.

But if I wanted to increase the time to 20 minutes, my understanding is I would need to add a single line to file  ~/.config/openbox/autostart     

xset s 1200 -dpms

would this blank the screen, then turn off the screen after a delay of 20 minutes?

Try it and see tongue

From:

$ man xset
...
 s       The s option lets you set the screen saver parameters.  This option accepts up to two numerical param‐
               eters, a 'blank/noblank' flag, an 'expose/noexpose' flag, an 'on/off' flag, an 'activate/reset'  flag,
               or  the 'default' flag.  If no parameters or the 'default' flag is used, the system will be set to its
               default screen saver characteristics.  The 'on/off' flags simply turn the screen saver functions on or
               off.   The  'activate' flag forces activation of screen saver even if the screen saver had been turned
               off.  The 'reset' flag forces deactivation of screen saver if it is active.  The 'blank' flag sets the
               preference  to  blank  the video (if the hardware can do so) rather than display a background pattern,
               while 'noblank' sets the preference to display a pattern rather than blank the  video.   The  'expose'
               flag  sets  the  preference to allow window exposures (the server can freely discard window contents),
               while 'noexpose' sets the preference to disable screen saver unless  the  server  can  regenerate  the
               screens  without causing exposure events.  The length and period parameters for the screen saver func‐
               tion determines how long the server must be inactive for screen saving to activate, and the period  to
               change  the background pattern to avoid burn in.  The arguments are specified in seconds.  If only one
               numerical parameter is given, it will be used for the length.
...

If you think the problem is sorted, then edit the title of your first post and add [SOLVED]

Or like me, just disable light-locker and set your preferences with the power manager?  Menu -> Preferences -> Power Management

Last edited by damo (2016-09-21 15:48:43)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#15 2016-09-21 18:05:07

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

damo wrote:

If you think the problem is sorted, then edit the title of your first post and add [SOLVED]
Or like me, just disable light-locker and set your preferences with the power manager?  Menu -> Preferences -> Power Management

Thanks for your patience. I have marked OP as [SOLVED]

I looked at "$ man xset" for "s" and "dpms" and I'll play with those settings in "~/.config/openbox/autostart" if I want to change from the default 10 minutes delay.

EDIT: I just looked at the Xfce Power Manager and it allows me to alter the default settings on the "Display" tab in the form. I see it changes values in the oupput of "$ xset q" which is cool smile

Thanks again for all the help I have received.  The support on this forum is excellent.  I made a few silly mistakes but I'm learning a little bit each time.

Last edited by hughparker1 (2016-09-22 10:17:19)

Offline

#16 2016-09-21 20:25:39

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: [SOLVED] Disable password when screen saver activated & screen locked?

hughparker1 wrote:

add following line to end of ~/.config/autostart

My apologies, the guide was rather vague over this point and your mistake happened because of my ambiguity.

I have edited the guide to make it more clear, thanks for the feedback smile

Offline

#17 2016-09-22 10:09:31

hughparker1
Member
Registered: 2016-05-05
Posts: 51

Re: [SOLVED] Disable password when screen saver activated & screen locked?

Head_on_a_Stick wrote:
hughparker1 wrote:

add following line to end of ~/.config/autostart

My apologies, the guide was rather vague over this point and your mistake happened because of my ambiguity.

I have edited the guide to make it more clear, thanks for the feedback smile

No problem.  I have read a lot of your guides and they have made my life a lot easier, so thanks for that. smile BunsenLabs is a great distro.

Offline

Board footer

Powered by FluxBB