Ubuntu – Difference between gnome-screensaver-command -a and gnome-screensaver-command -l

gnomegnome-screensaverscreensaver

I was trying to figure out difference between

gnome-screensaver-command -a

and

gnome-screensaver-command -l

According to the gnome-screensaver-command man page…

-l, --lock                 Tells the running screensaver process to lock the screen immediately
-a, --activate             Turn the screensaver on (blank the screen)

For me in both the cases it generated the login screen.Can some one outline the difference in the two things??

Best Answer

I think that depends on the gnome-screensaver settings.

  • If you set your gnome screensaver not to lock the screen, than the -a option will not lock the screen.
  • If you set your gnome screensaver to lock the screen, then -a will lock it; this is the default setting in Ubuntu as far as I remember.
  • Option -l, however, will always lock it.
Related Question