This document pertains to the NeXTSTEP operating system, which is no longer a supported product of Apple Computer. This information is provided only as a convenience to our customers who have not yet upgraded their systems, and may not apply to OPENSTEP, WebObjects, or any other product of Apple Enterprise Software. Some questions in this Q&A document may not apply to version 3.3 or to any given specific version of NeXTSTEP.
Q: When I attempt to print an Edit file from a shell, my output consists of several very long lines (i.e., it does not word wrap).
A: Edit does not save return characters in its files, but uses the word wrap capability of the AppKit's Text object to resize the lines to fit the window. You can use the UNIX command fmt to break the file into shorter lines.
% fmt filename | lpr
Also, the enscript command will convert text files to PostScript format for printing.
See the man pages for fmt and enscript for more information.
Q: How can I tell how much WindowServer memory my application is using? Some Application Kit programs can use a significant number of windows and bitmaps, and the memory used in these cases isn't easy to trace.
A: Use ProcessMonitor.app located in /NextDeveloper/Apps. This application allows you to measure and analyze your application's memory usage. In particular, the Display Postscript Inspector shows the amount of backing store and virtual memory used by your Application. A monitor panel displays this information in graphical form. For further information please refer to the documentation in /NextLibrary/Documentation/NextDev/DevTools/09_ProcessMonitor/ProcessMonitor.rtfd (for Release 3) or /NextLibrary/Documentation/NextDev/DevTools/04_DevApps/ProcessMonitor.rtfd (for Release 2).
Q: How can a NEXTSTEP application run windows on the WindowServer of a remote host?
A: Someone must be logged on to the host you would like the windows to appear on (the "target" host). The user that is logged on must have Public Window Server access on. This gives permission for a remote host to establish a connection to its WindowServer. Public Window Server access is set through the Preferences application. From a remote host, you can then launch an application and specify that the windows should appear on the target machine like this:
In this case, Webster launches on the remote host and the windows show up on TargetHost. "TargetHost" must be the hostname; you cannot substitute an ip address.
It's not possible to use NXHost from a machine running Release 3 to a machine running an earlier release. However you can run an application on a Release 2 machine and have its windows display on a Release 3 machine. (In addition, you cannot use NXHost from a Release 1 machine to a Release 2 system, or vice versa.)
Q: How can I get my mouse pointer to stop jumping around, and to glide smoothly across the screen?
A: Type the following command into a shell window:
% dwrite NeXT1 MouseScaling "string"
Where "string" contains a single value indicating the number of integer pairs to follow, followed by the actual pairs. The integer pairs are (speed, acceleration) pairs. These integer pairs make the mouse movement on the screen dependent both on the distance the mouse was moved on the pad, and its acceleration and speed. When you change the mouse speed through the Preferences application, it creates one of these. Here's the format of a MouseScaling argument:
To give the mouse a smoother motion across the screen, you must make the mouse movement linear (uniform, but slow). This dwrite will do the trick:
% dwrite NeXT1 MouseScaling "1 1 1"
This means that if you move the mouse x amount on the pad, it moves it by kx pixels on the screen regardless of how long it took. (k is the constant which translates the mouse pad coordinate system to the screen coordinate system.)
Warning: we cannot guarantee the support of dwrites in future releases, so do not put this in your application or rely on it in any way.
Valid for 2.0, 3.0, 3.1
Q: Why won't the entry on the last line of of my /etc/crontab or /etc/crontab.local file not execute? I'm certain the syntax is correct (I can execute the same command from a shell).
A: You've probably used the Edit program to add the last line of crontab or crontab.local. The cron program is very sensitive to the format of these files. If there is not a newline character following the last line, cron will not execute the last line. The solution is to edit the file by placing the cursor after the last character and pressing the Return key. Note that vi does not exhibit this behavior (it automatically places a newline in the correct place).
Q:When I try to run /usr/bin/calendar with an argument, it returns the following error:
/tmp/calendar: syntax error at line 1: `^' unexpected
What's going on?
A:There is a bug in /usr/bin/calendar which causes the command calendar - to fail. calendar - is normally run via the cron utility; it examines each user's ~/calendar file for things that will happen the next day, in order to send that user a reminder. calendar can be fixed with the following patch.
Line 20 of the file /usr/bin/calendar needs to be changed from: