LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ssh-ing into an already running program (https://www.linuxquestions.org/questions/linux-software-2/ssh-ing-into-an-already-running-program-657527/)

everyday 07-22-2008 04:54 PM

ssh-ing into an already running program
 
Hi all,

I have been scouring the web to try and find an answer to this but as I am quite new to the ssh thing, I am not even sure I am asking the right question.

I have a debian server that is imperative that stays as low resource as possible. Hence, when it boots it goes to the console and does not startx. Actually it just sits waiting for the User and PW.

During the boot process I am going to start an app that I want to be able to ssh in to see. I am getting that going at the moment and running that the init.d way.

So my question is, can I assign an app a DISPLAY level or something that will correspond with an ssh command so I can see it remotely?

Or if anyone has any better ideas, i'm open. I just don't really want to startx or a window manager or anything like that because of need to keep resource usage low.

TIA ALOT!!

ilikejam 07-22-2008 05:04 PM

Sounds like you need the services of 'screen'.

I don't use it personally, so I can't give you a full rundown, but if you start the app as 'screen app', you can detach and re-attach to the session. The man page is pretty good.

Dave

Hangdog42 07-22-2008 05:12 PM

I'll second the idea of using screen. If you're familiar with VNC, it is sort of like that only for the console. Once you start a screen session you can do anything you want in the screen and then detach when you're done. If you log in later, you re-attach to the screen and it is exactly where you left it.

For some of the more advanced capabilities, this article describes them nicely.

everyday 07-23-2008 12:01 AM

Thanks for the replys all. I was about to do that when I discovered the redirect to text thing. So now my init process sets DISPLAY 0:0 but outputs the info to a text file which I then in turn read with the 'tail -f textfile.txt' command. Pretty simple. Man this linux stuff is good!

ilikejam 07-23-2008 04:08 AM

As a by-the-way, the DISPLAY variable only affects GUI (X11) apps, so you don't need to set it for text apps.

Dave


All times are GMT -5. The time now is 02:24 PM.