LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-18-2005, 03:35 AM   #1
malo_umoran
Member
 
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Rep: Reputation: 32
reading local VT (tty1) over SSH


hi all,

I have a (maybe strange) question, which is hard to describe in a subject.

I have a remote server which can be accessed over ssh. I was yesterday sitting in the front of this server and started a application to do its job over night. this was on VT1 (tty1).

this application has a Ncurses interface and <RETURN> has to be pressed a few times to confirm some questions. my problem is that I am not any more sitting in the front of this server and I can only access it over ssh. The application I started yesterday is waiting for me to press <RETURN>, but I am not able to do this remote ...

or, am I? is it possible to show the screen of the tty1 over SSH, and to continue the work which I yesterday started, but now from the remote machine?

if yes, how? it's pretty urgent, so I would appreciate any help.

Thanks a lot

M.
 
Old 11-18-2005, 05:12 AM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
not realy, not without special apps running under the app. _One of those would be Screen. IF you had started screen, and then started the app, you now could get back to it from anywhere. But since it wasnt started inside Screen, theres little you can do.
It is possible to interact with the VC devices directly, but its very limited, and I havnt figured out how to actually interact with it. One can echo text into a VC, but it doesnt get fed to the app in it, but just displayed.

If its possible for you, just kill the app, start screen, and then start the application. Then you can continue it from anywhere, anytime.
Code:
man screen
is worth a read, and googling will probably yield more userfriendly instructions. if youre not already familiar with screen.
 
Old 11-18-2005, 06:43 AM   #3
ledow
Member
 
Registered: Apr 2005
Location: UK
Distribution: Slackware 13.0
Posts: 241

Rep: Reputation: 34
Agreed

Yep, this is your best bet. I try to never run anything without screen unless I am absolutely sure that I won't need to check it / interact with it.

I use the following wrapper script, do_offline.sh:

#!/bin/sh
if [ -z $1 ]
then
echo "First arg is screen name, rest is command to run"
fi
if [ ! -z $1 ]
then
echo "Running commands under screen name $1"
screen -A -m -d -S $*
fi

You run it as, for example:

do_offline.sh massive_download wget http://www.google.com/

The first argument is just the name of the screen so that you can come back to it at a later date, everything that follows is the program and arguments to run.

When you do that, it'll run it in the background for you. You can then rejoin it with:

screen -R massive_download

Once inside you can press Ctrl-A and then D to detach from it (i.e. leave it running but not on your screen).
 
Old 11-18-2005, 03:40 PM   #4
malo_umoran
Member
 
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Original Poster
Rep: Reputation: 32
I usually use screen, but I forgot it yesterday. still thanks for the help and for the nice script ledow. usefull.

M.
 
  


Reply



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
Using SSH to login to a local pc??? tuxuser19 Debian 1 11-06-2005 02:28 AM
can login to ssh via local network, but not outside brainlesspinkey Linux - Security 3 08-27-2005 04:12 PM
Printing to a local printer via SSH provo1234 Linux - Networking 1 12-20-2004 01:22 PM
Accessing tty1 from ssh. dlublink Mandriva 2 10-07-2004 10:28 PM
How do i SSH to a local box? Nemeliza Linux - Newbie 1 05-09-2004 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:25 PM.

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
Open Source Consulting | Domain Registration