Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm stumped and hoping someone can provide an example or two.
I'd like to rsh (or ssh) into another machine on our network, open up an xterm displaying on my machine (and here's the tricky part), and then execute a command on the remote machine WITHOUT having to type it in the xterm, but rather somehow piping it into the rsh xterm command.
I've come this far:
rsh <remote_machine> xterm -display <my_machine>:0.0 -title TEST -geometry 72x12+0+0
This rshells into the <remote_machine>, and runs an xterm displaying on <my_machine>. However, I can't figure out how to run one or more commands ON that remote_machine so that they will display on <my_machine> on the open xterm, again WITHOUT having to manually type them into the xterm window.
I.e. How could I run a 'pwd' and 'ls' command on the remote_machine so that it would display the results on the xterm. I gather it should have something to do with piping in the 'pwd' and 'ls' to the rsh...xterm command line above, but I can't seem to find the right combination.
P.S. For now I'd be happy to just figure out the rsh method, but eventually my goal is to also do the above using passwordless ssh, but I can leave that for another day!
I've never used rsh. Ssh is a more secure replacement. You can set it up so that the keys provide the authentication without entering a password. If you want to execute a command in xterm, you could use the -e option.
ssh -X user@host xterm -e command argument(s). I don't see the benefit in running xterm. You could run "ssh user@host command argument(s)". Since you are already running in a terminal.
If you always want the same command to run, that command can be entered in the "force command" option of sshd_config.
Still looking for an answer to this question...the goal of this is to run another script which will pop open several xterm windows and run different processes in each of these windows without having to type the commands in each window. The windows are more for monitoring the status. As an overly simplified example:
From Machine_A, run script "do_something" which will:
rsh (or ssh) into Machine_B and execute process_abc
==> display process_abc running on Machine_B on xterm running on Machine_A
rsh (or ssh) into Machine_C and execute process_xyz
==> display process_xyz running on Machine_C on xterm running on Machine_A
We used to have a script here at work which did this to start up a multiprocess program running on multiple machines all displaying windows (actually dtterms on Solaris). We've since moved on to something else, the script has been lost, but I'm trying to resurrect a version of it to run on our Suse Linux boxes.