You are not logged in.

#1 2013-05-23 05:55:45

Haru Atari
Member
Registered: 2013-05-23
Posts: 1

Xrandr. Problem with background on dual monitors system.

Good morning.
Excuse me for my grammar. English isn't my first language and i know him nery bad.

I have a computer with two monitors and ATI video card (HD6xxx). I installed arch + xorg + xmonad on him.

In ~/.xinitrc i wrote:

exec xrandr --output DVI-0 --mode 1920x1080 --output DVI-1 --mode 1920x1080 --right-of DVI-0 &
exec xmonad

This worked correctly, and i wanted to set background image (by xloadimage). I downloaded image (3840x1080) to /home/haru/pictures/bg.jpg and inserted next code into ~/.xinitrc file between "exec xrandr" and "exec xmonad":

exec xloadimage -onroot -fullscreen /home/haru/pictures/bg.jpg &

It work, but there is left half of image in both monitors. If i run xloadimage in xterm after xmonag loading, it work correctly: different pieces of of image on monitors.
I think, that xrandr doesn't have time to "create" second monitor. At first xloadimage set background image on first monitor (There is place only for half of image). And when xrandr "creating" second monitor, he copy background from first monitor to second.

Please help me to configure system. May be i must insert pause before "exec xloadimage"? If i insert

pause 2 &

between "exec xrandr" and "exec xloadimage", it doesn't work.

This is my .xinirc file:

exec xrandr --output DVI-0 --mode 1920x1080 --output DVI-1 --mode 1920x1080 --right-of DVI-0 &
pause 2 &
exec xloadimage -onroot -fullscreen /home/haru/pictures/bg.jpg &
exec xmonad

Thanks in advance.

Offline

#2 2013-05-29 19:13:43

techwiz
Member
Registered: 2012-01-26
Posts: 48

Re: Xrandr. Problem with background on dual monitors system.

I think you want to look into Xinerama for spanned desktop. I'm pretty sure xrandr creates a new display so the image is replicated.

Offline

#3 2013-05-29 19:19:11

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: Xrandr. Problem with background on dual monitors system.

Instead of using .xinitrc to set up xrandr, use xorg.conf:

Section "Monitor"
  Identifier "DVI-0"
  Option "Primary" "true"
EndSection

Section "Monitor"
  Identifier "DVI-1"
  Option "RightOf" "DVI-0"
EndSection

@techwiz: Xinerama is a baaaaaaaaad idea. And it's actually the opposite of what you said - xinerama is separate displays stitched together, xrandr is one big display (merged framebuffer).

Offline

Board footer

Powered by FluxBB