[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using screen's su command to attach to somebody else's lost session

From: Wayne Ivory
Subject: Using screen's su command to attach to somebody else's lost session
Date: Mon, 18 Sep 2006 15:48:48 +0800

The company I work for uses a proprietary ERP system that the users connect to using a telnet client (Appgen).  We also have forklift operators driving around using radio links via another telnet application.  The ERP system uses a somewhat antiquated architecture and gets very sad about locked records if a user terminates a session either by dropping out of the radio link or just getting impatient because a report is taking too long and doing End-Task.  address@hidden  In both cases a session can be left “attached” (theoretically speaking) but not in a manner that we can do anything about.


I’m investigating the use of screen to alleviate some of these problems (or at least alleviate the consequences).

  1. I modified a forklift driver’s .profile to do a screen –list and look for the word “Attached”.  If it is found then it does a screen –x to attached to the dropped session, otherwise it runs screen and invokes the ERP system.  This works ideally!  Now thinking ahead, it’s possible that a forklift driver may go to lunch or even go home whilst he has a dropped session, so I would like his supervisor to be able to do the attach so I started checking out the add* commands.  At the very least I’d like we IT people to be able to attach by logging in as root so I did this and tried invoking screen’s (not unix’s) su command.  It prompted me for the user name and unix password and then prompted me for the screen password.  I tried leaving it blank, entering the word none, entering the same password as the unix password, but in all cases screen replied with Sorry.  How can root attach to a general user’s session?
  2. As a variation on the theme of the above case, when the forklift driver goes to lunch he may not log out.  When he comes back if he is assigned to a different forklift that is not logged in then he will log in and his .profile as it stands will detect the “Attached” session and attach to it, but of course this will go multi-user on the live connection so when another driver jumps on the original forklift the two drivers will be fighting for control of the one session.  How can I tell if an “Attached” session is the result of a dropped radio link or if it is live?




Wayne Ivory

Senior Analyst Programmer

Electronic Business Development

Wespine Industries Pty Ltd


reply via email to

[Prev in Thread] Current Thread [Next in Thread]