jacobson@gamma.eecs.nwu.edu (Dan Jacobson) (04/13/89)
Using the "screen" program from Oliver Lauman at login I just reconnect to yesterday's shells, emacs, etc. instead of waiting around for my lengthy .tcshrc and .login to finish. I can even reconnect at home (need the same terminal type though). -- Dan Jacobson, jacobson@eecs.nwu.edu, {oddjob,gargoyle,att,...}!nucsrl!jacobson
spolsky-joel@CS.YALE.EDU (Joel Spolsky) (04/14/89)
In article <606@accuvax.nwu.edu.NWU.EDU> jacobson@eecs.nwu.edu (Dan Jacobson) writes: > >Using the "screen" program from Oliver Lauman at login I just >reconnect to yesterday's shells, emacs, etc. instead of waiting around >for my lengthy .tcshrc and .login to finish. I can even reconnect at >home (need the same terminal type though). Huh? cool! could you explain the procedure for this, please? +----------------+----------------------------------------------------------+ | Joel Spolsky | bitnet: spolsky@yalecs.bitnet uucp: ...!yale!spolsky | | | internet: spolsky@cs.yale.edu voicenet: 203-436-1483 | +----------------+----------------------------------------------------------+ #include <disclaimer.h>
jacobson@gamma.eecs.nwu.edu (Dan Jacobson) (04/15/89)
A person wanted to know how one jumps into yesterday's shell instead of waiting to build a fresh shell: My .tcshrc file is in disrepair (off maintenance), as the thrill of being a computer nurd is wearing thin ... but essentially what I do there (I think ... hope) is: if (! $?HAVELOGGEDIN) setenv PATH .... #for rsh, your favorite path if (! $?prompt) exit # not interactive shell #"exit" exits only this script in (t)csh language if (! $?HAVELOGGEDIN) then biff y screen -r && exit #if successful then leave minimal login shell #underneath endif [then I go on to build the usual environment, e.g. key bindings] [can set shell variables here] [...] if ($?HAVELOGGEDIN) exit setenv HAVELOGGEDIN [can set environment variables here] screen (no .login file) I should add that the csh language is not my favorite and I wait for a final release of bash (Bourne Again shell). Where to get "screen": Screen was posted to comp.sources.unix a while back, otherwise please contact its author (below). Here's part of the man page. You need BSD style sockets I believe to run it. SCREEN(1) UNIX Programmer's Manual SCREEN(1) NAME screen - screen manager with VT100/ANSI terminal emulation SYNOPSIS screen [ -a ] [ -f ] [ -n ] [ -exy ] [ cmdargs] screen -r [ host.tty] DESCRIPTION screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). When screen is called, it creates a single window with a shell; the pathname of the shell is taken from the environ- ment symbol $SHELL; if this is not defined, "/bin/sh" is used. New windows can be created at any time by calling screen from within a previously created window. The program to be started in a newly created window and optional argu- ments to the program can be supplied when screen is invoked. For instance, screen csh will create a window with a C-Shell and switch to that win- dow. When the process associated with the currently displayed window terminates (e.g. ^D has been typed to a shell), screen switches to the previously displayed window; when no more windows are left, screen exits. When "/etc/utmp" is writable by screen, an appropriate record is written to this file for each window and removed when the window is terminated. The -r option is used to resume a screen session that has been detached from the terminal by means of the "detach" command key (see below). This mechanism allows a user to disconnect screen together with all currently active windows from the terminal and resume it at a later point in time, e.g. at a later login session, and possibly on a different terminal. The type of terminal on which a detached screen is resumed must of course be compatible to the type of ter- minal on which screen has originally been invoked. When more than one detached screen exist, the -r option displays a list of host.tty pairs identifying the detached screens. In this case an additional host.tty argument can be given to resume a specific screen session. [gobs deleted] C-a d or C-a C-d Detach screen (disconnect it from the terminal and put it into the background). A detached screen can be resumed by invoking screen with the -r option. [gobs deleted] AUTHOR Oliver Laumann (net@tub.bitnet) -- Dan Jacobson, jacobson@eecs.nwu.edu, {oddjob,gargoyle,att,...}!nucsrl!jacobson