Custom button on login screen

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












Is there a way in 16.04 LTS to add a custom button to the login screen that runs a bash script?



The reason I need this is for dual-booting, so I can add a button on the login screen that will switch the OS to Windows and reboot. I'm looking to add the same button on the reverse in Windows as well.







share|improve this question




















  • This doesn't answer your question but ... is there any reason why you can't just make this selection from grub ?
    – hatterman
    Apr 24 at 13:59










  • Because I want to do it over WOL / VPN / RDP
    – Jamesking56
    Apr 24 at 14:01










  • I can tell you a workaround that I have used before. Edit '/boot/grub/grub.cfg' and set the GRUB_DEFAULT entry to the desired OS. I made a bash script called OS1 and a scipt called OS2 that would edit the file and reboot. Not at all elegent and can't be triggered from the login screen but it worked like a charm for me and might give you food for thought in the meanwhile ?
    – hatterman
    Apr 24 at 14:14










  • Would that mean I'd have to WOL, login to VPN, login to Ubuntu and then click that script just to get into Windows (and vice-versa)?
    – Jamesking56
    Apr 24 at 14:18






  • 1




    Yes, exactly that. However, its even easier using grub-reboot. Let me add an answer....
    – hatterman
    Apr 24 at 14:27














up vote
1
down vote

favorite












Is there a way in 16.04 LTS to add a custom button to the login screen that runs a bash script?



The reason I need this is for dual-booting, so I can add a button on the login screen that will switch the OS to Windows and reboot. I'm looking to add the same button on the reverse in Windows as well.







share|improve this question




















  • This doesn't answer your question but ... is there any reason why you can't just make this selection from grub ?
    – hatterman
    Apr 24 at 13:59










  • Because I want to do it over WOL / VPN / RDP
    – Jamesking56
    Apr 24 at 14:01










  • I can tell you a workaround that I have used before. Edit '/boot/grub/grub.cfg' and set the GRUB_DEFAULT entry to the desired OS. I made a bash script called OS1 and a scipt called OS2 that would edit the file and reboot. Not at all elegent and can't be triggered from the login screen but it worked like a charm for me and might give you food for thought in the meanwhile ?
    – hatterman
    Apr 24 at 14:14










  • Would that mean I'd have to WOL, login to VPN, login to Ubuntu and then click that script just to get into Windows (and vice-versa)?
    – Jamesking56
    Apr 24 at 14:18






  • 1




    Yes, exactly that. However, its even easier using grub-reboot. Let me add an answer....
    – hatterman
    Apr 24 at 14:27












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Is there a way in 16.04 LTS to add a custom button to the login screen that runs a bash script?



The reason I need this is for dual-booting, so I can add a button on the login screen that will switch the OS to Windows and reboot. I'm looking to add the same button on the reverse in Windows as well.







share|improve this question












Is there a way in 16.04 LTS to add a custom button to the login screen that runs a bash script?



The reason I need this is for dual-booting, so I can add a button on the login screen that will switch the OS to Windows and reboot. I'm looking to add the same button on the reverse in Windows as well.









share|improve this question











share|improve this question




share|improve this question










asked Apr 24 at 13:45









Jamesking56

737




737











  • This doesn't answer your question but ... is there any reason why you can't just make this selection from grub ?
    – hatterman
    Apr 24 at 13:59










  • Because I want to do it over WOL / VPN / RDP
    – Jamesking56
    Apr 24 at 14:01










  • I can tell you a workaround that I have used before. Edit '/boot/grub/grub.cfg' and set the GRUB_DEFAULT entry to the desired OS. I made a bash script called OS1 and a scipt called OS2 that would edit the file and reboot. Not at all elegent and can't be triggered from the login screen but it worked like a charm for me and might give you food for thought in the meanwhile ?
    – hatterman
    Apr 24 at 14:14










  • Would that mean I'd have to WOL, login to VPN, login to Ubuntu and then click that script just to get into Windows (and vice-versa)?
    – Jamesking56
    Apr 24 at 14:18






  • 1




    Yes, exactly that. However, its even easier using grub-reboot. Let me add an answer....
    – hatterman
    Apr 24 at 14:27
















  • This doesn't answer your question but ... is there any reason why you can't just make this selection from grub ?
    – hatterman
    Apr 24 at 13:59










  • Because I want to do it over WOL / VPN / RDP
    – Jamesking56
    Apr 24 at 14:01










  • I can tell you a workaround that I have used before. Edit '/boot/grub/grub.cfg' and set the GRUB_DEFAULT entry to the desired OS. I made a bash script called OS1 and a scipt called OS2 that would edit the file and reboot. Not at all elegent and can't be triggered from the login screen but it worked like a charm for me and might give you food for thought in the meanwhile ?
    – hatterman
    Apr 24 at 14:14










  • Would that mean I'd have to WOL, login to VPN, login to Ubuntu and then click that script just to get into Windows (and vice-versa)?
    – Jamesking56
    Apr 24 at 14:18






  • 1




    Yes, exactly that. However, its even easier using grub-reboot. Let me add an answer....
    – hatterman
    Apr 24 at 14:27















