According to its man page, xdg-screensaver activate
Turns the screensaver on immediately. This may result in the screen getting locked, depending on existing system policies
I’d like to be able to fire this off without immediately locking the screen but at the moment these policies seem to be forcing it to lock.
I can see from the process list that xdg-screensaver launches kscreenlocker_greet. This has a command-line option “–nolock”, but even with that the screensaver locks, so I think it must be overriding that from a configuration somewhere.
I’ve hunted round search engines and various files to find out where these policies are set without success. Does anyone know how they’re set/changed?
Thanks.
If I understand correctly and this setting is applied generally, then it is
System Settings > Power Management > "On AC Power" (tab) | "On Battery" (tab) > Display and Brightness > Turn off screen > "When Locked N minute" (menu)
Thanks for the suggestion. Unfortunately my problem isn’t getting something to run after the screen is locked - it’s preventing the screen from locking immediately the screensaver is invoked.
Could a way to do this not be running a script that checks for input after the screensaver and if a certain time has passed with no activity, lock it??
(Why) Does the screensaver even need to trigger locking the screen/session?
Can’t it just be “saving the screen”? Or blanking it? Without locking it?
Then you’d only have to contend with the screen being locked …
What is the use for such screen saver anyway - which then would be only hide the screen content until someone moves the mouse or pressed a key?
Locking (eventually) is useful on the odd occasion I have to leave my session running when I go out; in the (admittedly low-probability) event of someone breaking in, it would at least stop them getting into it.
With modern screens a “saver” as such isn’t as necessary as it used to be with CRT monitors where burn-in could be problematic. I just enjoy having a slideshow of my photos on the screen when I’m not actually using the computer.
But annoyingly xdg-screensaver (and indeed /usr/lib/kscreenlocker_greet, which it calls) still locks immediately. It must be a setting outside of the home directory, because copying my entire home directory to a new user results in it not locking. But I really don’t want to have to completely re-jig everything for a new user.
I’ve got “Lock screen automatically” there set “never”. Whatever’s making it lock immediately seems to be outside of my home directory, from testing I’ve done.
I think I’ve managed a (messy) workaround which involves using xscreensaver initially, then triggering xdg-screensaver after a predetermined period to then lock the screen. Unfortunately xscreensaver can’t do screen locking on Wayland.
It seems to me that you have chosen a fairly complicated way of doing something which is actually very simple to do on Plasma Wayland.
All you need to do is go into System Settings → Screen Locking, select “Lock Screen Automatically”, choose the the period of inactivity before the screen will lock, and set a suitable delay before a password is required to unlock the screen. I just set mine up to lock after 1 minute, and allow unlocking without a password for 30 seconds:
I then clicked on Screen Locking’s “Configure Appearance” button (highlighted in red on the screenshot above), and selected to show a slideshow of pictures from my wallpaper folders when the screen is locked, with the image changing every 7 seconds:
Moving the mouse within the first 30 seconds takes me straight back to my desktop; moving the mouse after 30 seconds requires me to enter my password to go back to the desktop.
@beermad - Now I see what you are ultimately trying to achieve, I have to agree with @scotty65.
I keep a directory of wallpapers under the ~/.local heirarchy and select that directory in the Wallpaper dialog:
Wallpaper type: Slideshow
(set to change every 15 minutes, or any interval I choose)
If the pictures you wish to cycle are not 16:9 ratio (suitable for wallpaper, for example) and are photographs with random dimensions, you can also change the way they are scaled and positioned:
Positioning: Scaled, keep proportions
(or possibly Centered)
I think you could likely find an acceptable combination just from Plasma’s own Wallpaper settings.
This is the strange thing. Even if I set that up to lock the screen automatically, it doesn’t fire up the screensaver. If I log in with another user and do the same it works fine.
I’m pretty sure I did something many years ago to suppress the KDE screensaver because I preferred xscreensaver and at the time there was no simple way to disable KDE’s. Unfortunately I can’t work out what it was. It was evidently not something under my home directory, as copying the entirety of that to another user results in the screensaver being launched as expected. Pity I didn’t make a note of what it was at the time…