ForestMacStuff

From New IAC Wiki
Revision as of 18:45, 20 October 2016 by Foretony (talk | contribs) (→‎Mac OS X 10.7)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

Mac OS X 11 (El Capitain)

HomeBrew Package Installer

GEMC recommends using "brew" as the package install for Mac now

http://brew.sh


Install mysql

brew install mysql


Mac OS X 10.7

Install Xcode 4

port nor fink will work until Xcode is installed.

Search for it in the App store and download the free version

ports and fink work from different directories and can coexist

Install command line tools for Lion

https://developer.apple.com/downloads/index.action#


Installed Java Developer package

install ports

http://www.macports.org/

get the installer.

install Fink

after installing Xcode and the command line tools you can do

/sw/bin/fink selfupdate-rsync

then update all packages with

/sw/bin/fink update-all


Install ROOT

cmake ~/src/ROOT/v5-34-03/build

MaC OS X 10.5.8

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/


Download command line tools (choose "Preferences" from within the Xcode application, then select the "Downloads" icon and you will see the "Command Line Tools" listed in the components list).

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

Installing Feynman drawing package

Package is on CTAN

http://www.ctan.org/tex-archive/macros/latex/contrib/feynmf/


Downloaded the above zip file

go to subdirectory created from zip unpacking an run

latex feynmf.ins

This creates style sheest and metafont input files

Move the files to the correct locations for your LaTeX installation

mine were in

/opt/local/share/texmf-dist/tex/latex

/opt/local/share/texmf-dist/metafont


/opt/local/share/texmf-dist/metapost


cp ~tforest/Documents/feynmf/feynmp.sty /opt/local/share/texmf-dist/tex/latex/feynmf/
cp ~tforest/Documents/feynmf/feynmf.sty /opt/local/share/texmf-dist/tex/latex/feynmf/
cp ~tforest/Documents/feynmf/feynmf.mp /opt/local/share/texmf-dist/metapost/feynmf/
cp ~tforest/Documents/feynmf/feynmf.mf /opt/local/share/texmf-dist/metafont/feynmf/
You need to tell TeX about the new files by running texhash
texhash

Additional reference

http://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/feynmp.html

gerbv

port install gerbv

GEANT4

Installing geant 4.9.2 p01

Get CLHEP 2.0.4.2

http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/

after downloading to a good place "be sure to set the prefix path to where you want to find the CLHEP libraries"

tar -zxvf clhep-2.0.4.2.tgz 
cd 2.0.4.2/CLHEP
./configure  --prefix=/users/tforest/src/GEANT4/CLHEP/2.0.4.2/
make

The above prefix will put the CLHEP libraries under the subdirectory /users/tforest/src/GEANT4/CLHEP/2.0.4.2/

the source code is under the subdirectory /users/tforest/src/GEANT4/CLHEP/2.0.4.2/CLHEP

when asked in the GEANT4 configure script below for the CLHEP_BASE_DIR subdirectory youwill enter /users/tforest/src/GEANT4/CLHEP/2.0.4.2/

unpack data libraries

create a "data" subdirectory under your geant4 directory and untar all the data "tar files

tar -xvf G4NDL.3.13.tar
tar -xvf G4EMLOW.6.2.tar
tar -xvf G4RadioactiveDecay.3.2.tar 
tar -xvf G4ABLA.3.0.tar
tar -xvf PhotonEvaporation2.0.tar

Configure -build (without visualization)

download the geatn 4 distribtuion and untar it

then enter the directory and type

./Configure -build

Lets first build the distribution without any graphics to be sure the bare bones are working

then type

./Configure install

to create the env.csh file which will set up your environmental variables

enter "csh"

compile exampleN01 to check that things are working

[tony-forests-macbook-pro:examples/novice/N01] tforest% cd /Users/tforest/src/GEANT4/geant4.9.2.p01/examples/novice/N01

[tony-forests-macbook-pro:examples/novice/N01] tforest% make
Making dependency for file exampleN01.cc ...
Making dependency for file src/ExN01PrimaryGeneratorAction.cc ...
Making dependency for file src/ExN01PhysicsList.cc ...
Making dependency for file src/ExN01DetectorConstruction.cc ...
Compiling ExN01DetectorConstruction.cc ...
Compiling ExN01PhysicsList.cc ...
Compiling ExN01PrimaryGeneratorAction.cc ...
Creating shared library /Users/tforest/geant4/tmp/Darwin-g++/exampleN01/libexampleN01.dylib ...
Creating/replacing object files in /Users/tforest/geant4/tmp/Darwin-g++/exampleN01/libexampleN01.a ...
ar: creating archive /Users/tforest/geant4/tmp/Darwin-g++/exampleN01/libexampleN01.a
Compiling exampleN01.cc ...
Using global libraries ...
Linking exampleN01 ...
... Done!


Configure -build (with visualization)

[tony-forests-macbook-pro:~/src/GEANT4/geant4.9.2.p01] tforest% ./Configure -build
 
 
 
                --- Geant4 Toolkit Build  ---
 
 
 
 
 
Would you like to see the instructions? [n] 

Definition of G4SYSTEM variable is Darwin-g++.
That stands for:

1) OS           : Darwin

2) Compiler     : g++

To modify default settings, select number above (e.g. 2) 
[Press [Enter] for default settings] 

There exists a config.sh file. Shall I use it to set the defaults? [y] 
Fetching default answers from your old config.sh file...
 
