Play/pause music when screen locked?












1















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.










share|improve this question


















  • 1





    Have you considered buying a keyboard with media keys? These should keep working when the screen is locked.

    – Jos
    Jan 9 at 11:37











  • That'd be kind of overkill. Besides, I use a 14'' laptop, so it's not really an option.

    – Célestin Taramarcaz
    Jan 9 at 11:49











  • @CelestinTaramarcaz rite now, if your screen is auto locked or you manually lock it when rhythmbox is playing music.. what is happening.. is it continuing the music or?

    – PRATAP
    Jan 9 at 11:52













  • i am using audacious as the music player and it is possible with my keyboard which have media keys.

    – PRATAP
    Jan 9 at 12:01











  • @PRATAP The music keeps playing when the screen locks (which it does automatically after 5 minutes or so). My keyboard sadly doesn't have such keys...

    – Célestin Taramarcaz
    Jan 9 at 18:01
















1















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.










share|improve this question


















  • 1





    Have you considered buying a keyboard with media keys? These should keep working when the screen is locked.

    – Jos
    Jan 9 at 11:37











  • That'd be kind of overkill. Besides, I use a 14'' laptop, so it's not really an option.

    – Célestin Taramarcaz
    Jan 9 at 11:49











  • @CelestinTaramarcaz rite now, if your screen is auto locked or you manually lock it when rhythmbox is playing music.. what is happening.. is it continuing the music or?

    – PRATAP
    Jan 9 at 11:52













  • i am using audacious as the music player and it is possible with my keyboard which have media keys.

    – PRATAP
    Jan 9 at 12:01











  • @PRATAP The music keeps playing when the screen locks (which it does automatically after 5 minutes or so). My keyboard sadly doesn't have such keys...

    – Célestin Taramarcaz
    Jan 9 at 18:01














1












1








1








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.










share|improve this question














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.







lock-screen rhythmbox music-player






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 9 at 11:07









Célestin TaramarcazCélestin Taramarcaz

1099




1099








  • 1





    Have you considered buying a keyboard with media keys? These should keep working when the screen is locked.

    – Jos
    Jan 9 at 11:37











  • That'd be kind of overkill. Besides, I use a 14'' laptop, so it's not really an option.

    – Célestin Taramarcaz
    Jan 9 at 11:49











  • @CelestinTaramarcaz rite now, if your screen is auto locked or you manually lock it when rhythmbox is playing music.. what is happening.. is it continuing the music or?

    – PRATAP
    Jan 9 at 11:52













  • i am using audacious as the music player and it is possible with my keyboard which have media keys.

    – PRATAP
    Jan 9 at 12:01











  • @PRATAP The music keeps playing when the screen locks (which it does automatically after 5 minutes or so). My keyboard sadly doesn't have such keys...

    – Célestin Taramarcaz
    Jan 9 at 18:01














  • 1





    Have you considered buying a keyboard with media keys? These should keep working when the screen is locked.

    – Jos
    Jan 9 at 11:37











  • That'd be kind of overkill. Besides, I use a 14'' laptop, so it's not really an option.

    – Célestin Taramarcaz
    Jan 9 at 11:49











  • @CelestinTaramarcaz rite now, if your screen is auto locked or you manually lock it when rhythmbox is playing music.. what is happening.. is it continuing the music or?

    – PRATAP
    Jan 9 at 11:52













  • i am using audacious as the music player and it is possible with my keyboard which have media keys.

    – PRATAP
    Jan 9 at 12:01











  • @PRATAP The music keeps playing when the screen locks (which it does automatically after 5 minutes or so). My keyboard sadly doesn't have such keys...

    – Célestin Taramarcaz
    Jan 9 at 18:01








1




1





Have you considered buying a keyboard with media keys? These should keep working when the screen is locked.

– Jos
Jan 9 at 11:37





Have you considered buying a keyboard with media keys? These should keep working when the screen is locked.

– Jos
Jan 9 at 11:37













That'd be kind of overkill. Besides, I use a 14'' laptop, so it's not really an option.

– Célestin Taramarcaz
Jan 9 at 11:49





That'd be kind of overkill. Besides, I use a 14'' laptop, so it's not really an option.

– Célestin Taramarcaz
Jan 9 at 11:49













@CelestinTaramarcaz rite now, if your screen is auto locked or you manually lock it when rhythmbox is playing music.. what is happening.. is it continuing the music or?

– PRATAP
Jan 9 at 11:52







@CelestinTaramarcaz rite now, if your screen is auto locked or you manually lock it when rhythmbox is playing music.. what is happening.. is it continuing the music or?

– PRATAP
Jan 9 at 11:52















i am using audacious as the music player and it is possible with my keyboard which have media keys.

– PRATAP
Jan 9 at 12:01





i am using audacious as the music player and it is possible with my keyboard which have media keys.

– PRATAP
Jan 9 at 12:01













@PRATAP The music keeps playing when the screen locks (which it does automatically after 5 minutes or so). My keyboard sadly doesn't have such keys...

– Célestin Taramarcaz
Jan 9 at 18:01





@PRATAP The music keeps playing when the screen locks (which it does automatically after 5 minutes or so). My keyboard sadly doesn't have such keys...

– Célestin Taramarcaz
Jan 9 at 18:01










1 Answer
1






active

oldest

votes


















0














go to keyboard shortcut section and find the "Sound and Media"
enter image description here



set the shortcuts to other key combos as you dont have media keys on your keyboard.



i have configured like below
enter image description here



i have tested them without lockscreen,
enter image description here



it worked on lockscreen also
enter image description here






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108257%2fplay-pause-music-when-screen-locked%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    go to keyboard shortcut section and find the "Sound and Media"
    enter image description here



    set the shortcuts to other key combos as you dont have media keys on your keyboard.



    i have configured like below
    enter image description here



    i have tested them without lockscreen,
    enter image description here



    it worked on lockscreen also
    enter image description here






    share|improve this answer




























      0














      go to keyboard shortcut section and find the "Sound and Media"
      enter image description here



      set the shortcuts to other key combos as you dont have media keys on your keyboard.



      i have configured like below
      enter image description here



      i have tested them without lockscreen,
      enter image description here



      it worked on lockscreen also
      enter image description here






      share|improve this answer


























        0












        0








        0







        go to keyboard shortcut section and find the "Sound and Media"
        enter image description here



        set the shortcuts to other key combos as you dont have media keys on your keyboard.



        i have configured like below
        enter image description here



        i have tested them without lockscreen,
        enter image description here



        it worked on lockscreen also
        enter image description here






        share|improve this answer













        go to keyboard shortcut section and find the "Sound and Media"
        enter image description here



        set the shortcuts to other key combos as you dont have media keys on your keyboard.



        i have configured like below
        enter image description here



        i have tested them without lockscreen,
        enter image description here



        it worked on lockscreen also
        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 9 at 19:28









        PRATAPPRATAP

        2,4482525




        2,4482525






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108257%2fplay-pause-music-when-screen-locked%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Category:香港粉麵

            List *all* the tuples!

            Channel [V]