xrandr commands from gdm

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





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite












on debian to use my two monitors I have to run (from a running X):



$ xrandr --setprovideroutputsource modesetting NVIDIA-0


and:



$ xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


How can I make gdm run those commands for me so I don't have to type them every time?







share|improve this question

























    up vote
    0
    down vote

    favorite












    on debian to use my two monitors I have to run (from a running X):



    $ xrandr --setprovideroutputsource modesetting NVIDIA-0


    and:



    $ xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


    How can I make gdm run those commands for me so I don't have to type them every time?







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      on debian to use my two monitors I have to run (from a running X):



      $ xrandr --setprovideroutputsource modesetting NVIDIA-0


      and:



      $ xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


      How can I make gdm run those commands for me so I don't have to type them every time?







      share|improve this question











      on debian to use my two monitors I have to run (from a running X):



      $ xrandr --setprovideroutputsource modesetting NVIDIA-0


      and:



      $ xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


      How can I make gdm run those commands for me so I don't have to type them every time?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Aug 3 at 20:13









      Antonio Giungato

      161




      161




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          You can create a shell script and place it in ~/.config/autostart (create the directory manually if it doesn't exist) so it is executed after GDM starts.



          #!/bin/bash
          xrandr --setprovideroutputsource modesetting NVIDIA-0
          xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


          Make sure to make the shell script executable with chmod u+x.






          share|improve this answer





















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f460411%2fxrandr-commands-from-gdm%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
            1
            down vote













            You can create a shell script and place it in ~/.config/autostart (create the directory manually if it doesn't exist) so it is executed after GDM starts.



            #!/bin/bash
            xrandr --setprovideroutputsource modesetting NVIDIA-0
            xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


            Make sure to make the shell script executable with chmod u+x.






            share|improve this answer

























              up vote
              1
              down vote













              You can create a shell script and place it in ~/.config/autostart (create the directory manually if it doesn't exist) so it is executed after GDM starts.



              #!/bin/bash
              xrandr --setprovideroutputsource modesetting NVIDIA-0
              xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


              Make sure to make the shell script executable with chmod u+x.






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                You can create a shell script and place it in ~/.config/autostart (create the directory manually if it doesn't exist) so it is executed after GDM starts.



                #!/bin/bash
                xrandr --setprovideroutputsource modesetting NVIDIA-0
                xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


                Make sure to make the shell script executable with chmod u+x.






                share|improve this answer













                You can create a shell script and place it in ~/.config/autostart (create the directory manually if it doesn't exist) so it is executed after GDM starts.



                #!/bin/bash
                xrandr --setprovideroutputsource modesetting NVIDIA-0
                xrandr --output HDMI-0 --mode 1920x1080 --primary --pos 0x0 --output VGA-1-1 --mode 1920x1080 --pos 1920x0


                Make sure to make the shell script executable with chmod u+x.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Aug 3 at 20:21









                orekix

                611




                611






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460411%2fxrandr-commands-from-gdm%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Christian Cage

                    How to properly install USB display driver for Fresco Logic FL2000DX on Ubuntu?