openSuse 12.3 ssh -X in new Terminal?

Hi Guys,

I am new to Linux and after the first try (rsh and Suse 11.3) failed, I try to do it in 12.3.

The Problem:
I wanna start a script in a fixed Terminal, the Script now should make a ssh connection to antoher PC and start a script to display in another Terminal on PC 1

The old solution:
The old (abaout 8 years old) solution was like this:

rsh "host" /usr/bin/X11/xterm -display "myPC":0 -geometry 52x12 +sb -ls -fg blue -bg white -e /home/dir/script.sh

This works fine, but now its time for a newer PC and a newer Linux-Version, but the 12.3 dont have a rsh-Deamon so i found out, that i have to use ssh.

The new solution:

ssh "host" /home/dir/script.sh

And here we go, first the remotescript starts in the same window, where I use this command, second, the colors are gone :frowning:

Is there any way to fix that problems?

PS:
Both PCs have a .ssh/config file with the following line:

ForwardX11 yes

Thanks for help
Gossi

Gossi91 wrote:
> Hi Guys,
>
> I am new to Linux and after the first try (rsh and Suse 11.3) failed, I
> try to do it in 12.3.
>
> The Problem:
> I wanna start a script in a fixed Terminal, the Script now should make a
> ssh connection to antoher PC and start a script to display in another
> Terminal on PC 1
>
> The old solution:
> The old (abaout 8 years old) solution was like this:
>
> Code:
> --------------------
> rsh “host” /usr/bin/X11/xterm -display “myPC”:0 -geometry 52x12 +sb -ls -fg blue -bg white -e /home/dir/script.sh
> --------------------
>
>
> This works fine, but now its time for a newer PC and a newer
> Linux-Version, but the 12.3 dont have a rsh-Deamon so i found out, that
> i have to use ssh.
>
> The new solution:
>
> Code:
> --------------------
> ssh “host” /home/dir/script.sh
> --------------------
>
>
> And here we go, first the remotescript starts in the same window, where
> I use this command, second, the colors are gone :frowning:

If you compare your old command and your new one, your old one starts a
separate terminal and your new one doesn’t. So I’m not sure why you’re
surprised about that?

Actually it does have the packages rsh and rsh-server, but at least the latter one is not installed by default.

TAnd here we go, first the remotescript starts in the same window, where I use this command, second, the colors are gone :frowning:

Is there any way to fix that problems?

Use the “-f” option to run commands, see “man ssh”.
So something like this should work:

ssh -X "host" -f xterm -display "myPC":0 -geometry 52x12 +sb -ls -fg blue -bg white -e /home/dir/script.sh

Because the -display and /usr/bin/X11/xterm were marked as error

Ok, i can start this script without any error, but it doesnt starts a new Terminal :question:

Ok, the Error-Message apears a little bit late:

Can not open Display

That ‘-display “myPC”:0’ looks wrong, as that overrides the “-X” option to ssh. Omit that part of the argument, so that the X-forwarding can handle the display.

But then, the command will start in the same Terminal, or is there any way to handle this, only with the -X option?

PS:
Here is the full error message:

xterm Xt error: Can't open display: "myPC":0

And sorry, but i am totaly new to Linux :frowning:

PPS:
I found the error, it was the -display, when i use the following, it works fine:

ssh -X "host" -f xterm -geometry 52x12 +sb -ls -fg blue -bg white -e /home/dir/script.sh

xterm is in /usr/bin/xterm now.

Ok, i can start this script without any error, but it doesnt starts a new Terminal :question:

Ok, the Error-Message apears a little bit late:

Can not open Display

Try to leave out the host name (“myPC”) or the whole “-display” option then. ssh’s X forwarding should take care of that automatically I think.

This does work here: (at least when connecting to localhost, can’t check another host atm)

ssh -X "host" -f xterm -geometry 52x12 +sb -ls -fg blue -bg white -e /home/dir/script.sh