Is there a way to play/pause a media player when screen is locked? I often listen to music, most of the time using rhythmbox or VLC, on Ubuntu 18.04 LTS. After a few minutes, the screen locks as expected but leaves me without a way to play/pause the music without loging in again. I've heard about pause-on-lock but I'd like to be able to keep listening to music even on locked screen and avoid having to launch a script outside Xserver via keyboard shortcuts.
52 Answers
go to keyboard shortcut section and find the "Sound and Media"
set the shortcuts to other key combos as you dont have media keys on your keyboard.
i have tested them without lockscreen,
In my case I keep my personal laptop on my desk while working so I can listen to music on it. It does have media keys but they require use of the Fn key which necessitated use of both hands for me. I changed the keyboard shortcuts to use the function keys shared by the media keys so now when the screen is locked, F10, F11 and F12 (single keys, not with Fn) will perform "previous", "play/pause" and "next", respectively.