You are not logged in.
Is it possible to have a script executed when I connect/disconnect my external monitor to my laptop (using a VGA cable)? I want to automatically execute xrandr to enable the external monitor and disable my laptop screen as soon as the cable is plugged in, and the other way around when it's unplugged. I can do it manually using the hotkey, but I'm just wondering wether this is possible as well.
Offline
Latest xrandr has support from this (I've heard). Means you're out of luck if you're an nvidia user. Don't know whether the support has actually be implemented in the Intel driver (more likely) or radeon (less likely).
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
@ ngoonee
How about nouveau?
Offline
@ ngoonee
How about nouveau?
No idea, never got it to work well on my machine. This would be driver specific, the support (or otherwise) for xrandr's latest (probably 1.3).
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Is it possible to have a script executed when I connect/disconnect my external monitor to my laptop (using a VGA cable)? I want to automatically execute xrandr to enable the external monitor and disable my laptop screen as soon as the cable is plugged in, and the other way around when it's unplugged. I can do it manually using the hotkey, but I'm just wondering wether this is possible as well.
On a EEEpc I have:
CRT=`xrandr | grep "VGA1 connected"`
if [ "x${CRT}x" != "xx" ]; then
xrandr --output LVDS1 --off --output VGA1 --mode 1680x1050 --pos 0x0 --rotate normal
fi
This has to be calibrated to the particular case, the value is not necessarily 'VGA1'.
And it will probably not work with the proprietary nvidia drivers.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
Are there any solutions for nvidia users?
Offline
Bad idea unless you have tons of checks and fallbacks, otherwise you may get into a state where you end up with no image everywhere
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Are there any solutions for nvidia users?
Not particularly; at least, not one that I've found.
However, I think a combination of disper (in the AUR) and assigning it to some keyboard shortcut(s) is a perfectly suitable alternative for most uses.
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
Also auto-disper-git for reloading saved configs. There's no way I've found to automatically run the script though, I just bind it to a keyboard shortcut.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline