LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-22-2008, 04:54 PM   #1
everyday
LQ Newbie
 
Registered: May 2006
Posts: 8

Rep: Reputation: 0
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!!
 
Old 07-22-2008, 05:04 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
Old 07-22-2008, 05:12 PM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,778
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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.
 
Old 07-23-2008, 12:01 AM   #4
everyday
LQ Newbie
 
Registered: May 2006
Posts: 8

Original Poster
Rep: Reputation: 0
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!
 
Old 07-23-2008, 04:08 AM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
  


Reply

Tags
ssh


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 to keep program running after closing ssh session fakie_flip Linux - Software 10 11-03-2011 08:33 AM
HELP!! running program to ssh bad_jaye Linux - Newbie 4 02-25-2008 07:23 PM
Running Program Through SSH windisch Linux - General 6 10-04-2005 06:10 AM
Keeping a program running between SSH sessions ark86 Linux - Newbie 2 10-01-2005 03:31 PM
Running a program in the background - SSH ziggo0 Linux - Newbie 4 03-05-2005 01:30 PM


All times are GMT -5. The time now is 04:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration