I'm sure there are a few ways to solve this problem, but here is the method I am currently using. Essentially, you will be creating a script and editing your lightdm.conf file.
First, read this page:
http://pycage.blogspot.com/2008/03/lapt ... dr-to.html
With my setup, the output of
showed my laptop screen as LVSD1. Here is the script, edited from the page above to correspond to my laptop screen, LVDS1.
Code: Select all
#!/bin/bash
xrandr -q | grep "^VGA.* connected" >/dev/null
RC=$?
if [ $RC = 0 ]; then
xrandr --output LVDS1 --off
fi
What I believe the code above is doing is checking whether or not your VGA external monitor is connected. If so, it will shut off your laptop screen and direct the output to your external monitor. If the external monitor isn't connected, the output will show on your laptop screen.
So, open your text editor, copy and paste that code into it -- changing the line
to correspond to your laptop screen (yours may be LVDS0, LVDS1 etc.)
Save the file as monitors.sh (or whatever you want). Place the file somewhere in your home directory (mine is in ~/scripts). Next, open your terminal and cd into the directory where you placed your script and fix the permissions of the file:
While stil in your terminal, enter:
Code: Select all
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old
Next, you will need to open lightdm.conf as root with your text editor:
Code: Select all
gksu leafpad /etc/lightdm/lightdm.conf
With lightdm.conf opened as root, enter this line somewhere under [SeatDefaults]:
Code: Select all
display-setup-script=/home/name/scripts/monitors.sh
What that line does is tells lightdm to exectue that script BEFORE the login screen appears. So, before your login screen appears, your laptop screen will shut off, the signal will be output to your external monitor, and the login screen will appear fullscreen on your external monitor.
For reference, here is my lightdm.conf:
Code: Select all
[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu
display-setup-script=/home/name/scripts/monitors.sh
allow-guest=false
greeter-hide-users=true
Next, save the file and restart your computer. If for some reason your computer hangs, showing a blinking cursor, restart your computer again (if that happens, something is wrong with the script) After you select Ubuntu on the grub menu and the computer is booting up, press Ctrl + Alt + F1. Doing this should take you to a command prompt. Once there, you may have to enter your usersname/password. Next, type:
Code: Select all
sudo cp /etc/lightdm/lightdm.conf.old /etc/lightdm/lightdm.conf
Hit enter and reboot.
What that will do is essentially restore your lightdm file, allowing you to boot normally.
Sorry for the messy post. Hopefully you will be able to read through it and solve your problem.