LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 09-16-2010, 02:21 PM   #1
richman1234
LQ Newbie
 
Registered: Mar 2010
Distribution: Fedora12 & Angstrom
Posts: 22

Rep: Reputation: 0
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.
 
Old 09-16-2010, 02:37 PM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 22
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 ...
 
Old 09-16-2010, 04:26 PM   #3
richman1234
LQ Newbie
 
Registered: Mar 2010
Distribution: Fedora12 & Angstrom
Posts: 22

Original Poster
Rep: Reputation: 0
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
 
Old 09-17-2010, 04:18 AM   #4
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
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.
 
Old 09-17-2010, 09:24 AM   #5
shpenat
Member
 
Registered: Dec 2008
Distribution: LFS
Posts: 95

Rep: Reputation: 21
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.
 
Old 09-17-2010, 01:31 PM   #6
richman1234
LQ Newbie
 
Registered: Mar 2010
Distribution: Fedora12 & Angstrom
Posts: 22

Original Poster
Rep: Reputation: 0
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
 
Old 09-18-2010, 02:41 PM   #7
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
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.
 
  


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
how do I ssh to a remote computer without password hussa1n Linux - General 9 06-29-2010 07:07 AM
play sound on remote computer through ssh? quarry_06 Linux - Software 7 01-19-2010 08:10 AM
Remote login with SSH, but display on remote computer. brodin Linux - Software 3 09-09-2007 04:01 AM
ssh onto remote computer (issues) tuxhats Linux - Networking 3 06-06-2006 11:11 AM
Playing sound on a remote computer over ssh Waldo Linux - Hardware 0 01-20-2005 08:28 AM


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