1

I currently run Ubuntu 13.04. I recently got a second screen for my computer and I have noticed because they are different resolutions (one is 4:3, one is 16:10) the login screen is duplicated and stretched. Is there anyway to disable the second screen on boot and then turn it on again after login? I would assume I would have to add a script to init.d, which I tried but it didn't seem to work.

My primary monitor (the one I want to keep on) is 16:10 and is plugged in via DVI and my secondary monitor is 4:3 and is plugged in via Display Port.

6

You could try http://cornerofattention.com/post/44651232151/ubuntu-12-10-disable-second-monitor-while-on-login . This works fine for me.

Here are steps from link above.

Find the name of the display that you are trying to shut off while the greeter is displayed.

user@ubuntu:~$ xrandr | grep connected

Create a script to disable the second monitor. I put mine in /etc/lightdm/ but it can go anywhere as long as it has sufficient permissions.

sudo nano /etc/lightdm/monitor1-off.sh

The contents of the script will be similar to

#!/bin/bash
xrandr --output HDMI1 --off

Replace HDMI1 with your display’s name and save it.

user@ubuntu:~$ sudo chmod +x /etc/lightdm/monitor1-off.sh

Edit /etc/lightdm/lightdm.conf and add the following line to the file

greeter-setup-script=/etc/lightdm/monitor1-off.sh

Save the file and restart your computer. When the greeter starts, the display you chose should shut off. On my computer the display starts again on its own as soon as I log in.

4
  • instead of providing link, try to provide the steps to follow, so that it should not be a problem if that link expires
    – VRU
    Oct 2 '13 at 15:11
  • Sorry, I'm new to askubuntu. I've just edited my answer
    – chebs
    Oct 3 '13 at 10:29
  • Sorry for the late reply, I was out of the country. I just tried the steps that you mentioned and while it does disable the second screen on the login screen (it re-enables after login just as you said) but the actual login screen still is stretched despite the lower resolution screen being off.
    – NStorm
    Oct 15 '13 at 0:04
  • This is still useful in 2021 running Ubuntu Budgie! Because Budgie uses a modified version of LightDM, adding greeter-setup-script=/etc/lightdm/secondary-monitor-off.sh to the end of the file /etc/lightdm/lightdm.conf.d/50_budgie-desktop.conf works like a charm. Thank you so much! Jan 18 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.