LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using the Std Out on a remote computer through SSH (https://www.linuxquestions.org/questions/linux-newbie-8/using-the-std-out-on-a-remote-computer-through-ssh-832631/)

richman1234 09-16-2010 01:21 PM

using the Std Out on a remote computer through SSH
 
I have written a program on a remote computer that I want to execute through an SSH connection and have that program draw on its own screen.

The program works. I can run it from that computers terminal and it runs with no errors and draws on the screen. However, if I ssh into that computer from a remote computer and then run the program, I get errors. I am assuming the errors are because it can't draw on my remote terminal through the ssh connection.

So, how do I get the program on the remote computer to draw on it's own screen when executed through a remote connection.

suprstar 09-16-2010 01:37 PM

What do you mean, exactly, by 'drawing on the screen'? If you ssh in, you're in a CLI - not any kind of GUI environment. If you have an x environment running on your remote PC where you're ssh'ing from, you can open windows thru the ssh tunnel if you have your DISPLAY environment variable set correctly AND you're allowed to.

man xhost

for more info about setting up the access.

Or are you opening an ssh tunnel more along the lines of a vpn? I have no idea what you're really asking ...

richman1234 09-16-2010 03:26 PM

Let me be a little more descriptive.

Computer A:
Main computer running FC12.

Computer B:
on this computer resides a program written in C using the SDL lib.
The program does some simple graphics rendering. Basically just draws a Bit Map over the whole screen.

Ex.1
On computer B I open a terminal and run the program.
root@over:#./SDL_Program
And the program runs great.


Ex.2
I use a terminal on Computer A to SSH into Computer B, and run the SDL program.
Fedora-dev:$ssh root@192.168.1.2
root@over:/# ./SDL_Program
Doing it this way I get errors.

I think the program running on computer B is trying to draw the bitmap on computer A, and getting errors. I need to launch the SDL program residing on computer B from computer A and have it draw on computer B.

any ideas?

Thanks,
Rich

alan99 09-17-2010 03:18 AM

I think it should work. I have a game program on my other computer (I think it was written with SDL). I can run it over ssh, but can't really play it as graphics slow down at lot when it is tunneled through X11 on ssh. (Especially if you are using wireless like me). Check /etc/ssh/sshd_config and see whether you have X11 forwarding enabled.

shpenat 09-17-2010 08:24 AM

Can you explain, why you want to do such thing? Having program showing their output somewhere else than where you are running them seems like bad idea to me.

For clarification: OP does not want to see the output of hos program on the computer he is using as ssh client, but rather to be displayed on the host screen. I have no idea whether it is easily doable. As Linux is multi user system, the display on that computer might be used by someone else at that time and you would be effectively highjacking his display.

richman1234 09-17-2010 12:31 PM

This is an "embedded" system, and I will be controlling it through a remote connection. Because it is embedded and the only control I have is through an ssh connection, I need to be able to stop and launch programs from my remote computer. However, when I launch my program, from the ssh connection, that outputs to the embedded systems display, it crashes.

Ex. User is looking at my prototype "embedded system", which has no user inputs, and I want to show different UIs or different programs, I need to be able to launch these from my computer.

That is the why...does anyone have a how?

thanks,
Rich

alan99 09-18-2010 01:41 PM

I misunderstood the OP purpose. I think that having a remote user access the display/framebuffer would be a security threat and I am not sure that would be advised or allowed.


All times are GMT -5. The time now is 03:43 PM.