caerws@gtsn17.UUCP (R. William Steer) (10/12/90)
We want to terminate mwm, and thus the window system, from our application program. The Motif programmers guide says that the f.quit_mwm function is only available in the root context. Does this mean that we can't quit the window system from our application? Thanks for any information. Bill Steer Westinghouse
beldin@peachs.enet.dec.com (Rick Beldin) (10/13/90)
In article <9010121535.AA03346@gtsn17.>, caerws@gtsn17.UUCP (R. William Steer) writes... >only available in the root context. Does this mean that we can't quit >the window system from our application? Thanks for any information. What exactly do you mean? I kill mwm all the time in vms, and start up another one, just so I don't have to log in/log out... +-----------------------------------------------------------------------------+ | Rick Beldin email: beldin@rhett.enet.dec.com | | Digital Equipment Corporation | | VMS Workstation Support | | Alpharetta, GA | | | | "Opinions expressed are my own - definitely not those of my employer" | | | +-----------------------------------------------------------------------------+
yee@osf.org (Michael K. Yee) (10/14/90)
In article <9010121535.AA03346@gtsn17.> caerws@gtsn17.UUCP (R. William Steer) writes: | We want to terminate mwm, and thus the window system, from our application | program. The Motif programmers guide says that the f.quit_mwm function is | only available in the root context. Does this mean that we can't quit | the window system from our application? Thanks for any information. | If you want to kill Mwm from an application your application must know or find the PID of the Mwm process. If you have to kill Mmw from another application, do not use "kill -9". Mwm needs to be able to catch the kill signal and cleanup before exiting. | Bill Steer | Westinghouse =Mike -- = Michael K. Yee -- yee@osf.org or uunet!osf.org!yee -- = OSF/Motif Senior SW Engineer = "I can't give you brains, but I can give you a diploma." -- The Wizard of OZ
dce@smsc.sony.com (David Elliott) (10/16/90)
In article <9010121535.AA03346@gtsn17.>, caerws@gtsn17.UUCP (R. William Steer) writes: |> We want to terminate mwm, and thus the window system, from our application |> program. The Motif programmers guide says that the f.quit_mwm function is |> only available in the root context. Does this mean that we can't quit |> the window system from our application? Thanks for any information. First, it sounds like you are requiring mwm to be used from your application. That's OK in some cases, but you may also alienate a group of users. There exist more than one Motif-style window manager, and there may exist window managers that understand the mwm properties in the future. You shouldn't alienate these users. Secondly, you must realize that the window manager functions aren't made to be called from programs. There exist window managers that look for a property on the root window and interpret the contents of this property as a window manager command, but this isn't a general facility, and I don't think it's an mwm facility. Thirdly, you're assuming that quitting mwm will quit the window manager. There are many users that prefer to quit by exiting from a "console" window, or by using a "close" or "kill" menu item on a specific window. If you shut down the window manager and it doesn't shut down X, you could put the user into an unfamiliar or undesirable situation. If you need to kill the window manager, and you are sure that it will be mwm, you could try using ps to find the pid of the window manager and using kill to kill it. But, you should take into account that some systems server X terminals or slower workstations, and may be running multiple window managers, which means you might kill the wrong one. So, if you have control over how the window manager is started, you can save the pid of mwm in a file so you can get it back. Killing the server may not be any better. Servers have different names, some systems have multiple servers, and X terminals have no servers at all. Finally, this may not be a very nice thing to do. What happens if the user has something running in another window and loses their work as a result of your application shutting down all of their windows? I'd be very angry if an application did this to me. -- ...David Elliott ...dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce ...(408)944-4073 ..."Whoopee! I'm a human head kabob!" -- Grumpy old man