This doesn't answer your question but ... is there any reason why you can't just make this selection from grub ?
– hatterman
Apr 24 at 13:59




This doesn't answer your question but ... is there any reason why you can't just make this selection from grub ?
– hatterman
Apr 24 at 13:59












Because I want to do it over WOL / VPN / RDP
– Jamesking56
Apr 24 at 14:01




Because I want to do it over WOL / VPN / RDP
– Jamesking56
Apr 24 at 14:01












I can tell you a workaround that I have used before. Edit '/boot/grub/grub.cfg' and set the GRUB_DEFAULT entry to the desired OS. I made a bash script called OS1 and a scipt called OS2 that would edit the file and reboot. Not at all elegent and can't be triggered from the login screen but it worked like a charm for me and might give you food for thought in the meanwhile ?
– hatterman
Apr 24 at 14:14




I can tell you a workaround that I have used before. Edit '/boot/grub/grub.cfg' and set the GRUB_DEFAULT entry to the desired OS. I made a bash script called OS1 and a scipt called OS2 that would edit the file and reboot. Not at all elegent and can't be triggered from the login screen but it worked like a charm for me and might give you food for thought in the meanwhile ?
– hatterman
Apr 24 at 14:14












Would that mean I'd have to WOL, login to VPN, login to Ubuntu and then click that script just to get into Windows (and vice-versa)?
– Jamesking56
Apr 24 at 14:18




Would that mean I'd have to WOL, login to VPN, login to Ubuntu and then click that script just to get into Windows (and vice-versa)?
– Jamesking56
Apr 24 at 14:18




1




1




Yes, exactly that. However, its even easier using grub-reboot. Let me add an answer....
– hatterman
Apr 24 at 14:27




Yes, exactly that. However, its even easier using grub-reboot. Let me add an answer....
– hatterman
Apr 24 at 14:27










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Don't think your going to be able to add login screen buttons, so here is my answer.



If you follow the answer here :



How can I get grub2 to boot a different option only on the next boot?



You should be able to set it up so that it always boots into Ubuntu by default, then from the Ubuntu command line (once logged in) you will be able to perform a 1 time reboot into Windows using ;



grub-reboot <windows entry>


So if Windows is the 3rd entry in the grub entry (starts at 0);



grub-reboot 2


Once booted into Windows, you simply reboot as normal to boot back into Ubuntu.



Repeat as needed.






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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f1027813%2fcustom-button-on-login-screen%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Don't think your going to be able to add login screen buttons, so here is my answer.



    If you follow the answer here :



    How can I get grub2 to boot a different option only on the next boot?



    You should be able to set it up so that it always boots into Ubuntu by default, then from the Ubuntu command line (once logged in) you will be able to perform a 1 time reboot into Windows using ;



    grub-reboot <windows entry>


    So if Windows is the 3rd entry in the grub entry (starts at 0);



    grub-reboot 2


    Once booted into Windows, you simply reboot as normal to boot back into Ubuntu.



    Repeat as needed.






    share|improve this answer
























      up vote
      0
      down vote













      Don't think your going to be able to add login screen buttons, so here is my answer.



      If you follow the answer here :



      How can I get grub2 to boot a different option only on the next boot?



      You should be able to set it up so that it always boots into Ubuntu by default, then from the Ubuntu command line (once logged in) you will be able to perform a 1 time reboot into Windows using ;



      grub-reboot <windows entry>


      So if Windows is the 3rd entry in the grub entry (starts at 0);



      grub-reboot 2


      Once booted into Windows, you simply reboot as normal to boot back into Ubuntu.



      Repeat as needed.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Don't think your going to be able to add login screen buttons, so here is my answer.



        If you follow the answer here :



        How can I get grub2 to boot a different option only on the next boot?



        You should be able to set it up so that it always boots into Ubuntu by default, then from the Ubuntu command line (once logged in) you will be able to perform a 1 time reboot into Windows using ;



        grub-reboot <windows entry>


        So if Windows is the 3rd entry in the grub entry (starts at 0);



        grub-reboot 2


        Once booted into Windows, you simply reboot as normal to boot back into Ubuntu.



        Repeat as needed.






        share|improve this answer












        Don't think your going to be able to add login screen buttons, so here is my answer.



        If you follow the answer here :



        How can I get grub2 to boot a different option only on the next boot?



        You should be able to set it up so that it always boots into Ubuntu by default, then from the Ubuntu command line (once logged in) you will be able to perform a 1 time reboot into Windows using ;



        grub-reboot <windows entry>


        So if Windows is the 3rd entry in the grub entry (starts at 0);



        grub-reboot 2


        Once booted into Windows, you simply reboot as normal to boot back into Ubuntu.



        Repeat as needed.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 24 at 14:35









        hatterman

        1,340925




        1,340925



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027813%2fcustom-button-on-login-screen%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

            Running the scala interactive shell from the command line

            Do not install recommended packages of dependencies