Ashoo's Ubuntu Blog!

Ubuntu and Open Source updates and my views!

LightDM is the new login screen introduced in Ubuntu 12.04 in the place of good old GDM. You can tweak it little bit (Changing logo, wallpaper) using Ubuntu Tweak tool. However, there is no option to change the resolution of it to the desired value using any GUI tool. If you are having custom xorg.conf fiile, the LightDM screeen resolution will be set to the resolution you have chosen for desktop. If not, you might have ended with different screen resolutions for desktop and LightDM login screen.

lightdm-login-ubuntu

Changing the LightDM screen resolution in 12.04 involves little bit terminal work. It’s not that difficult job if you follow the below steps properly.

In order to change LightDM screen resolution in 12.04, first we need to know the supported resolutions and the screen output type.

Open up a terminal: (Start typing “terminal” in your unity dash to see the option or press ctrl+alt+t whichever you are comfortable with)

Type or Copy and paste the below command into terminal to show your display details:

xrandr -q

If you only have one monitor you will see a line in the output like the below line. Don’t be horrified, we only need screen resolutions and the type from this output.

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 which we need apart from the supported resolutions.

If you have multiple monitors there will be another 2 sections, both will have “connected” as the word following the identifier. You can tell which is which by their positioning, in the above example the 1680×1050+0+0 suggests:

width:1680px
height:1050px
x: 0 (distance from top left corner horizontally)
y: 0 (distance from top left corner vertically)

using the x and y values you should be able to identify which monitor is which – that is if the resolution doesn’t already give it away. As I have mentioned earlier, we need only screen identifier which is DVI-0 and your desired supported resolution from the above steps.

Now, the actual work begins:

1. Open up your favorite text editor, I prefer gedit for this example, press alt+f2 and type ”gedit”
2. Type or copy the below in it (You need to replace screen identifier which is “DVI-0” in this case and “1680×1050? which is my desired resolution)

 #!/bin/sh xrandr --output DVI-0 --primary --mode 1680x1050 

3. Save this on your desktop as ”lightdmxrandr.sh”
If you want to verify the functionality of this script, you can test this script before you 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)

Now, back to the steps to set the LightDM resolution

4. We should move the script from desktop to somewhere more appropriate:

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)
5. We need to now run this in lightdm, navigate to LightDM conf folder:

cd /etc/lightdm

6. Open up the LightDM conf file:

sudo gedit lightdm.conf

7. Now add the line below after the last line and save – this instructs LightDM to use the resolution script we just made:

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

Now, restart LightDM and the correct resolution should be set on your LightDM login screen.

Categories: Ubuntu

About admin

Mangalore, India.

6 Responses so far.

  1. vith says:

    Nice tip. Just one issue: there’s a missing line return in the script. Something like this works:

    #!/bin/sh
    xrandr –output default –primary –mode 1440×900

    Hopefully these comments support HTML markup.

  2. […] employing xrandr to create, register and activate the modeline in question like here and here, here and then integrate the script with the display manager startup code for gdm or lightdm […]

  3. Paul says:

    Thanks, that works a treat. I had spotted the newline after #!/bin/sh and as an old crt user I also put in –rate 75
    I put the script directly in /etc/lightdm – don’t know if that will have any drawbacks later?
    So now my login screen is beautiful, other users also default to the right size & refresh on login but I find my own login is still arriving at 60 Hz 🙁

  4. Satya Sasmal says:

    Hi,

    While trying to change the screen resolution in Ubuntu 12.04 on my asus eee pc 1015cx, I received the following error:

    asus@asus-1015CX:~$ xrandr -q
    xrandr: Failed to get size of gamma for output default
    Screen 0: minimum 800 x 600, current 800 x 600, maximum 800 x 600
    default connected 800×600+0+0 0mm x 0mm
    800×600 61.0*
    asus@asus-1015CX:~$

    Please help to change the screen resolution to 1024×768

    regards,
    Satya

  5. admin says:

    Satya, it would be better if you seek the advise of other users in Ubuuntu forums for help. In order to resolve this issue, you may need to provide details of your video card.

  6. gijsh says:

    Always got some error/warning screen from my monitor(1440×900) about too high refreshing frequencies, disguising important parts of the screen, so I had to type blindly my password.
    Your solution worked very well, many thanks!


Sorry! But, I hate Spam. So, please! * Time limit is exhausted. Please reload CAPTCHA.


  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Popular Posts

Installing Wine 1.5

Wine is a Windows application layer which lets you run ...

How to change LightD

LightDM is the new login screen introduced in Ubuntu 12.04 ...

Komodo Edit a native

If you are a developer and missing native power editor ...

Internet-illiterate

Disclaimer: The views are against government policies and should not ...

Government of India

Indian Union Ministry of Human Resources Development, today officially unveiled ...

%d bloggers like this: