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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux