Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!agate!mindseye!izumi From: izumi@mindseye.berkeley.edu (Izumi Ohzawa) Newsgroups: comp.sys.next Subject: Re: Disabling cmd-q in Terminal Message-ID: <1991Jun3.010603.20918@agate.berkeley.edu> Date: 3 Jun 91 01:06:03 GMT References: <1991Jun2.235028.21517@parc.xerox.com> Sender: root@agate.berkeley.edu (Charlie Root) Organization: University of California, Berkeley Lines: 47 In article <1991Jun2.235028.21517@parc.xerox.com> Lovstrand@EuroPARC.Xerox.COM (Lennart Lovstrand) writes: > >So... Anyone know how to disable cmd-q in Terminal -- preferrably, but >not necessarily, without patching the app? Wouldn't mind getting rid >of cmd-w at the same time. At second best (and for possible future >releases), a way of persuading Terminal to ask for confirmation before >closing a window with a live shell would be a real win. > >OS 2.1, /NextApps/Terminal dated 30 Oct 1990 > OK, this is relatively easy. Using InterfaceBuilder, you can do this kind of modifications quite easily. This will patch the app (One of the nib files in __NIB Mach-O segment). Make a working copy of /NextApps/Terminal in a directory. Then, segedit Terminal -extract __NIB Terminal.nib Terminal.nib You will get Terminal.nib in your directory. Double click on Terminal.nib. IB will start up. On the Terminal's menu in IB, double click on the 'q' letter in the "Quit" menu item. A square will surround the letter 'q', so use Delete key to wipe out the letter. Do the same for "Window" "Close" menu's letter 'w'. Save the nib file (Command-s). Then do, segedit Terminal -replace __NIB Terminal.nib Terminal.nib -o Terminal.new chmod 4755 Terminal.new Double click on Terminal.new and see if you have successfully removed the command equivalents for 'q', and 'w'. As root, copy over Terminal.new into /NextApps/Terminal. Or you probably should copy it to /LocalApps and delete the orginal just to indicate that this is a modified version. Izumi Ohzawa [ $@Bg_78^=;(J ] USMail: University of California, 360 Minor Hall, Berkeley, CA 94720 Telephone: (415) 642-6440 Fax: (415) 642-3323 Internet: izumi@violet.berkeley.edu NeXTmail: izumi@pinoko.berkeley.edu