LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-03-2004, 02:03 PM   #1
davidcrawley
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora 1, RH 9, Debian
Posts: 12

Rep: Reputation: 0
Thorny remote execution question


OK I am trying to run a script on a remote machine. This script will open various X windows and process data all of which has to be done on the **remote** machine. In effect I want the script to behave as if a local user on the remote machine is typing the commands in. My network is locked down so I can't use rsh. I use the command

ssh -x myusername@remotehost /scriptname

when I run the script. The script runs but when the script gets to the point where it attempts to start up my X-windows data processing-program (which I have figured out how to automatically do what I want) I get

Xlib: connection to "unix:0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: unix:0


I have tried inserting in to the script the following variations

DISPLAY=:0.0
or
DISPLAY=explicitremotehostname:0.0

but to no avail. How do I get these to put up a display on the remote host? In effect how do I get the script to behave as if it is being run by a local user on remotehost.

Thanks

DC
 
Old 09-03-2004, 02:10 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try running "xhost +localhost" as the user who started the X server.
 
Old 09-03-2004, 02:19 PM   #3
davidcrawley
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora 1, RH 9, Debian
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for that. I tried that already as a local user on remotehost I still get the same errors.

Interestingly when I ssh in to remotehost from localhost and type

xhost +localhost

or even

xhost +remotehost

I get the following error

xhost: unable to open display ""

I have no idea why that is.
 
Old 09-03-2004, 03:32 PM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You have to do it as the console user since that user currently "owns" the display. You might try using Xvfb or VNC as an alternate display site, especially if you don't need to see the graphics display.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Remote Execution issinho Linux - Networking 5 07-08-2005 02:11 PM
rcmd for remote execution shivaligupta Linux - Networking 3 06-10-2005 07:19 AM
remote desktop question. NL-Stitch Linux - Newbie 2 08-01-2004 01:33 PM
Remote Desktop Question varky Linux - Newbie 2 05-19-2004 01:27 AM
Remote Command Execution via mobile phone Sammy2ooo Linux - Software 6 06-27-2003 04:42 AM


All times are GMT -5. The time now is 12:13 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration