ForestMacStuff

From New IAC Wiki
Jump to navigation Jump to search

setting up wireless

shoose EDUWIFI

Key is 1CBE991A14

neet to send MAC address of card to ISU helpdesk in order to get permission to use

Enabling password requirement when waking from sleep

There is a check box under the "Security" icon within "System Preferences"

setting root password

Mac OS X 10.5 or later

  1. From the Finder's Go menu, choose Utilities.
  2. Open Directory Utility.
  3. Click the lock in the Directory Utility window.
  4. Enter an administrator account name and password, then click OK.
  5. Choose Enable Root User from the Edit menu.
  6. Enter the root password you wish to use in both the Password and Verify fields, then click OK.

Setting up printers

Choose "print" from within any application

Select "Add printer" from the pull down menu

choose "HP Jet Direct - Socket"

Enter IP address of printer

It should auto detect the printer

add a label

Unix utilities

Most of the commands below require that you either be a superuser (su) or have superuser priviledges (sudo)

Xcode

First download Xcode from apple

http://developer.apple.com/TOOLS/xcode/

MacPorts

http://www.macports.org/

installed in /opt/local/bin

do the command

port -d selfupdate

to update ports

some commands


to search for packages use
sudo port search string
to install a package you found do
sudo port install packagename

Installing older port versions

MacPorts is my preferred way of installing, managing, and upgrading much of the software I have on my Mac. I’m setting up a new work machine today and I need to install ruby 1.8.5 on my machine for Rails to be happy. Unfortunately, you can’t do something simple like specifying the version of the port you want to install unless it’s in a local repository. Fortunately, my friend Stephen Chu had this problem about a year ago and has a nice procedure on how to do it. I’m going to update it for MacPorts and ruby 1.8.5 here.

1) Find out the svn revision number of the Portfile that has 1.8.5 by looking at: http://trac.macosforge.org/projects/macports/log/trunk/dports/lang/ruby/Portfile In my case it is 21127.

2) Set up a local port repository. In the file /opt/local/etc/macports/sources.conf, add this line before the rsync line: file:///Users/Shared/dports and create that directory.

3) Install the port into your local repository. cd /Users/Shared/dports && svn co --revision 21127 http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ lang/ruby/

4) Run portindex so that ports now finds your new (old) version of ruby. portindex /Users/Shared/dports

5) Now you should be able to see ruby @1.8.5-p12 in addition to @1.8.6 by running: port list

6) Install Ruby sudo port install ruby @1.8.5-p12 You should be up and running now, so to check, run: ruby -v You will see something like this: ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.10.1]

SVN

http://subversion.tigris.org/


port install subversion

from command line type

=SVN commands

svn -help


svn info URL

svn co URL

Xmgrace

http://plasma-gate.weizmann.ac.il/Grace/


installation using macports

ports install grace

Xfig

sudo port install xfig

Tex

sudo port install teTex

gerbv

port install gerbv

GEANT4

=fork: Resource temporarily unavailable=

solution from 

http://www.macosxhints.com/article.php?story=200311151254441

I work with Terminal a lot, and often have 30 to 40 windows open, each running my shell and ssh. Add in all the other processes, and I quickly exceed the 100 maxprocperuid limit that OS X defaults to.
There have been many proposed solutions to this. You can, for instance, in your shell startup scripts override the limit for that shell instance, and you can run more than 100 processes from that shell, but when you launch a new window, the parent process that launches all apps for you in the GUI is still limited to that 100 process per user limit, and the new window will fail to launch your shell. It usually fails with the error: login: fork: Resource temporarily unavailable.

There are two phases to fixing this problem. First you must change the overall OS limits for maxproc and maxprocperuid to higher values, and then you must make WindowServer run in an environment with the limits raised. 

[robg adds: I have not tested this one, nor do I intend to! If you're going to experiment with it, I recommend you have a good backup first, just in case...]

System Wide
OS X 10.3 now supports the standard /etc/sysctl.conf. This means you can just put new values into this file and reboot. This is what the file looks like:

% cat /etc/sysctl.conf <br>
# Turn up maxproc <br>
kern.maxproc=2048 <br>

# Turn up the maxproc per user <br>
kern.maxprocperuid=512 <br>
Daemons /etc/rc.common
All of the daemons that are started via /System/Library/StartupItems are started with the default maxproxperuid of 100. This might not normally be a problem, as root may not run a ton of processes, but it does matter when sshd is started up. On OS X, sshd is started out of xinetd. A quick way to affect the environment of xinetd, and all other daemons as well, is to put ulimit -u 512 at the top of /etc/rc.common. If you preferred, you could just edit the startup script for xinetd instead, which is in /System -> Library -> StartupItems -> IPServices -> IPServices.
Here is a snippet of the top of my /etc/rc.common file:

#######################
# Configure the shell #
#######################

ulimit -u 512

##
# Be strict
##
WindowServer
Every process you run from the GUI is launched by WindowServer. So we need to make WindowServer launch in such a way that it has its limits raised. I cannot determine what actually launches WindowServer. Its parent process is mach_init, and I can find no way to modify how it is launched directly. You can, however, write a wrapper script for WindowServer. This is a shell script that is launched instead of WindowServer itself which sets the limits properly, then launches the original WindowServer as normal.
Become root on command line.

 % cd /System/Library/Frameworks/
 % cd ApplicationServices.framework/Frameworks/
 % cd CoreGraphics.framework/Resources/
robg adds: Yes, you can do that as one long cd command; I snipped it apart for narrower display width.

Type mv WindowServer WindowServer.orig

Type vi WindowServer ... below is the script I used; the last two lines should be entered as one long line with no extra spaces in it:
#!/bin/zsh
ulimit -u 384
/System/Library/Frameworks/ApplicationServices.framework/
 Frameworks/CoreGraphics.framework/Resources/WindowServer.orig $*
Type chmod a+rx WindowServer

Type reboot
How I Tested
To quickly test if my solution was working I ran a bunch of sleep0 processes in the background. This was able to reproduce the problem for me on demand before the fix. I'd open one shell window, launch over 100 sleeps, and then try to launch a new Terminal window, and it would fail. After the fix, it works.


Go Back