LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-19-2003, 02:13 PM   #1
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Rep: Reputation: 15
Question starting an xserver remotely by script ??


Is there a way to start an xserver remotely by a script? I have several displays connect to nodes that I would like to start simultaneously. But I cannot seem to start them unless I ssh through a console and then start them from the commandline.

for example,

HEADNODE> ssh node1
NODE1> xinit &

This would work fine. However,

HEADNODE> ssh node1 xinit
xinit: Command not found.
HEADNODE>

As you can see, this doesn't work. I would like to have a script that will start several dozen nodes at the same time. Thanks for any advice.

jd
 
Old 09-21-2003, 03:00 PM   #2
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Original Poster
Rep: Reputation: 15
So it looks like a stumped the linuxquestions.org panel. Do I win a t-shirt?
 
Old 09-22-2003, 12:14 AM   #3
shawnchin
LQ Newbie
 
Registered: Sep 2003
Location: Malaysia
Distribution: Redhat, Gentoo
Posts: 18

Rep: Reputation: 0
well, if you can do it thru an SSH console, you should be able to do the same thing thru a one-liner SSH.

if you previously did this and it worked:
Quote:
HEADNODE> ssh node1
NODE1> xinit &
then this should work too:
Quote:
HEADNODE> ssh node1 "xinit &"
If you get the error "xinit: Command not found.", it would mean that your PATH was not imported properly since u did not execute it thru a login shell. In that case, you can try using the full path, such as:
Quote:
HEADNODE> ssh node1 "/usr/X11R6/bin/xinit &"


Also, when executing a remote script that you want to leave in the background even when disconnected, you might want to check out the nohup command.


Cheers.
 
Old 09-22-2003, 02:06 AM   #4
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks!

BTW, you have a beautiful country. I spent some time in Kota Kinabalu in '99.

Cheers.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting X remotely Intacto Linux - Newbie 4 11-28-2005 11:36 PM
starting X application remotely spidy_123 Linux - Networking 2 10-19-2005 06:45 AM
xserver not starting locke105 Slackware 4 03-25-2005 07:56 AM
Xserver not starting meenalborkar Red Hat 5 03-04-2005 08:25 PM
XServer not starting. velan Red Hat 1 05-10-2004 07:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:30 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
Open Source Consulting | Domain Registration