If you're using Budgie or MATE, you'll need to create a file
/etc/lightdm/slick-greeter.conf. The folder
/etc/lightdm may not exist, in which case you'll need to create it using
sudo mkdir -p /etc/lightdm/
The contents should be along the lines of:
It doesn't have to be that path, it's just an example.
If you're using GDM, you can just select the Lock Screen option in GNOME Control Center -> Backgrounds. I'd suggest you do the same if you're using Budgie, I don't quite remember if it affects gnome-screensaver or not.