Opening several graphical apps via X on a remote server
Hi,
This is my first post here. I hope someone can help because I'm quite frustrated by now. I'm trying to write a bash script which will start a graphical app on our Ubuntu compute servers via X. I'm using a loop like:
for machine in 1 2 3 4 5 6
do
ssh -X computer-$machine "xeyes" &
done
On any given run, it works in, say, max 2-3 cases, but in the others, I get an error that looks like:
Error: Can't open display: localhost:10.0
Error: Can't open display: localhost:10.0
Error: Can't open display: localhost:10.0
Error: Can't open display: localhost:11.0
I can't figure out why it works in some cases but not in others.
I've tried to set the display (xeyes -display localhost:12.0 and so on) but that doesn't work at all. I don't understand what the 10.0, 11.0 and so on refer to. Can someone point me to the relevant documentation? I've tried googling but I'm not sure what man page to look up, for example.
BTW, the target machine is a Mac and I'm using Xquartz, but I can open as many instances "xeyes" on the servers as I want by hand, so I don't think that's the problem.
Thanks in advance!
|