T.R | Title | User | Personal Name | Date | Lines |
---|
2545.1 | DCL code to find SM PID | NITMOI::PESENTI | Only messages can be dragged | Fri Mar 30 1990 09:22 | 28 |
| Here is some DCL code that works for me:
$ sm_image = "DECW$SESSION"
$ ! The file name of the Session Manager Image.
$ pid_context = ""
$ ! Initialize the pid context pointer
$ get_sm_pid: ! Find Session Manager Process
$ pid = f$pid(pid_context)
$ ! Try next pid.
$ if pid .eqs. "" then goto done
$ ! If all processes have been checked, we are done.
$ image_file = f$parse(f$getjpi(pid,"imagname"),,,"name","syntax_only")
$ ! Get the file name of the image the process is running.
$ if image_file .nes. sm_image then goto get_sm_pid
$ ! If it is not the session manager, try the next process.
$ write sys$output "Session Manager PID: ''pid'"
$ ! Tell the world.
$ done:
$ exit
|
2545.2 | | PSW::WINALSKI | Careful with that VAX, Eugene | Fri Mar 30 1990 15:56 | 8 |
| .0 is asking about the session manager *window* ID, not *process* ID.
Take a look at TLE::ULNK$:[WINALSKI.XAQUARIUM]SMPAUSEWINDOW.C. This module
contains routines for walking the window tree and locating the session manager's
pause window. In the process, it has to find the session manager's main
window as well.
--PSW
|
2545.3 | | HKOVC::TERENCE | From Middlesex, UWO | Mon Apr 02 1990 06:02 | 8 |
| Re: -2
I know how to use XQueryTree() to find both the root window and the
pause window. But among all the childs that are returned by
XQueryTree(), how can I tell which one is the Session Manager Window?
Does it has any special characteristics?
-Terry
|
2545.4 | Try these... | GSRC::WEST | Variables don't, Constants aren't | Mon Apr 02 1990 12:36 | 11 |
|
For XUI (DECwindows V2.0)...
Resource Class --> Decw$Session
Resource Name --> Session Manager
Search for these strings on each window you find...it will be the window
you are interested in.
-=> Jim <=-
|
2545.5 | How about under ultrix? | RTL::PELLEGRINO | Bob Pellegrino | Tue Apr 03 1990 18:11 | 7 |
| Has anyone come up with a reliable scheme for finding the Pause window on
a Pmax server? I asked this question once before, and the reply at the time
was that there was something different needed for a Pmax that was being
worked on. Is this something I should figure out, or has someone already done
it?
--bob
|
2545.6 | Hope this helps...a little :^) | GSRC::WEST | Variables don't, Constants aren't | Tue Apr 03 1990 22:38 | 27 |
|
Well here is the steps I did when first looking for the Pause Window.
Wrote a program similar to xlswins to dump out every window with its
geometry. Xlswins will work, I just didn't know about it at the time.
Started unmapping/mapping every window that had a large enough size to
be a pause window until I found the right one. Then just did XQueryTree
to get the heirarchy and came up with the algorithm from there.
The whole process took less than a half an hour. I don't have access
to a PMAX but this method should still work.
Note: Not sure if Session Manager on PMAX does the same as VMS does
but with the knowledge of the fact that the pause window does
not yet exist until the first time PAUSE is used, you could get
a list of all the windows before the *first* pause and then
a list of windows after the pause and see what new windows
appear on your list.
I realize that this is probably not the answer you want but if no one
has done this yet and you want to "find the pause window" the above steps
will help you.
-=> Jim <=-
|
2545.7 | | PSW::WINALSKI | Careful with that VAX, Eugene | Wed Apr 04 1990 18:43 | 6 |
| TLE::ULNK$:[WINALSKI.XAQUARIUM]SMPAUSEWINDOW.C can find the session manager's
pause window on either VMS or Ultrix. There is a timing window problem in this
code during session startup on the PMAX. I have a correction for it but I
haven't had time to update the code yet.
--PSW
|