You are not logged in.
Hello,
Some of my full screen apps are starting on the wrong monitor. I need to disable it first.
I want to disable the monitor automatically, so I need something like this:
xrandr --output DVI-I-0 --off
run_programm
xrandr --output DVI-I-0 --right-of DVI-D-0But I want to do
"xrandr --output DVI-I-0 --right-of DVI-D-0"
when "run_programm" is finished.
as a programmer I would do something like:
xrandr --output DVI-I-0 --off
while(run_programm){
}
xrandr --output DVI-I-0 --right-of DVI-D-0Is something like that possible or is there a better way to disable the monitor while the programm is running?
Offline
Something like this?
xrandr --output DVI-I-0 --off
run_command
while pidof run_command; do sleep 1; done
xrandr --output DVI-I-0 --right-of DVI-D-0Last edited by emeres (2014-08-01 16:46:59)
Offline
I really don't understand why your first example wouldn't work, unless run_programm forks itself to background.
anyway, this should work too:
xrandr --output DVI-I-0 --off
run_programm & pid=$!
wait $pid
xrandr --output DVI-I-0 --right-of DVI-D-0Offline
I really don't understand why your first example wouldn't work, unless run_programm forks itself to background.
anyway, this should work too:
yea, you are right. Thanks for that advice, it worked the normal way, I just forgott the --auto command.
"xrandr --output DVI-I-0 --auto --right-of DVI-D-0"
anyway, both of your solutions are working for me thanks!
Offline