X

Two Terminal tips: Running rc; Screenshot formats

Two Terminal tips: Running rc; Screenshot formats

CNET staff
2 min read
Running rc Mike Bombich would have occasional problems with network connections being dropped in OS X. He tried killing and relaunching NetInfo and lookupd processes, but this did not help. Restarting solved the problem, at least until the next time it happened, but was a time-consuming pain. Then he discovered a time-saving alternative:
  1. Launch Terminal.
  2. Type: <sudo sh /etc/rc>, entering your password when requested.

This runs the rc program, which (as noted here) runs the main startup functions. When we did this, the Mac OS X startup logo actually appeared on the screen! However, all of our open applications and processes remained open and functional. When it completed, all seemed fine. Definitely worth a try. You can always revert to a restart if problems occur. If not, you just saved yourself a hassle.

Update: Mike later discovered that there were duplicate copies of several administrator processes running as a result of this pseudo-restart. He noticed no ill effects of this, and neither did we. However, it is still probably safer to restart for real. Try this at your own risk.

Les Fister suggests instead to simply set up a new Location with different network settings and switch to it - and back again. "That seems to restart your network settings and get things going again."

Screenshot formats Kevin Fyure alerted us to this page, which notes: When you use Command-Shift-3 (or -4) to take a screenshot, the file is saved as a TIFF document. However, it turns out that TIFF is simply the default choice out of 4 possible choices: TIFF, JPEG, PNG, or PICT. To switch to one of the other choices:

  1. Launch Terminal.
  2. Type <defaults write NSGlobalDomain AppleScreenShotFormat ImageFormat> where ImageFormat is one of the 4 graphic formats (presumably something other than TIFF).
  3. Logout and log back in.

The next time you take a screenshot, it should use the new format.

Update: OrangePref lets you do this via a System Preference pane (thanks, Jim McCarty).