I can set things up so that your shell scripts and binaries are more portable,
at what may be a noticable cost in performance.  In particular, if you
ask to be portable, the following happens:

     1) Shell scripts will rely on the PATH variable rather than using
        the paths derived above.
     2) ~username interpretations will be done at run time rather than
        by Configure.

Do you expect to run these scripts and binaries on multiple machines? [n] 

Where is Geant4 source installed? 
[/Users/tforest/src/GEANT4/geant4.9.2.p01] 

Specify the path where Geant4 libraries and source files should be
installed. 
[/Users/tforest/src/GEANT4/geant4.9.2.p01] 

Do you want to copy all Geant4 headers 
in one directory? [y] 
 
Specify the path where are the Geant4 data libraries 

PhotonEvaporation2.0 RadioactiveDecay3.2 G4EMLOW6.2 G4NDL3.13 G4ABLA3.0 

are installed. For now, a flat directory structure is assumed, and this can 
be customized at the next step if needed.
[/Users/tforest/src/GEANT4/geant4.9.2.p01/data] 
checking for PhotonEvaporation2.0... yes
checking for RadioactiveDecay3.2... yes
checking for G4EMLOW6.2... yes
checking for G4NDL3.13... yes
checking for G4ABLA3.0... yes

Please, specify where CLHEP is installed. It was found in:

CLHEP_BASE_DIR:                 /Users/tforest/src/GEANT4/CLHEP/2.0.4.2/ 
[/Users/tforest/src/GEANT4/CLHEP/2.0.4.2/] 

You can customize paths and library name of you CLHEP installation:

1) CLHEP_INCLUDE_DIR:           /Users/tforest/src/GEANT4/CLHEP/2.0.4.2//include
2) CLHEP_LIB_DIR:               /Users/tforest/src/GEANT4/CLHEP/2.0.4.2//lib
3) CLHEP_LIB:                   CLHEP
To modify default settings, select number above (e.g. 2)
[Press [Enter] for default settings] 
 

By default 'static' (.a) libraries are built.

Do you want to build 'shared' (.so) libraries?
[y] 

You selected to build 'shared' (.so) libraries. 
Do you want to build 'static' (.a) libraries too?
[n] 
 

Do you want to build 'global' compound libraries? [n] 
 
Do you want to compile libraries in DEBUG mode (-g)? [y] 

  G4UI_NONE

If this variable is set, no UI sessions nor any UI libraries are built. 
This can be useful when running a pure batch job or in a user framework 
having its own UI system.
Do you want to set this variable ?
[y] 

  G4VIS_NONE

If this variable is set, no visualization drivers will be built or used.
Do you want to set this variable ?
[n] 

  G4VIS_BUILD_OPENGLX_DRIVER
  G4VIS_USE_OPENGLX

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries is
required.
[y] 

  G4VIS_BUILD_OPENGLXM_DRIVER
  G4VIS_USE_OPENGLXM

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries and 
the Motif Xm extension is required.
[n] 

Fink

Fink is a Unix software package program which will install unix programs on the Mac in the /sw root directory instead of /usr or /bin.

Installing Fink

http://www.finkproject.org/

You need to download an Image file for a binary installation

self update

On 12/6/12 I attempted do update Fink using the command

/sw/bin/fink selfupdate-rsync

Fink should be installing everything under "/sw" and not bother "macports" which is using /local.

I then did the following

Run "/sw/lib/fink/postinstall.pl" in a terminal--this will redirect Fink to the correct distribution for your OS version.

Run "/sw/bin/fink scanpackages" in the terminal (Source->scanpackages for Fink Commander users).

Run "sudo /sw/bin/apt-get update" in the terminal (Binary->update).

(The above two commands get rid of binary-distribution related errors.)

Run "/sw/bin/fink selfupdate" in the terminal (Source->selfupdate).

Run "/sw/bin/fink update-all" in the terminal window (Source->update-all).

GEANT3

Fink will recompile and install GEANT 3 using the command

/sw/bin/fink install cernlib2005

Installing GEMC using Fink

The new location of the GEMC software is

https://gemc.jlab.org/gemc/

Use csh for the installation

Below is the old link

http://clasweb.jlab.org/wiki/index.php/Mac_OS_X_gemc_installation_with_Fink

Install errors

Qt install error

/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:50: error: expected unqualified-id before '[' token /System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:50: error: abstract declarator '_CALayerTransaction*' used as declaration /System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:50: error: expected ';' before '[' token


make[2]: *** [release-install] Error 2 make[1]: *** [sub-WebKit-qt-QtWebKit-pro-install_subtargets-ordered] Error 2 make: *** [sub-webkit-install_subtargets-ordered] Error 2

> Copying include and src in /sw/GEMC/Darwin_macosx10.5-i386-gcc4.0.1/qt/4.8.4 

done


Qt4 related error while installing GEANT4

CMake Error at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
  QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_INCLUDE_DIR
  QT_QTCORE_LIBRARY QT_QTGUI_INCLUDE_DIR QT_QTGUI_LIBRARY
  QT_QTOPENGL_INCLUDE_DIR QT_QTOPENGL_LIBRARY QT_UIC_EXECUTABLE)
Call Stack (most recent call first):
  /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /opt/local/share/cmake-2.8/Modules/FindQt4.cmake:1173 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/Modules/Geant4InterfaceOptions.cmake:86 (find_package)
  CMakeLists.txt:84 (include)

ROOT

V5.34.01

had to switch off asimage

./configure macox --disable-asimage


Go Back


Virtual Box

https://www.virtualbox.org