LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2010, 02:37 PM   #1
clueless_linguist
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: Disabled
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!
 
Old 03-05-2010, 03:00 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
try "xeyes" => "export DISPLAY=:0; xeyes"
 
Old 03-05-2010, 04:05 PM   #3
clueless_linguist
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Original Poster
Rep: Reputation: Disabled
I get
Error: Can't open display: :0
for every machine when I do that.

Plus, I think you don't need to set the DISPLAY variable when you use ssh -X. (Or am I wrong?)
 
Old 03-06-2010, 01:54 AM   #4
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
Quote:
Plus, I think you don't need to set the DISPLAY variable when you use ssh -X. (Or am I wrong?)
It's depends. If you want to run the application on local X you must specify X11Forwarding=yes on servers sshd_config. Then the error about the display will not. If you want that application is run on remote X, DISPLAY must be set.

Last edited by troop; 03-06-2010 at 08:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ubuntu] Spawning graphical apps on desktop via remote shell cheeken Linux - Desktop 5 02-04-2009 05:00 AM
Perl/Php codes for deploying apps in remote web server pudhiyavan Programming 0 07-11-2007 06:31 AM
Run remote X apps on remote Xserver trollman Linux - Desktop 5 10-08-2006 09:01 PM
after doing su -, opening graphical programs in terminal won't work TheOneAndOnlySM Slackware 10 10-27-2003 05:43 PM
opening files w/ apps phantom4 Linux - Software 2 09-20-2003 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration