You are not logged in.

#1 2009-06-01 15:06:01

ymarcov
Member
Registered: 2009-06-01
Posts: 2

Toggling Monitors

Hello,

my tricky situation goes like this:

I have two monitors, both LG (not that it matters), one 19" DVI and one 37" HDMI. Both connected to the same video card.

What I want to do is run the 19" on 1280x1024 and the 37" on 1920x1080. I want one monitor to be disabled while the other is working, and I want a script that toggles between the two monitors and resolutions.

How would I go about something like this? big_smile

Offline

#2 2009-06-01 17:23:07

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: Toggling Monitors

You could try messing with xrandr, which might do what you want, resolution changing wise, but I've never heard of moving an X screen between monitors.

Offline

#3 2009-06-01 17:41:45

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Toggling Monitors

i was going to say you could just setup two X screens.  the default on vc7 then another on vc6 or something.  each with their own xorg.conf's specifying res and monitor.

you'd have to read some man pages to find the commands to do this but i'm confident it's possible.

then C-A F6/7 would be your shortcut between them. 

you would be limited though; you'd have to close and reopen apps/files when changing between monitors.  depending on your use case that might be alright, if you've always got email open on the little one and GIMP on the big one or something then this setup could actually be perfect.

Offline

#4 2009-06-01 18:28:51

keegan
Member
Registered: 2009-05-12
Posts: 54

Re: Toggling Monitors

GGLucas wrote:

You could try messing with xrandr, which might do what you want, resolution changing wise, but I've never heard of moving an X screen between monitors.

Yea, you can do this with xrandr as long as you specify the action for both screens in the command line, like VGA1 --off VGA2 --auto

Offline

#5 2009-06-02 02:41:24

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: Toggling Monitors

I realize you asked for a script, but you could also try out lxrandr, which is a really simple GUI for toggling monitors.

It's in community.

Offline

#6 2009-06-02 18:39:11

ymarcov
Member
Registered: 2009-06-01
Posts: 2

Re: Toggling Monitors

lxrandr is sweet, thanks. smile I was looking for a script to run manually, anyway, so this works. smile

Offline

#7 2009-06-02 20:06:25

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Toggling Monitors

this is what i did to do just that: quite hacky if you ask me

#!/bin/bash
. /etc/screen_switch.conf

xrandr --output ${VIDEO_OUTPUT[0]} --off --output ${VIDEO_OUTPUT[1]} --auto
echo "VIDEO_OUTPUT=( ${VIDEO_OUTPUT[1]} ${VIDEO_OUTPUT[0]} )" > /etc/screen_switch.conf

and screenswitch.conf has

VIDEO_OUTPUT=( VGA LVDS )

ive mapped the script to SUPER_L + F5

gonna check out lxrandr wink

Last edited by eldragon (2009-06-02 20:08:09)

Offline

Board footer

Powered by FluxBB