Register
It is currently Tue Nov 25, 2014 10:05 pm

Using ssh in a script to start a graphical app on a server


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Wed May 06, 2009 2:25 am   

Joined: Wed May 06, 2009 2:03 am
Posts: 1
I want to write a script that will read in a list of parameters and run a graphical program with each set of parameters on our compute servers.
I can read in the list of parameters all right, but I can't manage to pass it to the program on the servers that's supposed to do something with it. Sometimes it works, sometimes it doesn't, which is very frustrating to debug. Here's a minimal example (one a many variants I tried):
Code:
#!/bin/bash

let i=1
while test $i -le 10
do
   ssh -Y cluster-$i xeyes -fg blue &
   let i=$i+1
done

In general, about 1 to 3 xeyes windows get launched, never all ten. "xeyes -fg blue" just stands for the app I want to start and its varying parameters. I tried all sorts of variants of the syntax and also thought of checking the return value of the app and only moving a set of parameters of the list if it was ok, but I couldn't get anything to work. Can anybody help? The error messages I get are pasted below, and I'm using Apple's X11 to connect to Fedora machines, in case that's relevant.

Warning: No xauth data; using fake authentication data for X11 forwarding.
Warning: No xauth data; using fake authentication data for X11 forwarding.
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
Warning: No xauth data; using fake authentication data for X11 forwarding.
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth: error in locking authority file /home/myself/.Xauthority
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X11 connection rejected because of wrong authentication.
X connection to localhost:16.0 broken (explicit kill or server shutdown).
X11 connection rejected because of wrong authentication.
X connection to localhost:11.0 broken (explicit kill or server shutdown).
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).


Top
 Profile  
 PostPosted: Fri Jul 24, 2009 4:27 am   

Joined: Fri Jul 24, 2009 4:02 am
Posts: 2
try putting a little delay between the ssh calls? something like
sleep 0.5 or sleep 1


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], TurnitinBot [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP