SUMMARY NO 2 : get back those windows lost from screen, but still running ...

From: Eric Boucher (eric@bcomeau.hydro.qc.ca)
Date: Tue Aug 01 1995 - 04:50:21 CDT


Yo Netters, Sunners et compagnie ...

How many of you remember my first posting about this subject ? It was sometime
around last may 20th...

No matter.

After posting a summary saying that I did not received any answers/suggestions
about my problem, I suddenly received a lot of advices and answers ! Suggests
that there are a lot of readers out there who read mostly the SUMMARYes ...

Well, for the sake of this list, here is a true SUMMARY :

My original posting :
--------------------------------------------------------------------------------
Here's my little problem :

For the last two days, I composed a mail in a compose window on a X terminal
(doing cut & paste with a couple other windows I was writing scripts in), and
yesterday night, the Ethernet connection went down between my X terminal and my
Sun. Today, I came back in my office and saw that my windows on my X terminal
have disappeared, but the jobs are still running on my server. The Ethernet
connection came back this morning, but the X Terminal was hung, so I rebooted
it.

Question : is there a way to resume those idle jobs that are still running on
my Sun server ? It is a 670MP with Solaris 2.3.

I will summarize.
--------------------------------------------------------------------------------

My first SUMMARY :
--------------------------------------------------------------------------------
My local Unix guru (yves@bcomeau.hydro.qc.ca) said that it was almost impossible to get back those lost windows, because it involved something like getting back the X session or connection number, along with other parameters such as the window's positions, then starting an X server and a window manager with those parameters (and probably others!). Maybe I am off the track, but that is what I understood.

So I killed the jobs on the server.

Sigh !

Thanx anyway
--------------------------------------------------------------------------------

Today's SUMMARY (the true one :) ) :
--------------------------------------------------------------------------------

Anatoly.Lisovsky@kamaz.kazan.su (Anatoly M. Lisovsky)
suggested that I should summit my postings with carriage returns at the end of
each line in the message so to not have lines over 80 cars long. This way, I
would get more readers, because those who read their mail with a reader that
does not do word wrap see only a very long line instead of a paragraph.

Well, see my summary today ?

woodsp@smtplink.Indigo.co.il (Paul) said :
I wonder if causing a core dump of the process that you were typing in would
recover the text for you. Crude, very crude but better than nothing I guess.

were the terminals running editors? you might have been able to find temporay
files in /tmp.

All I can think of at the moment.

Btw, if the scripts contained anything other than ACSII text, a core file would
be even harder to get anything from.

If I were an X wizard, I might be able to come up with something better, but I
am not so this is it.

Jimi Xenidis <jimix@resunix.ri.sickkids.on.ca> said :
I am sorry I did not notice you message earlier.

In the future consider that mailtool and many other mailing and editing
programs will save or auto save a copy of the file it is working on in
the /tmp, /usr/tmp, and/or /var/tmp.

If it does not autosave then it will save to these directories in a panic
situation. A panic situation will not occur if you use kill -9 <pid>,
but if you kill -TERM <pid> it normally will create a dump file (usually
called <app_name>.pid or <usr_name>.pid), it may even still be their.

Some, but not many X-Window applications will reinitiate the X
connections given the HUP signal ie kill -HUP <pid>.

If it is really an emergency you can cause the process to core dump.
there are many ways to do this, you can use dbx, or send the kill -BUS
<pid> signall. you can now, theoretically and tediously, extract the
textfile using strings.

I cannot guarantee the above information in all cases, but I have used
the first option many times.

mshon@sunrock.East.Sun.COM (Michael J. Shon {*Prof Services} Sun Rochester)
said :
You got no replies because no one has a reasonable solution.
It really is pretty much as hopeless as your Guru says.
No one likes to send bad news, so they wait to see if someone smarter
sends you a some good news.
Sorry...

And finally, a shiny one :
From: Pell Emanuelsson <pell@lysator.liu.se>
Hi Eric,

There is a nice piece of software which sounds like it would be very
useful to you. It's called xmove (I think the current archive file is
xmove.1.2b.tar.gz) and it enables you to move your windows around between
different machines. It has the added advantage that if your X-server
machine crashes, you can resume working with all your windows on another
machine, or on the same machine after it's restarted.

It works by creating a "pseudo X-server" and you must set your DISPLAY
variable to point to this "server". Then you tell this program on which
"real" X-server to display. You can then change this dynamically even
while the X client is running. There's of course a problem if the
machine on which xmove is running crashes, but in the case of an
X-terminal and a compute server, you would usually run xmove on the same
machine on which the client software is running, so it won't be a problem.

Of course, xmove doesn't help if you have started the clients with
DISPLAY set to your real X-server. It will not be possible to
resume connection to those clients after your X-terminal has rebooted.

Conclusion : I'll get xmove !

babaye all ...

--
,-------------------------------------------------,---------------------------.
| Eric Boucher, analyste, Hydro Quebec, 135 Boul. | eric@bcomeau.hydro.qc.ca  |
| Comeau T:100, Baie-Comeau, Qc, Canada, G4Z 2H8  | 418-294-3521 294-3307 fax |
`-------------------------------------------------'---------------------------'



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:30 CDT