[SOLVED] How to make screen resolution change permanent?

Forum Forums New users New Users and General Questions [SOLVED] How to make screen resolution change permanent?

  • This topic has 3 replies, 3 voices, and was last updated May 11-3:03 pm by greyowl.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9868
    Member
    bobbiecb

      My default screen resolution under VirtualBox is 800×600.

      I changed it to 1024 by the line command — xrandr -x 1024×768

      Anyone know how to make this permanent across sessions?

      (I tried putting the xrandr command in /etc/rc.local and /etc/init.d but neither worked).

      • This topic was modified 5 years ago by bobbiecb.
      #9869
      Member
      rob
        Helpful
        Up
        0
        ::

        To get the resolution change to happen automatically after you log in, edit the file ~/.desktop_session/startup
        (This is per-user, so if you have more than one login that you use, you will need to make then change in each user’s ~/.desktop_session/startup file).

        Add the following two lines (Strictly only need the xrandr line, but best to add a comment as well) anywhere after the line #!/bin/bash:

        # Set resolution size after session login
        xrandr -s 1024×768

        #9874
        Member
        bobbiecb
          Helpful
          Up
          0
          ::

          Thanks for your reply.

          Last night I created a new script I put in init.d, consisting of the single line xrandr -s 1024×768
          Then I updated the executable scripts by update-rc.d MY_SCRIPT defaults

          It worked fine. But I’ll change it to your way, as it places the script in a much better more obvious location.

          Thank you.

          #10199
          Member
          greyowl
            Helpful
            Up
            0
            ::

            This is very helpful information which I might need in the future.
            Thank you.

            Dell Latitude D620 laptop with antiX 22 (64 bit)

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.