Skip to content

Instantly share code, notes, and snippets.

@cdarne
Created January 2, 2013 20:35
Show Gist options
  • Save cdarne/4437733 to your computer and use it in GitHub Desktop.
Save cdarne/4437733 to your computer and use it in GitHub Desktop.
Automaticaly use the external display on boot for Ubuntu (12.10)
# Put in /etc/X11/Xsession.d/45custom_randr-settings
EXTERNAL_OUTPUT="VGA1"
INTERNAL_OUTPUT="LVDS1"
xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
xrandr --output $INTERNAL_OUTPUT --off --output $EXTERNAL_OUTPUT --auto
else
xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
fi
@cdarne
Copy link
Author

cdarne commented Jan 2, 2013

I use it for proper external display configuration on my EeePC for XBMCbuntu.

Full credits to vbat99 (http://forum.xbmc.org/showthread.php?tid=93249)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment