Re: xrandr w/ laptop and ext monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 02 December 2009 05:42:28 Joseph L. Casale wrote:
> Is it possible to create the default whereby the builtin LVD is then turned
>  off if the external LVD or VGA is connected? This would accomplish what I
>  need equally well.

This little script does exactly that, for me:

#! /bin/bash
if
xrandr | grep "VGA1 connected";
then
xrandr --output VGA1 --auto --output LVDS1 --off ;
fi
exit

Put it somewhere to run automatically upon login (I have it in KDE's Autostart 
configuration), and you're done. However, if you connect VGA after login, you 
need to execute the script manually. If something doesn't work, look at the 
output of "xrandr" in the terminal, maybe your devices have different names.

And of course, you need to do

xrandr --output LVDS1 --auto --output VGA1 --off

before you disconnect VGA, if you don't plan to reboot the machine.

HTH, :-)
Marko

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux