Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
49
rated 0 times [  49] [ 0]  / answers: 1 / hits: 134833  / 2 Years ago, sun, november 6, 2022, 1:51:03

On the odd occasion, usually after incorrectly restarting my computer, my login screen resolution is not the default 1440x900, but I think 1600x900. Now, I have this monitor that's really bad at handling resolutions it's not designed to handle, and will show a silly "wrong resolution" box jumping around the screen.



Is there any way to make the login screen load a 1440x900 resolution no matter what? I'm running Ubuntu 11.10 with Unity and LightDM.


More From » lightdm

 Answers
4

You can make a script for this (source LightDM Resolution).




  1. Firstly we need to find out what your monitors identifier is. Open up a terminal, start typing terminal in your unity dash to see the option or press Ctrl+Alt+T

  2. Type/copy this command to show your display details:



    xrandr -q


    If you only have one monitor you will see a line in the output like the following (probably with some different values, its the identifier at the start we are after):



    DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm


    The screen identifier is DVI-0 in this case


  3. Open up your favourite text editor, lets use gedit for this example, press Alt+F2 and type gedit


  4. Type/copy this in:



    #!/bin/sh
    xrandr --output DVI-0 --primary --mode 1440x900


    Save this on your desktop as lightdmxrandr.sh


  5. You may want to test the script before we put it into practice. Back in the terminal navigate to where we just saved it:



    cd ~/Desktop


    Now we need to make it executable:



    chmod a+rx lightdmxrandr.sh


    Now run it:



    ./lightdmxrandr.sh


    (If your screen automatically auto-corrects after log in you probably won't see a difference so you may want to use a test resolution that is different but you know works while testing)


  6. Now lets move the little script we made:



    sudo mv ~/Desktop/lightdmxrandr.sh /usr/share/.


    If you don't use sudo you may get a permission error (I use this folder out of personal preference)


  7. We need to now run this in lightdm, navigate to the correct folder:



    cd /etc/lightdm

  8. Open up the lightdm conf file:



    sudo gedit lightdm.conf

  9. Now add the the instruction to run your script after the last line and save:



    display-setup-script=/usr/share/lightdmxrandr.sh



Now reboot and that should set the correct resolution on your lightdm log in screen.



(these instructions might look long but they don't take long at all)


[#42437] Tuesday, November 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
freezidepu

Total Points: 394
Total Questions: 105
Total Answers: 118

Location: Libya
Member since Mon, Dec 7, 2020
3 Years ago
;