I'd like to open a bunch of windows on a server/servers from a script using ssh. The point is to run a tool several times (often a quite high number of times) with different parameters, but I'm substituting xeyes for that tool below. I have keys set up to log on transparently onto the server, so I tried:
However, whenever I run this, I only get a subset of instances of xeyes, anywhere between 1 and (never quite) 10. For all the missing windows, I get an error message:
Therre also seems to be issues with authentication but I don't understand what exactly because I also get a bunch of
Although I've tried to read up, I don't quite understand what .Xauthority is supposed to do, but I removed (well, renamed .Xauthority.bak) the file in question on the server and tried again, but the errors still occur.
Can someone explain/help/point me to better documentation than I found?
I must admit that I feel like looking for a needle in a haystack when I google the problem because I come up with tons of pages explaining how to set your DISPLAY variable and such, but that doesn't seem to be the problem here, since 1) "ssh -X" should take care of that for me 2) some of the windows are opening.
Again, using X over ssh in general works, just not when I try to start many windows on the server from within a loop. Starting them all by hand with repeated
works fine.
In case this is relevant, I am using Xquartz 2.6.1 on a Mac to connect to a Linux (Ubuntu) box.
The .Xauthority file is generated by the xauth program, and ensures that only authorized machines/users may use your display.
My first guess would be that it's a problem with concurrency, creating race conditions on the .Xauthority file, and maybe even on the sockets for the X11 connection. Try adding a short sleep (1 second should be enough) after each started SSH connection.
When I tried this, I got the same results as you.
(I don't need -X or -l because of my configuration.)
But this works, at least for me. ---------- Post updated at 07:07 AM ---------- Previous update was at 07:05 AM ----------
pludi! You beat me by mere seconds.
This User Gave Thanks to KenJackson For This Post:
Hi team,
I have a script in different folder. Now i want to call that script and execute that script from that path alone.
My code is
#!/bin/bash
wname=yahoo
PATH='/opt/IBM'
wac=`/usr/bin/ls $PATH | /usr/bin/grep "$wname"`
STOP=`/usr/bin/find $PATH/$wac -type f -name "stop.sh"`... (8 Replies)
Hello,
Ubuntu server 11.10
can anybody help what is problem with my shell script?
#!/bin/bash
#script to find out currently logged on user is root or not.
if ]
then
echo "You are super"
else
echo "You are awesome!"
fi
When I run script, I get following output
./uid: line 3:
I... (4 Replies)
Hi ,
I have moduled my scripts in three scripts .
From First script i am calling second and from second i am calling third for some check .
Problem is with the third script call.
---In second script
EXP ='test.\abc.\Server.*abc.xml.*'
pid=$($HOME/bin/checkpid $EXP)
--Third... (2 Replies)
Hi all,
I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion.
My problem is sometimes the program takes... (5 Replies)
Hi everyone,
I got a problem with a script. What it's supposed to do is:
to take as arguments a directory name <dir> and a dimension (in byte) <dim>;
if <dir> exists, to write name and dimension of every regular file within it that sizes lesser than <dim> in regFileList.
Nothing happens... (10 Replies)
Hello All. I have a script that is suppossed to start up a daemon but when executed, simply hangs. Could you please take a look and let me know where the problem might be? TIA
###################################################################
#
# SCRIPT: dstart3000.sh
# Bring up the Domain... (6 Replies)
hi,,
i have perl scipt with line :
system('./try.sh $t $d $m');
in shell scipt try.sh i have the line:
echo $1
its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Hi
Please help me with the following problem with my script.
The following block of code is not repeating in the while loop and exiting after searching for first message.
input_file
==========
host001-01
host001-02
2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
hey guys. i have a bunch of programs in a script that needs to run as root and the rest as another user, we'll call him gabriel.
now, in this script, i want to run the first few lines as root. now, how do i, after running as root, tell the script to run the remaining lines as the user gabriel?... (3 Replies)
Please Help! :o
I have a main script (ksh) where another script is called (convert_picture). Normally this works ok, but since some changes has been made on the unix-server (I dont know what :( ) suddenly it doesnt work anymore: i get an error message: ksh: convert_picture not found. I am... (3 Replies)