SYStems Group ( systems@cns.nyu.edu )

[ INTERNAL SYSTEMS GROUP PAGE ] / [ INTERNAL PRINTER PAGE ] / [ INTERNAL GUEST WIFI ]
[ BASIC MATLAB INFO ] / [ INSTALL MATLAB ] / [ MATLAB VERSION & SUPPORT MAP ]

September 25, 2023 : kext

Third-party kernel extensions

For ARM hardware, non-apple kernel extensions are not allowed.  This is indicated 
in system setting > privacy and security > security  by "current security settings 
prevent the installation of system extensions it means that the mac is running 
in Full Security mode and you need to switch to the Reduced Security mode 
in order to approve the kernel extension".

To modify your security mode, do the following.

  Shutdown your mac.
  Start you mac by holding down the power button until you see the 
    Options screen.
  Select  Options > continue 
  Utilities > Startup Security Utilities
  In the  security policy  screen,  choose Reduced Security and click on
    Allow user management of kernel extensions from identified developers,
    but not the second item.
  Click on Ok.
  Reboot.

Now  do system setting > privacy and security > security  and click on the lock button.  This will allow you to enable the  loading of a given kernel extension.
A restart is needed to actually load the extension.

For some screenshots, see 

https://kb.nomachine.com/AR03U01191#:~:text=If%20you%20see%20message%20%27Your,to%20approve%20the%20kernel%20extension.
  

September 20, 2023 : screensaver

Screen saver bug

On some recent macos, if you screen share in and the screen saver starts up,
you may not be able to get back to your desktop with mouse or keyboard events.
If you do not have sudo privileges to restart your machine from the command line,
you are effectively locked out of your machine remotely.

The following seems to work the few times that it has been tested.
Ssh into your account.   Killing the screensaver engine does not seem to help.
But killing the loginwindow process seems to get you back to your desktop.
This may however log you out of your current login session.  This seems
to depend on your version of macos.

To do this, use   pui loginw   to find the pid of the loginwindow process
associated with your login.   Then do   kill pid.   You don't need
special privileges to kill your own processes.

September 10, 2023 : sshfs

sshfs for all platforms [macOS, Linux, Windows]

You can use sshfs to mount remote directories for which you have ssh 
access to.  Such mounts will appear natively within your file manager.  This
is available on all platforms (macOS, Linux and Windows).  Here are the simple
install instructions: install the FUSE and sshfs packages for your platform.

******************
macOS
******************
From  osxfuse.github.io,  download and install the FUSE and sshfs
packages.  The sshfs binary is installed in  /usr/local/bin.

******************
Linux
******************
Ubuntu:
  sudo apt update && apt upgrade
  sudo apt install sshfs

Centos:
  sudo yum install fuse-sshfs

******************
Windows
******************
Install the FUSE (WinFsp) and sshfs (sshfs-win) packages.  The first link has 
the latest stable release for sshfs and WinFsp.   Install both packages.
The first link also has basic instructions for using sshfs on Windows.

  Scroll down to download the latest stable release of sshfs-win and WinFsp.


September 10, 2023 : sshfs-how

Instructions on how to use sshfs

[macOS | Linux] The basic syntax is simply
  sshfs [options] user@remotehost.cns.nyu.edu:/my/data ~/mnt/mydata

There are various options to improve performance and behavior.

[Windows]  Use Windows Explorer to map a drive.  Use the following syntax.
# Mount the remote home folder
  \sshfs\user@remotehost.cns.nyu.edu 

# Mount /my/data on the rhost.cns.nyu.edu, enter the following.
# You have to do it relative to the home folder.
  \\sshfs\user@remotehost.cns.nyu.edu\..\..\my\data

#Alternatively we could use the helper sshfs.r
  \\sshfs.r\ruser@rhost.cns.nyu.edu\my\data

September 10, 2023 : sshfs-options

Recommended sshfs mount options

The unadorned syntax is just   sshfs what-to-mount where-to-mount-it
Here is more concrete example.
  mkdir ~/mnt/user@rhost
  sshfs user@rhost:/path/to/data ~/mnt/user@rhost

For better performance, the recommended sshfs mount options are as follows.
sshfs -o cache=yes -o kernel_cache -o compression=no -o Cipher=arcfour \
-o volname=mymount user@remotehost:/path/to/dir ~/mnt/mymount

See this article on Sharing data using sshfs

Comparing sshfs and NFS:
The results were quite interesting. With a little tuning, SSHFS performance was 
pretty close to NFS performance for sequential write and re-write, even when 
default encryption (aes-128) was used. When compression was turned on, 
sequential read and re-read performance was actually better than NFS and better 
than wire speed. Random write IOPS performance was always very good, either 
coming close to NFS performance or achieving 50% better performance. However, 
random read IOPS performance was never better than 60% of NFS performance.

Comparing NFS and SMB:
NFS offers a better performance and is unbeatable if the files are medium sized 
or small. If the files are large enough the timings of both methods get closer 
to each other.  Click here to see more details.
Performance differences between NFS and SMB

July 19, 2023 : 2023-new

New standalone licenses for 2023-2024

If you received your standalone matlab license from us (systems group)
last year, you may now download your renewed 2023 standalone license 
from our systems page below.   It is good for matlab version 9.13 or below.
Follow the licensing section to use your downloaded license.lic.

   Standalone licenses for 2023-2024


******************************************
LICENSING
******************************************
Place your license file in  matlab app/licenses/ (mac,linux) or the licenses
subfolder in the matlab program folder (windows).  No other files whatsoever 
should be in there.  Done.   For details, see

  https://www.cns.nyu.edu/installmatlab/license/#standalone

The license should just work.  If you are requested to "Activate", just close 
the request window and ignore if possible.  Otherwise, do activate without 
internet and give the path to your license file.



******************************************
TROUBLESHOOTING LICENSING
******************************************
Here are some typical reasons why your license may not work.
If none of the tips help, please email systems@cns.nyu.edu.

    https://www.cns.nyu.edu/systems/#standalone

June 10, 2023 : anaconda

Basic anaconda info - macos

Anaconda doc
https://docs.anaconda.com/free/anaconda/

Managing python
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-python.html

================================
anaconda3 install - macos
================================
Make sure you install it onto your local disk and not a network volume.

: # Mac ARM
cd ~/Downloads
curl -O https://repo.anaconda.com/archive/Anaconda3-2023.07-2-MacOSX-arm64.sh
sh Anaconda3-2023.07-2-MacOSX-arm64.sh


: # Mac Intel
cd ~/Downloads
curl -O https://repo.anaconda.com/archive/Anaconda3-2023.07-2-MacOSX-x86_64.sh
sh Anaconda3-2023.07-2-MacOSX-x86_64.sh



================================
miniconda3 - macos
================================
If you don't need an install of python with hundreds of packages, then
install miniconda which installs python plus conda.  Then conda to install
the packages you need.

: # Mac ARM
cd ~/Downloads
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
sh Miniconda3-latest-MacOSX-arm64.sh


: # Mac Intel
cd ~/Downloads
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
sh Miniconda3-latest-MacOSX-x86_64.sh


# conda cheat sheet
https://docs.conda.io/projects/conda/en/stable/user-guide/cheatsheet.html


**** 2022 ****

October 25, 2022 : spam-folder

Controlling Google Spam Folder

Do too many of your valid messages end up in your Spam box in  Gmail?
The following may mitigate that situation.

In Gmail spam folder, select a message that should never be in there.
 - Click on its checkbox.
 - Click on the More icon (vertical dots) on top and select  Filter Messages
   Like These.
 - Click  create filter.
 - Click on  Never send it to spam
 - Click on  Create filter.

Done.

April 20, 2022 : shelltips

Shell tips

In no particular order, here are a few random shell tips.  You may need to
modify them for your own circumstances.

 - Suppose you wish to make sure everyone could access and read the files 
   in the folder  foofolder.  Here are couple of ways of doing that.

   o A quick dirty solution which is not entirely desirable is to do
        chmod -R a+rx foofolder

   o A more precise cleaner solution is to do
        chmod -R a+r foofolder
        find foofolder -type d -exec chmod a+x {} \;

     The find command finds all folders in foofolder and make each one 
     accessible by all. 

 - To do a loop in bash,  follow these examples.
     o for i in web* ; do tar czf ${i}.tgz $i; done
     o for i in f1 f2 f3 f4 ; do echo $i ; gzip $i ; done
     o for i in {5..12} ; do mv web$i web${i}0 ; done

 - To do a loop in tcsh,  follow this example.
      > foreach i ( *.data )
      foreach? tar czf ${i}.tgz $i
      foreach? end

 - To sort the lines in a file by a particular field.  The default
   separator is spaces.  Here are a few examples.
    
     Example 1.  sort -rn -k2 filename
     This sort numerically in reverse order by field 2 using the default 
     separator which is spaces.

     Example 2.  sort -n -k3 -t: filename
     This sort numerically by field 3 using the separator :.
 
 - To clear all your history, do
      history -c

 - To turn off color in the command ls, do   ls --color=none

 - To turn on/off line number in less,  
     less -N / -n  or interactively,  -N/-n

 - cat -n filename  will display line numbers.

 - To turn off autoindent in vi/vim,   do in vi,  :set paste
   In paste mode, vi/vim won't autoindent  when you insert text.
 - To turn on numbering in vi/vim,  do in vi,  :set number  or  :set nonumber

 - To capture just the stderr (without stdout), add  2>&1 1>/dev/null  to the
   end of the command.

 - On case-sensitive filesystem, to find all instances of filenames that
   differ by case only, do    
        find . | sort -f | uniq -i -D

 - When running  dd, no progress is reported.  To get a sense of its progress,
   do   Ctl + t  or  kill -INFO <dd pid> in BSD type unix   or
        kill -USR1 <dd pid>  in Linux.

April 18, 2022 : processes

Finding running processes of a particular type

If you need to find processes running on your computer of a certain type,
here are couple of functions that will make this easy and quick to do.

Depending on your shell, paste the two appropriate lines below to its 
initialization file.  Then launch a new terminal or source that file.

**************************
BASH / ZSH
**************************
bash:  add them to your  .bash_profile or .bashrc
zsh:   add them to your  .zshrc

# process user
pu ()  { ps auxw | egrep "$1|%MEM" | grep -v " $1|%MEM" ; }
pui () { ps auxw | egrep -i "$1|%MEM" | grep -v " $1|%MEM"; }

 
**************************
TCSH / CSH
**************************
tcsh/csh:  add them to your .tcshrc/.cshrc

# process user
alias pu 'ps auxw | egrep "\!^|%MEM" | grep -v " \!^|%MEM"'
alias pui "ps auxw | egrep -i '\!^|%MEM' | grep -v ' \!^|%MEM'"


The  pui  is the case-insensitive version.  Modify the above
to suit your needs or tastes - they are just slightly enhanced versions
of   ps auxw | grep name-of-something.



Usage Examples:
 - To find all processes related to matlab, do
      pu matl  or  pu matlab  or  pui matlab
 - To find all the python process, do
      pu python  or  pui python
 - To find all processes related to google, do
      pui goog
 - To find all processes related to Google Chrome, do
      pui "google chrome"
 - It is interesting to see how many Adobe related processes are running
   even when you are not using any of Adobe apps.  You may be surprised.
   For this, do
      pu Adobe  or  pui adobe
 

If any of the above processes are wedged and you wish to kill them, get the
PIDs from the relevant processes found and then use the  kill  command to
terminate them.  The syntax is for example    kill pid1 pid2 pid3

April 15, 2022 : mactips

Some small macOS tips

In no particular order, here are a few random Mac tips.

 - To copy files or folders from one location to another in Finder,
   you can use cmd + c  and  cmd + v  at the destination (the usual 
   copy and paste shortcuts for text.
 - To move files or folders from one location to another in Finder,
   use  cmd + option + v  at the destination folder.

 - If you want a macos app to just paste some text without the extra
   adornments of the source, do   cmd + option + shift + v

 - If you want a Terminal at a particular folder in Finder, do right click
   on that folder and under Services, select New Terminal at Folder.

   If you don't see that service, do  system preferences > keyboard >
   shortcuts > services > in Files and Folders, click on  
   New Terminal at Folder.

 - If you do cmd + c  on a selected file/folder, then cmd + v  into a
   Terminal or a text field will print the path to that file/folder.

 - If you do a lot of connections into CNS or Psych machines, you may want
   to add  cns.nyu.edu  and/or  psych.nyu.edu  to your search domains.
   You may then use the shortname (leave out cns.nyu.edu or psych.nyu.edu)
   of the hosts when you do ssh or screenshare  from Terminal or a GUI app.
   To add, do   System Pref > Network > Advanced... > DNS

 - You may open a screenshare session via the Finder's "Connect to server".
   But you may also do this in Terminal as well via the command

      open vnc://remotehost  or  open vnc://user@remotehost

**** 2021 ****

April 12, 2021 : unidentified

Unidentified Developer Problem

If you have a package or app that cannot be opened due to an error
that says it is from an unidentified developer and you are certain of
the validity of the package, then you may override the warning via
any one of the following methods.  The availability of these methods
may vary with the version of macOS or app.

 - Right-click on package or app > open.  You will get a unidentified developer
warning and you are asked whether you are sure you wish to open it or cancel.
Click on open.  Note that this does not work on a symlink and so do it on
the original file.

 - System pref > security.  You should see the package or app is from an 
unidentified developer.  Click on open anyway.

 - The reason for the security warning is due to a quarantine tag picked up
when you downloaded the file.  You could delete that tag via the command line
as follows.

  xattr -d com.apple.quarantine downloaded-file

April 12, 2021 : bluetooth-mini

Bluetooth issue on M1 mac mini

If your bluetooth keyboard or mouse is acting erratically, try resetting
your bluetooth.  You can do this by doing option + shift click on 
Bluetooth menu item > select reset bluetooth module.

April 10, 2021 : googledrive

Google Drive File Stream is now Google Drive for desktop

Starting with version 45, Google Drive File Stream has been renamed to
Google Drive desktop.  This is a prelude to Google Backup and Sync merging
into Google Drive desktop later in 2021.

Google Drive for desktop release notes

Google Backup and Sync

Unified GFS and Backup and Sync

Upcoming changes to Google Drive sync clients

April 5, 2021 : anaconda

Some anaconda information

2021 anaconda docs
  https://docs.anaconda.com/anaconda/

Quick start docs
  https://docs.anaconda.com/_downloads/9ee215ff15fde24bf01791d719084950/Anaconda-Starter-Guide.pdf

2021 anaconda install
 - system requirements and support map
 - current anaconda require mojave or above

  https://docs.anaconda.com/anaconda/install/

Anaconda archive (for previous OS)
  https://repo.anaconda.com/archive/

March 25, 2021 : x11

XQuartz 2.8

This version of XQuartz, X11 for Macs, now supports Apple Silicon.  It works
on macOS 10.9.x forward.  

You can downloaded it from https://www.xquartz.org or from our web server via the Terminal
curl -O https://www.cns.nyu.edu/mac/x11.pkg


March 15, 2021 : x11-uninstall

How to uninstall XQuartz 2.7.x

To cleanly uninstall XQuartz 2.7.x, run the following commands in Terminal.

  launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
  sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
  sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
  sudo pkgutil --forget org.macosforge.xquartz.pkg

February 20, 2021 : matlab-bench

Matlab benchmarks

2/2021 matlab benchmarks - all on matlab 9.6 - all matlab executed
via  matlab -nodesktop  and running  bench(2).  You should ignore the
last two fields as these are all executed from a terminal.  Keep in mind
these benchmarks may not reflect how well your codes will run.  They are 
not in any particular order and your mileage may vary.


LU	LAPACK.	Floating point, regular memory access.
FFT	Fast Fourier Transform.  Floating point, irregular memory access.
ODE	Ordinary diff. eqn.    Data structures and functions.
Sparse	Solve sparse system.  Sparse linear algebra.
------------
2-D	2-D Lissajous plot.                Animating line plot.
3-D	3-D SURF(PEAKS)and HGTransform.    3-D surface animation.


      LU        FFT       ODE     Sparse      2-D      3-D
=================================================================
mac mini late 2014

    0.1946    0.2615    0.0171    0.1513    2.3735    3.1130
    0.2134    0.2050    0.0349    0.2024    2.3503    1.6538

is4 prince (not the greene cluster)

    0.1378    0.1071    0.0298    0.1095    0.3087    0.2089
    0.1382    0.1071    0.0304    0.1101    0.3096    0.2096

ubuntu 2020

    0.0525    0.0484    0.0112    0.0766    0.2272    0.1273
    0.0499    0.0480    0.0110    0.0761    0.2214    0.1271

mac mini - 2019

    0.0516    0.0595    0.0133    0.0650    0.1639    0.1096
    0.0514    0.0522    0.0107    0.0616    0.1604    0.1127

imac 2019

    0.0655    0.0687    0.0104    0.0666    0.1598    0.1137
    0.0655    0.0697    0.0104    0.0667    0.1594    0.1102

linux - 2015

    0.0737    0.0518    0.0178    0.1052    0.2937    0.2534
    0.0813    0.0524    0.0168    0.1012    0.4233    0.2923

linux 2016

    0.0717    0.0510    0.0217    0.1051    0.3598    0.2769
    0.0822    0.0693    0.0252    0.1433    0.4013    0.2470

February 17, 2021 : m1matlab

Matlab on M1 Macs

Matlab appears to work well on M1 Macs under Rosetta 2.  It appears
to work from version 8.6 to 9.9.  This is not an official statement 
of support by Mathworks.  It is only based on the fact it will run the
matlab  bench  function without any problems.

It seems to bench well on a M1 Mac Mini even under Rosetta 2.


To run older matlab 9.9 or below on ARM devices you need to lightly modify 
the arch.sh script at  matlab app/bin/util/arch.sh   as it does not recognize
the output of  uname -p  on the ARM hardware.  Look for this portion of the script
and modify as indicated.

            case "`/usr/bin/uname`" in
                Darwin)                   # Mac OS X
                    case "`/usr/bin/uname -p`" in
                        i386|arm)
                            ARCH="maci64"
			    ;;
                        esac
                    ;;
            esac

February 15, 2021 : bigsur

Big Sur and M1 Notes - Miscellaneous

 - Two attempted upgrades to Big Sur resulted in utter failure.  The only
fix was basically a clean install.

 - Installing the 11.1 and 11.2 upgrades from 11.0.1  have caused various
external display to fail.  When I upgraded to 11.2 on an M1 mini, my
external display went berserk.  I turned off the dispplay.  The upgrade
eventually finished and my external display seems to be working fine.

 - When users are logged in at the console, the root user is  blocked 
from accessing varying system pref panes.  In particular in  users and groups 
the logged in console users  are greyed out.  Other pref panes won't
even open.

 - To run cron jobs as root, do the following.
system pref > security & privacy > privacy > full disk access > unlock 
> add  /usr/sbin/cron  to the list of apps that have full disk access.

There may be other services with similar requirements

 - Matlab runs well under rosetta 2 on M1 mini.  Here are a few bench runs
from matlab 9.6.  Run  bench  on your machine to see how these compare
to other machine types.

    0.1272    0.0961    0.0146    0.0785    1.6836    1.0202
    0.1077    0.0751    0.0147    0.0801    1.3584    1.0443

    0.1172    0.0931    0.0164    0.0677    0.1643    0.1102
    0.1176    0.0752    0.0153    0.0693    0.1657    0.1113


February 14, 2021 : dotfiles

Special mex error on catalina only

If you see an error when doing mex compiling that contains

  xcodebuild: error: SDK "macosx10.15.4" cannot be located

This is simply because SDK should not have minor version numbers.
The following mathworks page will give the fix for the issue.

https://www.mathworks.com/support/bugreports/2208336

This error is only seen on catalina for matlab 2020a and 2020b.

February 12, 2021 : dotfiles

How to see the hidden files in macOS

On a Mac, to see the hidden (dot) files in a folder, do in Finder
cmd + shift + .  (the . is part of what you type).  Do it again to hide them.

When they are unhidden, the Finder will allow you to create dotfiles.
Otherwise dotfile creation is forbidden.

January 15, 2021 : diskutil

How to use diskutil command

Below disk refers to an entire physical disk and volume 
refers to a partition.

Not all are supported for all macOS.


*****************************************
SOME USEFUL DISKUTIL COMMANDS
*****************************************
Create a single volume name TM and format it as journaled HFS+ on disk3
# diskutil eraseDisk jhfs+ TM disk3

Erase case-insensitive volume FOO
# diskutil eraseVolume jhfs+ FOO disk4s2

Repair a disk / volume
# diskutil repairDisk disk2
# diskutil repairVolume disk2s5

Get the SMART status of disk0
# diskutil info disk0 | grep SMART



*****************************************
GENERAL
*****************************************
# diskutil list
List all disks even if it is not mounted, but it has 
to be connected and powered up.  Useful if you want to maunt 
a connected disk but no one is logged in.

# diskutil mountDisk disk2     (mount full disk)
# diskutil unmountDisk disk2
# diskutil mountDisk disk2s4   (mount a particular volume)

Rename the volume
# diskutil renameVolume disk0s2 BE1
# diskutil rename disk2s4 NEWNAME

# diskutil repairDisk disk2
# diskutil repairVolume disk2s5

# diskutil verifyDisk 
# diskutil verifyVolume 

# diskutil info diskname
# diskutil verifyPermissions 
# diskutil repairPermissions disk0s9



*****************************************
CREATE VOLUMES
*****************************************

  JHFS+ = jhfs+ = journaled hfs+
  disk5 = /dev/disk5
  disk5s3 = /dev/disk5s3

case-insensitive volume:
# diskutil eraseVolume JHFS+ foo disk4s2
case sensitive volume:
# diskutil eraseVolume "Case-sensitive  JHFS+" foo disk4s2
syntax
# diskutil eraseVolume   

For a new blank disk, you will need to partition it
and create a volume.

Create a single volume name TM and format it as journaled HFS+ on disk3
# diskutil eraseDisk jhfs+ TM disk3
Create a single volume name TM and format it as case-sensitive
journaled HFS+ on disk3
# diskutil eraseDisk jhfsx TM disk3

Create multiple volumes (default is GPT - may be left out).  Whatever is
left will be formatted named as EXTERNAL.
# diskutil partitionDisk /dev/disk2 GPT JHFS+ First 80g JHFS+ Second 80g JHFS+ Third 10g JHFS+ EXTERNAL 0b
# diskutil partitionDisk /dev/disk4 GPT JHFS+ First 10g JHFS+ Second 10g JHFS+ Third 10g JHFS+ EXTERNAL 0b

Create a single partition
# diskutil partitionDisk disk5 jhfs+ newlocal 0b
Create a system disk with a small Recover HD partition
# diskutil partitionDisk disk5 jhfs+ newlocal 999.3g jhfs+ newrecovery 0b


**************
EXAMPLES
**************
# diskutil eraseDisk JHFS+ TM disk3
Started erase on disk3
$<3>Unmounting disk
$<3>Creating the partition map
$<3>Waiting for the disks to reappear
$<3>Formatting disk3s2 as Mac OS Extended (Journaled) with name TM
$<3>Initialized /dev/rdisk3s2 as a 4 TB case-insensitive HFS Plus volume with a 311296k journal
$<3>Mounting disk
$<3>Finished erase on disk3


# diskutil partitionDisk /dev/disk4 GPT JHFS+ First 10g JHFS+ Second 10g JHFS+ Third 10g JHFS+ EXTERNAL 0b
Started partitioning on disk4
$<3>Unmounting disk
$<3>Creating the partition map
$<3>Waiting for the disks to reappear
.... [ munged ]

January 10, 2021 : screenshare

How to break screenshare

Doing the following a few times will break screenshare.

Do  vnc://userA@neural.cns.nyu.edu
and then login as userB instead at the loginwindow  seems to 
confuse screenshare after a few times.  

This does not happen very often as most users only
have one account on a remote machine.


The confusion of screenshare is manifested by the inability
of screenshare to complete any further vnc connections.  Doing bootout
and bootstrap of screenshare does not help.  All other services
will work fine.  The only way to fix screenshare at this state is
to restart the machine.

**** 2020 ****

December 15, 2020 : dns

NYU DNS servers (2020)

The DNS name servers are set automatically when you use DHCP.
In case you are not getting the NYU name servers, here are the current 
NYU name servers.

New NYU name servers
dns1-ha.noc.nyu.edu 128.122.0.11
dns2-ha.noc.nyu.edu 128.122.0.71

December 10, 2020 : upgrademacos

How to install/upgrade macOS

**************************
UPGRADE
**************************
Here are instructions from Apple on how to install/upgrade macOS to El Capitan, 
Sierra, High Sierra, Mojave, Catalina and Big Sur.

Upgrading to Big Sur
Upgrading to older macOS

The installer applications may be downloaded directly from the following 
Apple sites.

macOS Catalina 10.15.x
macOS Mojave 10.14.x
macOS High Sierra 10.13.x

macOS Sierra 10.12.x
Mac OS X El Capitan 10.11.x
Mac OS X Yosemite 10.10.x


**************************
INSTALL
**************************
Create an install boot partition on a usb drive of the macOS of your choice following
the instructions below and using one of the above install applications.

Boot from that usb drive by holding down the option key as the system starts
to boot.  Then choose the boot volume you want.  

When this has booted up, if you click on install it will do an upgrade
if you have macOS installed already.  Otherwise it will just do an install. 
If you want to do a clean install, then simply use Disk Utility to
wipe the disk and then proceed to install.



Note:
======
If your installer throws an error saying it is damaged, see possible solutions
below.  The first one will typically work.

December 5, 2020 : damaged

macOS installer damaged?

If your Install macOS app throws an error saying it is damaged and cannot
be used, one of the following remedy should fix this issue.  This also
is applicable for bootable images created from one of these installers.
The problem appears to be related to an expired certificate within the
installer app.

 1. Move the following file in the Install macOS app to some place else.
   macos install.app/Contents/ShareSupport/InstallInfo.plist
Do this in your Finder or in Terminal.  This seems to work most of the time.

 2. Back date the system clock.  Then run the Install macOS app.  You can set
the system clock in  System Pref > Date and Time  or  you can do in Terminal
as root,  date 1010101018   to set the clock back to October 10, 2018.  
This may not work for Mojave but works well for Sierra.

 3. Delete your current installer app and re-download it.  See the links below
for a direct download from Apple.  This however is unlikely to work unless you 
have a very old installer app.  Very recent Install macOS may not work either.


For reference see
https://osxdaily.com/2019/10/24/fix-install-macos-application-damaged-cant-be-used-error-mac/

November 15, 2020 : bootablemac

Making bootable install images / volumes for Macs

There are times a bootable image or volume would be helpful.
Here are some instructions to make such bootable volumes say on a
portable usb drive.  You will need a spare volume (partition) and
the OS Install app.  The spare volume will be wiped by this process.

In each case, you need to download a copy of the Install macOS app  that is
appropriate for the macOS you are interested in.  Do the following in 
Terminal as root (e.g. you may do  sudo bash).

  - Go to the folder containing the downloaded install app.  Then
  - cd "Install macOS.app/Contents/Resources",  where you replace the name
    Install macOS.app  with the name of the your macOS installation app.

For Mojave or above, do
   ./createinstallmedia --volume /Volumes/name-of-boot-volume
For High Sierra or below, do
   ./createinstallmedia --volume /Volumes/name-of-boot-volume --applicationpath "/path to/Install macOS app"
For El Capitan or below,  see legacy bootable install images


Examples
=========
Mojave
/Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Mojave 

Sierra
/Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Sierra --applicationpath /Applications/Install\ macOS\ Sierra.app


Notes
======
  - If your boot volume throws an error saying it is damaged, then see above
notes.  I believe solution #1 is most likely to work i.e. move the file
macos install.app/Contents/ShareSupport/InstallInfo.plist  elsewhere  and
run the install macos again.

  - The late 12/2020 Sierra installer has a very strange bug where 
createinstallmedia throws an error saying the target volume 
"...is not a valid volume mount point".  The fix is to modify the Info.plist
so that the CFBundleShortVersionString  key has value  12.6.03  rather
than 12.6.06.

September 30, 2020

Turn off macos zsh reminder

If you are annoyed by the constant bash reminder in Apple Terminal regarding
the default shell is now zsh, add the following to your  .bash_profile 

  export BASH_SILENCE_DEPRECATION_WARNING=1

August 30, 2020 : video

Zoom camera issue - fix for Mac

Under macOS, the way most applications (such as FaceTime, Zoom) talk to
the video camera is via the VDCAssistant process  which is part of the
Apple CoreMedia IO framework.  Usually when an app such as Zoom fails at
the video level, it is probably due to a wedged VDCAssistant process.

So if you can't get the Zoom app video to work, don't panic (yet) - try
the following simple fix.

Potential ways to fix:

 - You could just restart your Mac.  It may take more than one restart.
 - A less drastic method is to relaunch the VDCAssistant process.  
   To do this you could use Activities Monitor (View > all processes)  and 
   look for the  VDCAssistant process  which is owned by root and kill it.  

   Alternatively, in Terminal, you could do   sudo killall VDCAssistant.

   Either way, the VDCAssistant process will be restarted and should
   be unwedged.

June 10, 2020

NYU Zoom KnowledgeBase articles

Here are the NYU Zoom KB articles.  Several are updated quite regularly.  
Some of the issues are evolving quite rapidly.
NYU Zoom KB links

Here is the NYU Classes FAQ related to Zoom.
FAQ for using Zoom in Classes.

May 30, 2020

Shell Safety Net

To use your shell / command line safely, please add these aliases
to your shell initialization.  Otherwise it is too easy to accidentally
do  rm -r foofolder   wiping out the whole foofolder without any hesitation.
Do not ever run that command until you have the aliases below set.   
That action is not reversible!!! 

For bash, add to your ~/.bash_profile  the following aliases

alias rm="rm -i"
alias cp="cp -i"
alias mv="mv -i"
# make ls output nicer
alias ls="ls -F"

---------------------------------
For tcsh,  add to your ~/.tcshrc  the following 3 aliases

alias rm "rm -i"
alias cp "cp -i"
alias mv "mv -i"
# make ls output nicer
alias ls "ls -F"

May 25, 2020

The caffeinate command

To keep a Mac awake, for say 1 hour, execute in Terminal the following

caffeinate -s -t 3600 &

May 12, 2020 : affiliate

Manage and Request Affiliate

The NYU procedure for handling your affiliates has changed.  

If you are not on NYU net, connect to NYU VPN first.  Then go to

  https://identity.it.nyu.edu/

When you get there, click on the menu tab (upper left hand side)
and select one of the following.

Request Affiliate
  - A new affiliation for a member of the NYU community.
  - A NetID for a new member of the NYU community.

Manage Affiliate
  This is to edit the status of a current or former affiliate
  you had sponsored.

Here are NYU Knowledge Base articles regarding the above if you need
more information.

Manage Affiliate Form
Request a new sponsored affiliation or new netid

May 10, 2020 : searchdomains

Set search domains from the command line macOS

Here is a typical usage.
  networksetup -setsearchdomains Ethernet cns.nyu.edu psych.nyu.edu nyu.edu

To see the result, do
  networksetup -getsearchdomains Ethernet

The above applies to your ethernet networking and if you have multiple 
ethernet nodes, the syntax is a bit different.

If you want the above to apply to your wireless networking, then replace
Ethernet with Wi-Fi.

April 10, 2020 : case

Differing in case

To list all files and folders in /path/to/foodir whose paths differ only 
in case, you can use the following command.

  find /path/to/foodir | sort -f | uniq -i -D

For example, for the current working folder, you would do

  find . | sort -f | uniq -i -D

January 10, 2020 : adobe

Signing in for Adobe CC apps

When you launch an Adobe app and you are not signed in, it will give you
an adobe sign-in panel, use  nyu.edu  for email address,  which will
then give you the usual NYU sign-in page. 

Note that once your are signed in to Adobe, it is good for all Adobe CC apps
on that machine.

To sign out from an Adobe app, do   Adobe app > Help > Sign out.

**** 2019 ****

June 10, 2019

Matlab 9.6 for all platforms [macOS, Linux, Windows]

Matlab 9.6 is executable from our /share area.  But this is so large, you 
should only run this from your local disk and not a network volume.
If you need this installed on a desktop machine here, please email
 
  systems@cns.nyu.edu

To install it on your own machine, follow the simple instructions at

   localweb.cns.nyu.edu/installmatlab

January 30, 2019 : myip

What is my public IPv4

To get your public IP address, do one of the following.

  - In Terminal, paste    curl ifconfig.me ; echo

  - In your browser search text field, enter   what is my ipv4

January 20, 2019

Changes to NYU VPN: full VPN supported and MFA required

Note that NYU VPN now offers full and split VPN as the choice between
All Traffic and NYU-NET Traffic Only.  The All Traffic means all your network
traffic is routed through NYU VPN as opposed to only NYU-NET traffic is
going through NYU VPN.  

As a general rule, if you need to access restricted journals, use the 
All Traffic group, otherwise use the NYU-NET Traffic Only group.

Do NOT use vpn-test.nyu.edu.  It will no longer work!

Secondly, NYU VPN now requires MFA.  In the Cisco GUI, the first password
field is for your netid password and in the second password field you normally
enter  push  to request a Duo push to your default mobile device.  

However, if you have multiple MFA devices, then you need to enter  pushN  where 
N is the N-th MFA device you had registered for MFA.  But if you have numerous
MFA devices, then it may be difficult to figure out the number N, in which
case it may be easier to simply enter the passcode given by the Duo app on the
mobile device you have at hand.

-- NYU VPN Page

January 7, 2019

Apple locked files

macOS has the ability to set some flag values to make a file immutable
no matter what your privileges are.  

To see the flag values, do    ls -lO
To unlock all files in folder foodir, do   chflags -R nouchg foodir

January 4, 2019

NYU Windows 10 licensing

The NYU Windows 10 licensing page is here.

In summary, it says you can purchase a single Windows 10 license per 
NYU faculty or staff netid at the NYU OnTheHub.  If you need multiple Win 10 licenses, 
you can obtain some discounted licenses via the i-Buy Connection Punch Out tab.
It is currently around $65 per upgrade license.

To download a Windows 10 iso image, you should get it directly from Microsoft
via  https://www.microsoft.com/en-us/software-download/windows10ISO.

**** 2018 ****

December 2, 2018

Simple html template

Here is a simple html template based on this page.  Open it in a plainModify it appropriately
to get you started building a page.

Click to download  a simple html template file.

October 22, 2018

Some useful diskutil commands

Below disk refers to an entire physical disk and volume refers 
to a partition.

List all disks even if it is not mounted.
# diskutil list

# diskutil mountDisk disk2     (mount full disk)
# diskutil unmountDisk disk2
# diskutil mountDisk disk2s4   (mount a particular volume)

Rename the volume
# diskutil renameVolume disk0s2 BE1
# diskutil rename disk2s4 NEWNAME

# diskutil repairDisk disk2
# diskutil repairVolume disk2s5

# diskutil verifyDisk <device>
# diskutil verifyVolume <device>

Get the SMART status of disk0
# diskutil info disk0 | grep SMART

October 20, 2018

Time Machine backups from the commandline

For Lion forward, you may do TM backups from the commandline.
Some may only be doable from the commandline.  Here are some
example tmutil commands.

This will start the default TM backup - backup each hour
# tmutil [ enable | disable ]

This does a one time TM backup immediately.  This is useful if
you want to do TM backups only at certain times via a cron entry.
# tmutil [ startbackup | stopbackup ]
# tmutil listbackups

# tmutil setdestination volume_path
# tmutil destinationinfo

# tmutil addexclusion item1 item2
# tmutil addexclusions -p /Systems
# tmutil removeexclusions -p /Applications /Library /sbin /bin

Deleting backups (may use relative paths)
# tmutil delete /Volumes/EXTERNAL/Backups.backupdb/hostname

To restore some files / folders / volume  from a TM backup.
# tmutil restore pfan /Volumes/Whitehead/Local/Users/pfan

In principle you could using tmutil restore  to restore
a whole system as below.  But it only restore the files
and system won't be bootable.  Additionally it doesn't
like symlinks pointing to outside of the TM backup volume.  
# tmutil restore BE1/* /Volumes/BE2

October 6, 2018

Default Matlab is 9.4 (R2018a)

Our default matlab is now  Matlab version 9.4 (2018a). 
This means when you execute  matlab  or  MATLAB.app   under /share
you will invoke Matlab 9.4.   Note that the  matlab and MATLAB.app work  
for both macOS and Linux and are double clickable for both OS.  

If you don't need the GUI frontend of matlab, you may just do
from a terminal the following.

     matlab -nodesktop -nodisplay


If you are sensitive to the version of Matlab you must use,
follow the table below for the appropriate matlab to invoke.

Matlab versions presently available under /share  consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 9.4)
    matlab9.5   (this will invoke Matlab version 9.5)
    matlab9.2   (this will invoke Matlab version 9.2)
    matlab8.6   (this will invoke Matlab version 8.6)
    matlab8.3   (this will invoke Matlab version 8.3)
    matlab8.0   (this will invoke Matlab version 8.0)
    matlab7.10  (this will invoke Matlab version 7.10)
**************************************************************
All versions starting with 7.5 (2007b) are still available on disk
but not directly executable.

For your reference, here is the matlab support map for all its supported platforms.

September 20, 2018

Using a particular matlab license file

To use a particular matlab license file, do

    matlab -c /path/to/license/file

Examples:  matlab -c /usr/local/matlab9.4/licenses/2network.lic
           matlab -c ~/Desktop/2network.lic

In the second example, I have placed a copy of the license file from
the licenses subfolder in the Matlab app onto my Desktop.
           
This fixes an issue with calls to matlab's parallel toolbox responding
extremely slowly.  As every parallel worker requires a license and with
more and more users relying on this toolbox, calling matlab with a
specific license file seems to make the license checkouts by parpool
to go significantly faster.

See an old post below for more information.

September 15, 2018

Keeping an external disk mounted

If you need to keep an external disk mounted even when
you are logged out, run this command in Terminal.

defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

August 30, 2018 : anaconda-mac

Using anaconda on CNS Macs

Most of the CNS Macs have the anaconda python distro installed
under  /usr/local/anaconda2 and /usr/local/anaconda3.  To use, you
just need to add it to your shell path so that the python binaries
come from one of the above folder rather than the default python.

So for example, to use anaconda3, prepend  /usr/local/anaconda3/bin 
in front of your path.  You could do this by modifying your  ~/.cshrc.mine   
by adding the line

set path = ( /usr/local/anaconda3/bin $path ) 

August 26, 2018

Adobe support map for CC

*******************************
GENERAL REQUIREMENTS
*******************************
CC 2017  will require 10.11 and above.  CC 2015 will work down
to Mavericks (10.9). 

The system requirements are a bit uneven meaning Acrobat XI will 
support down to Snow Leopard (10.6), Photoshop is a bit less demanding
than Illustrator.

*******************************
ILLUSTRATOR
*******************************
CC 2018  10.11 (El Capitan) and up
CC 2017  10.11 (El Capitan) and up
CC 2015  10.9  (Mavericks) and up
CC 2014  10.7  (Lion) and up

*******************************
PHOTOSHOP
*******************************
CC 2018  10.11 (El Capitan) and up
CC 2017  10.10 (Yosemite) and up
CC 2015  10.9  (Mavericks) and up
CC 2014  10.7  (Lion) and up

*******************************
ACROBAT
*******************************
DC  10.10 (Yosemite) and up
XI  10.6  (Snow Leopard) and up
X   10.5  (Leopard) and up

*******************************
REFERENCES
*******************************
For Windows and macOS requirements, see
https://helpx.adobe.com/creative-cloud/system-requirements.html

June 15, 2018

Using log command - Sierra forward

 -- Looking for a particular event
# log show --style syslog --predicate 'eventMessage contains "authentication error"' --info --last 24h        
# log show --style syslog --predicate 'eventMessage contains "authentication error"' --info --last 10m


 -- Not sure what event I am looking for
# log show --style syslog --predicate 'eventMessage contains " "' --info --last 5d > logfile
# log show --style syslog --predicate 'eventMessage contains " "' --info --last 20m | grep sshd


 -- Show me everything (very verbose)
# log show --style syslog --last 1h > logfile
# log show --style syslog --last 1d | grep sshd


 -- Want to get live stream of the type requested
# log stream --style syslog --predicate 'eventMessage contains "authentication error"' --info
# log stream --style syslog --predicate 'eventMessage contains " "' --info

May 29, 2018

Printer Drivers for macOS

To download printer drivers vetted by Apple, go to
support.apple.com/en_US/downloads and search for e.g. HP printer.

May 19, 2018

Using Dropbox from a CNS account

If you want to use Dropbox and if you are using your CNS account, 
you should put your Dropbox folder on your local disk or specifically
under your local home  directory which has the following equivalent paths.

    ~/local-home    /users2/username   /Local/Users/username

*********************************
Have not signed in to Dropbox
*********************************
 - Launch Dropbox and sign in.
 - Do NOT  click on **Open my Dropbox**.  Rather click on the
   Advanced Settings at the bottom.
 - For Dropbox location, do not select the default, select Other.
 - Now chose your  ~/local-home  in the open panel.
   This will create  ~/local-home/Dropbox.

*********************************
Already signed in to Dropbox
*********************************
 - Dropbox > click on setting wheel > Preferences > Account > 
   Unlink this Dropbox (sign out).
 - Sign in to Dropbox.
 - Do NOT  click on **Open my Dropbox**.  Rather click on the
   Advanced Settings at the bottom.
 - For Dropbox location, do not select the default, select Other.
 - Now chose your  ~/local-home  in the open panel.
   This will create  ~/local-home/Dropbox.

May 18, 2018

Restart authentication in macOS

For Yosemite forward, do as root
  # launchctl kickstart -k system/com.apple.opendirectoryd
  # launchctl kickstart -k system/com.apple.nis.ypbind    

For Lion, Mountain Lion and Mavericks, do as root
  # launchctl stop com.apple.opendirectoryd
  # launchctl start com.apple.opendirectoryd
  # killall ypbind

For Snow Leopard, do as root
  # launchctl stop com.apple.DirectoryServices
  # launchctl start com.apple.DirectoryServices
  # killall ypbind

April 10, 2018

Matlab 9.4-2018a

Matlab 9.4  (2018a) is now available for testing for our 
Unix platforms (macOS and Linux).                

For either platform, you may invoke the 9.4 Matlab GUI via the command

     matlab9.4    ( /share/erda/bin/matlab9.4 )

Alternatively, for macOS and Linux you may just double click on 
/share/erda/matlab9.4  and for macOS, there is additionally  
/share/Applications/MATLAB9.4.app

********************************
LIVE VERSIONS
********************************
For live versions of matlab for macOS and Linux, look under the
folder /share/erda.  For macOS specific versions,  look under the folder 
/share/Applications/Legacy.

Available versions include  9.4, 9.3, 9.2, 8.3, 8.0 and 7.10.

********************************
GATEWAY MATLAB FOLDER
********************************
For live, legacy and archive versions of matlab as well as
Windows versions, see our gateway folder for matlab at   

      /share/Public/MATLAB/

********************************
DOWNLOADING MATLAB
********************************
To download a copy of matlab to your own machine, it is best to download 
it from our  Internal Matlab Page - click on the convenience link at the
top of  https://www.cns.nyu.edu/sys/.   There are versions for all
three supported platforms ( macOS, Linux, Windows ).

If you would like to have a copy on your local disk but you do not have
admin privileges, email us.

Do not download these matlab packages to your network home directories.
Make sure you download it to your local disk.

********************************
MATLAB SYSTEM REQUIREMENTS
********************************
For system requirements for all three supported platforms of 
various versions of matlab, see

 -- Matlab system requirements for macOS/Linux/Windows
 -- Mathworks reference for system requirements

April 3, 2018

How to Use Apple Preview Effectively

Here are a few useful links on how to use Preview.

-- How to edit images and mark up PDFs
-- How to Combine PDFs
-- How to Create a Password Protected PDF File 

March 25, 2018

Illustrator Bug Resurface

An old Adobe Illustrator bug / feature may still be haunting users. 
If you get a mysterious "you don't have enough memory" error message
from Illustrator,  see if the following old note may be the issue.
Illustrator Legacy Bug

March 15, 2018

Some Often Used dscl Commands

Local DS
========
    dscl . -list /users/foo
    dscl . -create /users/foo UniqueID xxxx
    dscl . -merge /groups/admin GroupMembership foo 

Local LDAP
===========
To read info from the local ldap domain, do
    dscl /LDAPv3/127.0.0.1 -list /users UniqueID
    dscl /LDAPv3/127.0.0.1 -list /groups GroupMembership
 
To modify info from the local ldap domain, do (need diradmin pw)
    dscl -u diradmin /LDAPv3/127.0.0.1 -delete /users/foo
    dscl -u diradmin /LDAPv3/127.0.0.1 passwd /users/foo 

March 14, 2018

NYU Endnote Distro

You may download the NYU licensed copy of Endnote from the NYU Libraries site.
NYU EndNote Download

March 10, 2018

NYU Team Drive

Here are few NYU links regarding the upcoming NYU Team Drive.

-- Getting started with NYU Team Drive 
-- Best practices for NYU Team Drive
-- Availability and access for NYU Team Drive

March 3, 2018

Cloud Provider Overview

Here are couple of links comparing various Cloud Providers.

-- NYU Storage Services Comparison 
-- Overview given by rclone.org

Couple of miscellaneous notes.

 - Google drive is case-sensitive and Box drive is case-insensitive.
 - From rlcone developer:  Rclone uses SSL/TLS with https with all the 
   public cloud providers, so I think it is safe as browsing via https ...

March 2, 2018

NYU Data and System Classification

Here is a description of the official NYU policy regarding 
Data and System Classification 

January 15, 2018 : office2016

Office 2016 - First Launch

When you launch one of the Office 2016 apps,  click on
Get Started (toward the bottom) > Skip Sign In (small print at bottom).

**** 2017 ****

November 25, 2017

Matlab 9.3-2017b

Matlab 9.3  (2017b) is now available for testing for our 
Unix platforms (macOS and Linux).                

For either platform, you may invoke the 9.3 Matlab GUI via the command

     matlab9.3    ( /share/erda/bin/matlab9.3 )

Alternatively, for macOS and Linux you may just double click on 
/share/erda/matlab9.3  and for macOS, there is additionally  
/share/Applications/MATLAB9.3.app

********************************
LIVE VERSIONS
********************************
For live versions of matlab for macOS and Linux, look under the
folder /share/erda.  For macOS specific versions,  look under the folder 
/share/Applications/Legacy.

Available versions include  9.3, 9.2, 9.1, 9.0, 8.3, 8.0 and 7.10.

********************************
GATEWAY MATLAB FOLDER
********************************
For live, legacy and archive versions of matlab as well as
Windows versions, see our gateway folder for matlab at   

      /share/Public/MATLAB/

********************************
DOWNLOADING MATLAB
********************************
To download a copy of matlab to your own machine, it is best to download 
it from our  Internal Matlab Page - click on the convenience link at the
top of  https://www.cns.nyu.edu/sys/.   There are versions for all
three supported platforms ( macOS, Linux, Windows ).

If you would like to have a copy on your local disk but you do not have
admin privileges, email us.

Do not download these matlab packages to your network home directories.

********************************
MATLAB SYSTEM REQUIREMENTS
********************************
For system requirements for all three supported platforms of 
various versions of matlab, see

Matlab system requirements for macOS/Linux/Windows
Mathworks reference for system requirements

November 2, 2017

Text Corrections

By default a number of automatic text corrections are turned on in macOS.
They are mostly from the world of iOS.  To modify these behavior, go
to System Preferences > Keyboard > Text.

October 20, 2017

Activating NYU MFA

Here is a simplified version of the NYU instructions.

Do steps 1 and 2 below  at  https://start.nyu.edu
    Step 1
       Activate / register your mobile devices to use Duo Mobile (recommended)	
    Step 2
       Activate NYU Multi-Factor Authentication


 ** STEP 1:
Download the Duo Mobile  app  on each of the devices you wish to use.
Get it directly from the appropriate app store.  Launch the Duo Mobile App 
and allow Duo to send you notifications.

Next, go to https://start.nyu.edu  on your computer  and sign in
with your netid and pw.

  - Click on  NYU Multi-Factor Authentication Registration & Update
  - Click on  Add Device
      Follow the instructions to register your mobile device to use
      the Duo Mobile app.  (You can just scan in a barcode.)

 ** STEP 2:
Go to  https://start.nyu.edu  and sign in and click on
  Activate NYU Multi-Factor Authentication

Done

August 28, 2017

Apple System Status

To get a quick look regarding Apple System Status, go to
https://www.apple.com/support/systemstatus/

August 25, 2017

Resetting Apple Mail

Assuming all your mail is on an IMAP server.  If you want to start
with a fresh setup of Apple Mail (factory setting), clean out all the 
Apple Mail related files/folders as follows.  Remove the following if t
hey exist.

  -  ~/Library/Mail
  -  ~/Library/Mail Downloads
  -  ~/Library/Containers/com.apple.mail
  -  ~/Library/Caches/com.apple.mail*
  -  ~/Library/Preferences/com.apple.mail*
  -  ~/Library/Preferences/com.apple.Mail*

Restart the machine and log back in.  If you don't restart, many
of the settings will persist.

However, this may not always work as there may be other hidden files
at work.

August 24, 2017

Apple Mail Configuration Notes

When you first configure Apple Mail for NYU Gmail, choose "Google" and then
your  netid@nyu.edu  account.  You will then need to sign in via NYU netid
and password.  For your outgoing mailserver,  use smtp.gmail.com  and
your NYU Google password.
 
If you have a lot of mail, it is advisable to configure the Mailbox
setting to not download all your attachments or any for that matter
until you need them.

August 23, 2017

Thunderbird Configuration Notes

When you first configure Thunderbird for NYU Gmail, click on "manual config"
and rather than having autodetect, it is proabably better to select 
"Normal Password" and  "SSL/TLS".

If you a lot of mail, it is advisable to limit how much mail are
synchronized to your local disk.  Do this in  Tools > Account Settings >
Synchronization and Storage.  Have Thunderbird synchronize the most 
recent N days  and  put a cap on the size of the message.

May 23, 2017

Installing AFNI - may be anywhere

AFNI is a set of C programs for processing, analyzing, and displaying 
FMRI data from NIH.

The install just involves unwrapping a tarball and putting its location
in your path.  That is it.  You could place it any place you have 
write privileges.  No admin privileges are needed.  Though please do not 
install it in your network home directory.

EXAMPLES:
- Here we install it into the classical location  /usr/local/.
Download the tarball from the AFNI site or /share/Public/OtherPackages/afni
and do the following.
# tar xzf macosx_10.7_Intel_64.tgz -C /usr/local
# cd /usr/local
# ln -s macosx_10.7_Intel_64 abin  
   (if you don't like symlinks, do  mv macosx_10.7_Intel_64 abin)

- Here we install it into your local home directory  ~/local-home
if you are using a network home directory.
% tar xzf macosx_10.7_Intel_64.tgz -C ~/local-home
% cd ~/local-home
% ln -s macosx_10.7_Intel_64 abin
   (if you don't like symlinks, do  mv macosx_10.7_Intel_64 abin)

To install some extra R packages may require admin privileges.
R itself is already installed on our Macs.
Run  abin/rPkgsInstall -pkgs ALL   
It will fail for the package  Rmpi  as the header file  mpi.h
is missing.

If extra python support is required, then install the anaconda python distro.

Append  /usr/local/abin  to your shell path.  You are now good to go.

AFNI site

May 20, 2017

US-CERT Alert TA17-132A

Official US-CERT Alert regarding the recent attack on Windows OS.
Alert TA17-132A

March 20, 2017

Matlab 9.2 (2017a) is now available

Matlab 9.2  (2017a) is now available for testing for our 
Unix platforms (macOS and Linux).                

For either platform, you may invoke the 9.2 Matlab GUI via the command

     matlab9.2    (/share/erda/bin/matlab9.2)

Alternatively, you may just double click on /share/erda/matlab9.2.
If you just want a matlab shell, you may do 

     matlab9.2 -nodesktop

********************************
Legacy Live Versions
********************************
For legacy live versions of matlab, look under  /share/erda.
For macOS specific versions,  look under  /share/Applications/Legacy.

********************************
Omnibus Matlab folder
********************************
For legacy live versions and archived versions of matlab as well as
Windows versions, see our omnibus folder for matlab at   

      /share/Public/MATLAB/

February 10, 2017

NYU Anyconnect client upgraded to version 4.4

NYU IT network group has upgraded its VPN servers on February 10.  
This entail an update of the Cisco Anyconnect VPN client to version 4.4.
When you connect to NYU VPN, you will be asked to update you Anyconnect client.
You may also proactively updated it by visiting the NYU VPN page.  It is 
important to note that you should *only* install the 2 components:
VPN and Diagnostics and Reporting Tool.  Otherwise the app may not work
properly.

NYU VPN page 
Download and installing Mac VPN client
Download and installing Windows VPN client

February 9, 2017

Using NYU VPN under Linux

NYU IT updated its VPN servers which may mean your Linux computer
may need a new VPN client.  NYU VPN does not officially support Linux,
but the following should work.  

UBUNTU:
  - sudo apt-get update
  - sudo apt-get install openconnect 
  - sudo apt-get install network-manager-openconnect 
  - sudo apt-get install network-manager-openconnect-gnome
Then use the Network Manager to make the connection to the NYU VPN server.

CENTOS/FEDORA:
  - sudo yum install openconnect
  - sudo yum install networkmanager-openconnect
  - sudo yum install networkmanager-openconnect-gnome

Not clear all 3 packages are necessary, but they appear to be sufficient
to get NYU VPN to work on Linux.

NOTES:
  -- For Ubuntu 14.x and older, you won't be able to connect to the
  the current NYU VPN server.  The only fix we found so far is to 
  build and install openconnect 7.  Follow the instructions here.
     Openconnect not able to connect to gateway
 
  -- VPN Install script for Ubuntu  [basically installs the above 3 packages]

  -- NYU VPN page 
  -- NYU Shanghai VPN for Linux page   [may be outdated]

February 5, 2017

Power consumption of Apple hardware

Apple actually provides power consumption of their hardware.  Note that
this varies quite a bit between idle consumption and full-usage consumption.
There could be a 4 to 10 fold difference.

Mac Pro
support.apple.com/en-us/HT201796

iMac
support.apple.com/en-us/HT201918

Mac Mini
support.apple.com/en-us/HT201897

If you are getting a UPS for your Mac, note that when you connect your
Mac to the UPS via USB,  System Preferences > Energy  gives you a new
UPS tab  to configure how you want to handle the  shutdown of the Mac 
in case you are running on battery.  This may not be supported on all UPS
models but are supported for ones from APC.

**** 2016 ****

September 26, 2016

Matlab 9.1 (R2016b) is now available

Matlab 9.1 (R2016b) is now available either as a on-disk live version
or as a on-web archive version for all platforms supported by Mathworks.
Our license servers are serving out licenses for 9.1 (2016b).

*************************
    On-disk
*************************
For our unix systems (macOS / Linux), you may invoke the on-disk version
via  matlab9.1    (/share/erda/bin/matlab9.1)  or double click
on  /share/erda/matlab9.1.  If you just want the matlab shell, you may do 
  matlab9.1 -nodesktop

For macOS, there is a matlab app under  /share/Applications.  This is
supported for macOS Yosemite (10.10.x) forward.

For our on-disk matlab resources, see our omnibus directory at

    /share/Public/MATLAB

*************************
    On-web
*************************
For the on-web archival versions, see our Internal Matlab Page.  

We have a fairly comprehensive matlab distro / information page that you
can access by clicking on the convenience link for our Internal Matlab Page
at the top of  https://www.cns.nyu.edu/sys/.

September 17, 2016

Ports for Samba service

Generally the following ports are needed to do Samba service.

smbd daemon
netbios-ssn  139/tcp   # NetBIOS Session Service
microsoft-ds 445/tcp   # Microsoft Active Directory Service

nmbd daemon
netbios-ns   137/udp   # NetBIOS Name Service
netbios-dgm  138/udp   # NetBIOS Datagram Service

The latter two udp ports may not be essential especially for more
modern implementation of this service.

References:
http://troy.jdmz.net/samba/fw/
https://help.ubuntu.com/community/Samba/SambaServerGuide

September 15, 2016

Prevent system from sleeping via caffeinate

If a user has put a machine to sleep and you need to keep
it awake, use the caffeinate command.

Keep the system from sleeping.
# caffeinate -s
Keep the system from sleeping for 1 hour.
# caffeinate -t 3600

For more options see  man caffeinate.

September 12, 2016

Various Mac startup key combinations

Here are a few useful startup key combinations from Apple.

  support.apple.com/en-us/HT201255

September 10, 2016

Stuck softwareupdate

If your softwareupdate refuses to complete, it could be that its cache
folder has been corrupted.  Quit softwareupdate and clear out  
/Library/Updates/   and restart the computer.  Then try running 
softwareupdate again.

June 28, 2016

Patches for Matlab 9.0 (2016a)

If you are using the NYU redundant license servers with your Matlab 9.0,
you will need to patch it.  Otherwise you will get a license error
or a request to activate your Matlab.  

The version of Matlab 9.0 we are distributing as working apps 
from our  /share  area and from our internal web server  are
now the patched version.  Typically we distribute them with 3 network
license files - 1network.lic,  2network.lic  and  3network.lic.
The 3network.lic  contains the NYU redundant license servers.

To patch your own copy of Matlab 9.0, click on the appropriate link below.

Matlab 9.0 patch for OS X
Matlab 9.0 patch for Linux
Matlab 9.0 patch for Windows

To install the patch, in a terminal go to your downloads folder and do
    unzip -d <Matlab9.0 app> <downloaded zip file>

This will write over the broken version of the files.  If you are paranoid, 
you may want to save a copy of the broken version.  Note that if you 
double click on the zip file it may create a folder to dump the content
of the zip file and that won't patch your Matlab.  You can also just copy
the files into the relevant Matlab folder manually.

More detail install instructions are here.

March 18, 2016

Matlab 9.0 (2016a) available for testing

Matlab 9.0  (aka R2016a) is now available for testing for
our UNIX platforms (Mac OS X and Linux).          

For either platform, you may invoke the 9.0 Matlab GUI via the command

     matlab9.0    (/share/erda/bin/matlab9.0)

Alternatively, you may just double click on /share/erda/matlab9.0.
If you just want the matlab shell, you may do  
     matlab9.0 -nodesktop -nodisplay

For systems where our  /share  area is not accessible, we have
appropriate platform-specific versions for users to download
at our usual Matlab distro point on our localweb webserver.  This is 
available for all platforms supported by Matlab (OS X, Linux and Windows).

February 22, 2016 : xattr

Removing OS X security per item

For apps or files downloaded from the internet, OS X may complain that it 
"can’t be opened because it is from an unidentified developer" or that it is
corrupted.  There are known ways to override this that may or may not work
smoothly.  Here is simple command to remove the extended attribute that
is attached to items downloaded via a browser.  Of course you should
only do this if you are sure of the source of your download.

EXAMPLE: Say you downloaded  XYZ.app.tgz  from your browser.  Then 
to remove the quarantine download tag, do in Terminal the following.

    xattr -d com.apple.quarantine XYZ.app.tgz

If the archive is already unwrapped, then do (may require root/sudo privilege)
    xattr -dr com.apple.quarantine XYZ.app

To see what extended attributes are attached to a given object, do
    xattr XYZ.app.tgz
  

January 12, 2016

Some common ssh and scp commands

For concreteness, we will assume the remote host is named  
neuron.cns.nyu.edu  and your username on the remote host is hubel.

To open a remote shell,
    ssh hubel@neuron.cns.nyu.edu
If on the source machine, your username is also hubel, then do
    ssh neuron.cns.nyu.edu

Copy files or folders to say  neuron.cns.nyu.edu:/users/hubel/temp/
To copy  foofile, do 
    scp foofile hubel@neuron.cns.nyu.edu:/users/hubel/temp
    scp foofile neuron.cns.nyu.edu:/users/hubel/temp

To copy the folder  foodir, do
    scp -r foodir hubel@neuron.cns.nyu.edu:/users/hubel/temp
    scp -r foodir neuron.cns.nyu.edu:/users/hubel/temp

Copy files and folders from say  neuron.cns.nyu.edu:/users/hubel/temp/
To copy  foofile to the current location, do
    scp hubel@neuron.cns.nyu.edu:/users/hubel/temp/foofile .
    scp neuron.cns.nyu.edu:/users/hubel/temp/foofile .

To copy the folder  foodir to the current location, do
    scp -r hubel@neuron.cns.nyu.edu:/users/hubel/temp/foodir .
    scp -r neuron.cns.nyu.edu:/users/hubel/temp/foodir .

The above "." means the current location.  You could specify
any path you have permission to write to.

**** 2015 ****

October 5, 2015

Some useful OS X commands

In the next few entries, we list a few useful OS X commands.

Here we start with the system_profiler command which could
list just about all the information regarding this system.
It is really useful when you specify the information you really want.

# system_profiler SPHardwareDataType
# system_profiler SPMemoryDataType
# system_profiler SPFirewallDataType

The basic syntax is system_profiler <DataType>.  The above SP stands
for system profiler.   To find all the available data types, do
# system_profiler -listDataTypes

September 28, 2015

Some hints and preferences for El Capitan and Yosemite forward

For El Capitan, Yosemite, Mavericks and Mountain Lion machines, here are a few 
suggestions to reduce some overhead that tend to slow down such systems.

  - From the sidebar of your Finder,  remove the  All my files.
Do  Finder > Pref > Sidebar > uncheck "All My Files".  Also
in Finder > Pref > General, for "New Finder Window Show" select
something other than All My Files.

  - System Pref > General > make sure "Close windows when
closing an application"  is  checked.

  - When you log out, make sure  "Reopen windows when logging
back in"  is unchecked.   Do it once and this will stick
the next time.   Might as well do it right away so you won't have
to remember the next time.

  - Disable Flash in your browsers - see our instructions below.


For Yosemite and forward, here are a few preference items
you may wish to consider.

General:
  Use dark menu
  Show scroll bar - always
  Click on scroll bar to: Jump to the spot that's clicked
  Recent items: select 20 or higher

Desktop & Screen Saver:
  Don't use the Flurry screensaver as it does chew up your CPU.
  The Message one is fairly innocuos.

Date & Time:
  Clock tab - click on show date

Apple Finder:
  If you use the Finder, do adjust the Finder Preferences to suit
  your needs.  



May 12, 2015 : nyu-email

NYU Email settings [revised]

******************************************
Using a web browser
******************************************
Just login to  email.nyu.edu using your usual NYU netid and password.

******************************************
Using a mail client app or mobile device
******************************************
The first step is to set a NYU Google Apps password if you
don't already have one by going to
     start.nyu.edu.  
It is strongly recommended you use a password different from your 
NYU Home password.  Moreover if you are using a desktop mail client,
you need to login to  email.nyu.edu and turn on access to "less secure apps" at 
www.google.com/settings/security/lesssecureapps.

Here are the main settings:
==========================================
Incoming mail server:  imap.gmail.com
User name:    your-netid@nyu.edu 
Password:     your NYU Google password
Security:     SSL and normal password

Outgoing mail server:  smtp.gmail.com
User name:    your-netid@nyu.edu 
Password:     your NYU Google password
Security:     SSL and normal password
=========================================

When on NYU Net, for outgoing mail server you may also use  
smtp.nyu.edu  with no authentication.  For detail see the
reference URL below.

******************************************
References
******************************************
NYU Email
NYU Email setup reference
Using smtp.nyu.edu

Questions or concerns regarding your NYU Email should be directed to
    askits@nyu.edu
    212-998-3333

March 28, 2015

Patching matlab for Yosemite (10.10.x) and El Capitan (10.11.x) [revised]

Yosemite forward broke matlab 7.12->7.14 and 8.0->8.3.

For matlab 7.12->7.14 and 8.0->8.3, 
the following two issues have been addressed by Mathworks.
If you have a Mathworks account, you can access the Mathworks
links at the bottom.

  -- Cannot launch MATLAB 8.3 or earlier on  Yosemite in the Finder.
This is fixed with an updated system data file from Apple.  Make sure
System Preferences > App Store  has "Install system data files and security
updates" checked.    You will need to leave the Yosemite machine online
and on the network for several hours and possibly overnight for Apple to
push out the data file to your machine.  If you still see the prohibit sign
after the system data files have been updated, then create an 
"Untitled folder" and move your matlab app in and out of that folder.  See
matlab-bug-launch.pdf

  -- More seriously, matlab crashes due to some java exceptions in Yosemite.
There are individual patches for matlab 7.12->7.14, 8.0->8.3.
However, it doesn't appear the patches for 7.12 -> 7.14 are actually
needed.   You may download the appropriate patch for your platform at

patches for Yosemite and El Capitan.

When you unzip the above patch file, you will see two folders:
bugreport and patch.  To install, simply copy the patch folder to your 
<matlab>/java/  and copy the bugreport folder to your <matlab>.
That is it.


Mathworks bugreport links:
www.mathworks.com/support/bugreports/1116607
www.mathworks.com/support/bugreports/1098655

March 23, 2015

Matlab 8.5 (MLM 33) available for testing

Matlab 8.5  (aka R2015a) is now available for testing for
our supported UNIX platforms (Mac OS X, Linux).  

You may invoke this via the command

     matlab8.5    (/share/erda/bin/matlab8.5)

Alternatively, you may just double click on /share/erda/matlab8.5.
There is also an OS X app bundle of this in
/share/Applications/Unsupported/.

If you wish to have a version for your platform on
your local disk, you may grab them in a compressed format from

  /share/Public/Distros/Mac
  /share/Public/Distros/Linux

As these are all very large files, please do not leave
them in your CNS home directory.

Note that matlab 8.5 is only supported on relatively
recent distribution of OS X (10.9.x and above) and Linux.

For detail regarding matlab support map, follow the links here.

Matlab support map for OS X/Linux/Windows

March 20, 2015

Printer maintenance via the commandline

You should be able to run most of these commands if you are in the
lpadmin group.  These commands may be useful if the printer GUI won't 
perform the necessary task.

To list your printers.
# lpstat -t

To enable a paused printer.
# cupsenable 
    e.g.  cupsenable p1023

To disable a running printer.
# cupsdisable 
    e.g.  cupsdisable p1023

To remove print jobs in the print queue.
# cancel -a 
    e.g.  cancel -a p1023
# cancel -u 
    e.g.  cancel -u pfan

To remove a printer.
# lpadmin -x  
    e.g.  lpadmin -x p1034

One can surprisingly add printers using the lpadmin command pretty easily.
See our note on lpadmin and adding printers.

March 19, 2015

Adding a printer from command line

You can add a printer from the command line if you are in
the lpadmin group (admin group would work fine) by using lpadmin.

lpadmin -p <printer-name> -E -v lpd://<hostname>.cns.nyu.edu/ \
-P "/Library/Printers/PPDs/Contents/Resources/<Printer PPD file>" \
-L "<description and location>" \
-o printer-is-shared=false -o cupsIPPSupplies=true -o HPOption_Duplexer=True

The -o options are just suggestions.  You could probably leave them out
if you want.  Here is a fictious example to clarify the above syntax.

lpadmin -p <color715> -E -v lpd://715hp2025.cns.nyu.edu/ \
-P "/Library/Printers/PPDs/Contents/Resources/HP Color LaserJet CP2020d Series.gz" \
-L "Color, Duplex, 715 Meyer" \
-o printer-is-shared=false -o cupsIPPSupplies=true -o HPOption_Duplexer=True

The lpadmin command is basically the same under Linux.  So the
above will work as well under Linux.

To add printers using the System Preferences GUI, see our not
on  setting up a network printer

March 17, 2015

Cloning printer set up

Here is how you can easily duplicate printer setup across machines.  
Basically you just need to copy over the  /etc/cups  folder.

This could be useful if you want to homogenize the printer
settings on all the machines in a lab.

*******************************
Recreate all printers
*******************************
Setup your printers on a reference machine and then tar or zip up
/etc/cups  for distribution.

Do the following on the machines that you wish to duplicate
the above reference printers.

Save the current /etc/cups  and then untar your above reference cups.tgz  
into /etc.

If no printers have been setup on this machine, then enable cupsd.
# launchctl enable system/org.cups.cupsd

If printers have been setup already, then you need to kick restart cupsd.
# launchctl kickstart -k system/org.cups.cupsd

Double check the printers are setup as expected.
# lpstat -t   

Legacy launchctl syntax for restarting cupsd.
# launchctl stop org.cups.cupsd
# launchctl start org.cups.cupsd

*******************************
Setting up a specific printer
*******************************
If you just want to do a specific printer, then you need
to propagate the following information from the reference machine
which has the desired printer setup to the other machines in the lab.

  - /etc/cups/ppd/printername.ppd
  - Copy the information in /etc/cups/printers.conf  between the
    tags  <Printer printername>   and </Printer>  (including the tags).

Do the other steps as above.

February 8, 2015

Using FSL

Usually you will find our  FSL  distribution under
/share/erda/macos/fsl  or  /usr/local/fsl.   To use it,
you just need to set your paths appropriately.  

*********************************
Using a CNS home directory
*********************************
The following will trigger our shell initializations to 
set the appropriate paths for FSL.  

In Terminal, do 
     mkdir .cshrc.special
     touch .cshrc.special/fsl        (if using /share/erda/macos/fsl) 
or   touch .cshrc.special/fsl.local  (if using /usr/local/fsl) 

Now do  source .cshrc  or launch a new Terminal.
You could also add the lines below to your .cshrc.mine but that
would be less preferrable as the above will automatically update
your paths and initializations when necessary.

*********************************
Not using a CNS home directory
*********************************
Add the following to your shell environment.

# tcsh/csh (.tcshrc / .cshrc) - using /usr/local/fsl
setenv FSLDIR /usr/local/fsl
source ${FSLDIR}/etc/fslconf/fsl.csh
setenv PATH ${PATH}:${FSLDIR}/bin

# bash (.bashrc) - using /usr/local/fsl
FSLDIR=/usr/local/fsl
. ${FSLDIR}/etc/fslconf/fsl.sh
PATH=${FSLDIR}/bin:${PATH}
export FSLDIR PATH


If you want to use  /share/erda/macos/fsl,  then simply replace
the above /usr/local/fsl  with  /share/erda/macos/fsl.

February 2, 2015

How to disable or uninstall Flash

Here is how you can disable / uninstall Flash.  There is an important
distinction between disabling Flash and blocking Flash.  In the
latter case, sites that have Flash videos will not show alternate 
media even when available.  In the former case, the non-Flash video 
will be shown.

****************************
Chrome (disable flash)
****************************
To disable the Flash that comes with Chrome, type in its address bar
chrome://plugins.  Find the Flash player listing and click on Disable.

****************************
Firefox (deactivate flash)
****************************
Tools > Add-ons > select Plugins.  For Shockwave Flash, select 
Never Activate  and not Ask to Activate.

****************************
Safari (disallow plug-ins)
****************************
Preferences > Security > Internet plug-ins > uncheck Allow Plug-ins.
If you just do Block Flash, you won't get the non-Flash versions of the videos.

****************************
Adobe Flash uninstaller
****************************
Download from here and not elsewhere.
http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html

****************************
Removing flash manually
****************************
Do the following in the order given.  You will need root (sudo) privileges.
For CNS OS X desktop systems, email  mac@cns.nyu.edu.

Run this in Terminal.
# launchctl unload /Library/LaunchDaemons/com.adobe.fpsaud.plist

Remove the following files/folders.
/Library/Internet Plug-Ins/Flash Player.plugin
/Library/Internet Plug-Ins/flashplayer.xpt
/Library/LaunchDaemons/com.adobe.fpsaud.plist
/Library/PreferencePanes/Flash Player.prefPane

January 25, 2015

How to spot and fix Mavricks automount hang

Mavericks has an automountd memory bug that will trigger
a malloc error that locks up the automount and in particular
all the NFS mounts will hang.  Interestingly, the easy fix below
will immediately cure the NFS mounts and the system.  No restart
is needed.

************************************
SYMPTOMS
************************************
Here are couple of signs of this problem.

In system.log, grep for malloc.

Sep  2 01:14:35 macfoo automountd[7107]: automountd(7107,0x1008a7000) malloc: 
*** error for object 0x7fb1d2d004a0: double free

macfoo:~ root# ps auxw | grep autom
USER              PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
root             7103   0.0  0.0  2433952   1680   ??  U     1:14AM   0:00.00 /usr/sbin/automount
root             7102   0.0  0.0  2513260   2496   ??  Ss    1:14AM   0:00.01 automountd
root             7107   0.0  0.0        0      0   ??  Z     1:14AM   0:00.00 (automountd)
   
NOTE the above zombie automountd (7107).

************************************
THE FIX
************************************
# kill -KILL 7103 7102      (automount and automountd in the above ps)
   (regular kill wasn't enough)

Automount should recover right away and the machine should
magically be returned to normal instaneously.

**** 2014 ****

November 20, 2014

Expiring Matlab licenses 2015 [Updated]

All of our matlab licenses (CNS / NYU) are expiring licenses  
(network and standalone licenses).  They are generally renewed 
in late December as that is when Mathworks do their renewal quotes.  
So if you see annoying messages such as the one below in your 
Matlab window, just ignore it. 
 
        Your MATLAB license will expire in N days.
        Please contact your system administrator or
        MathWorks to renew this license.

For those of you with standalone licenses through us, we will
send out a further message later regarding their renewals.

November 11, 2014

Xcode and license agreement

All the recent versions of Apple Xcode developer tools or 
commandline versions of them require sudo privilege to agree
to its license agreement.  You could do this from the commandline via

  xcrun cc

November 2, 2014

Matlab 8.4 bug - exporting EPS files

There apparently is a bug in Matlab 8.4 that may cause
exported EPS to have jagged lines.  Either use a different
version of matlab or use a fixeps.m  function provided
by a Mathworks to postprocess your EPS file.

Here is a temporary workaround from Mathworks.  Use the
fixeps.m  function below to post process your eps files.

Usage: 
% Will change the linejoins to round
fixeps('input.eps','output.eps','LJ')
% Will correct the miterlimit
fixeps('input.eps','output.eps','ML') 

function fixeps(inname,outname,fixmode)
if nargin==2
    fixmode = 'LJ';
end
fi = fopen(inname,'r');
fo = fopen(outname,'w');
tline = fgets(fi);
while ischar(tline)
    if (strcmp(tline,['10.0 ML' 10])) % Replace 10.0 miterlimit
        switch (fixmode)
            case 'LJ'
                fwrite(fo,['1 LJ' 10]); % With round linejoin
            case 'ML'
                fwrite(fo,['2.5 ML' 10]); % With smaller miterlimit
        end
    else
        fwrite(fo,tline);
    end
    tline = fgets(fi);
end
fclose(fo);
fclose(fi);

Here is Mathworks lame promise on this.
"Our development team is aware of this issue and they may consider 
fixing it for the future releases of MATLAB."

October 31, 2014

Unlimited storage on NYU Drive

ITS announced today that NYU users now have unlimited storage
on their NYU Drive.  This may be very significant if you have
large archival storage needs.  Do be mindful of any security or
privacy requirements on data you store on the NYU Drive.  See the
ITS link below.

You can access NYU Drive as follows.

Over the web:
  drive.nyu.edu  or via  home.nyu.edu.

Desktop / Mobile app:
  Use the Google Drive 

For more information regarding NYU Drive, see 
  www.nyu.edu/its/drive/

October 11, 2014

Matlab 8.4 (MLM 32) available for testing

Matlab 8.4  (aka R2014b) is now available for testing for
our supported UNIX platforms (Mac OS X, Linux).  

During our test phase, please use it via the command
from your terminal.

     matlab8.4    (/share/erda/bin/matlab8.4)

You may also just double click on /share/erda/matlab8.4 to launch it
on a Mac or Linux machine.  We will have a separate OS X app bundle 
later in the week.

Note that matlab 8.4 is only supported on relatively
recent versions of OS X (Lion and above) and Linux (64bit only).  
For detail regarding matlab support map, follow the links here.

Matlab support map for OS X/Linux/Windows

October 10, 2014

[NOTICE] EOL for Matlab 8.1 (R2013a) - November 1, 2014

We would like to set  November 1, 2014 (Saturday)   
as a tentative EOL (End of Life) date for our Matlab 8.1. 

The EOL will mean that we will no longer distribute 8.1 from
our shared area i.e. it will be archived and taken offline
from our server.  You will also no longer be able to call matlab8.1
to invoke this version of matlab.  Our network license server will 
continue to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

Matlab support map for OS X/Linux/Windows

August 14, 2014 : bootablemacold

Making bootable install images / volumes for Macs

For Lion (10.7.x) forward, you can boot into Recovery Mode (<cmd> + R)
if you need to repair your system disk or reinstall your OS.  However,
there are times a bootable image or volume would be more helpful.
Here are some instructions to make such bootable volumes say on a
portable usb drive.  You will need a spare volume (partition) and
the OS Install app or the install DVD or CDR.

El Capitan, Yosemite and Mavericks:
Use the   <Mavericks/Yosemite Install.app>/Contents/Resource/createinstallmedia
as follows to create a bootable volume.

<createinstallmedia> --volume <name-of-boot-volume> --applicationpath \ 
"/path/to/Install Mavericks.app"

Lion and Mountain Lion:
Navigate to  <Install.app>/Contents/SharedSupport/  and
look for  InstallESD.dmg.   Launch Disk Utility  and drag  InstallESD.dmg
to the left-hand side of the Disk Utility window and do a restore of
InstallESD.dmg  into a blank disk volume that you select.

Snow Leopard and Leopard:
Open your CDR or DVD of Snow Leopard or Leopard.
In Disk Utility, select the opened image of above on the left-hand side 
and click on restore.   Drag the destination volume from the left-hand side
to the Destination field.  Click on the Restore button.

Cloning from a disk image or volume using  asr  command
  asr restore --source /dev/diskNsM --target /dev/diskYsW --erase

Note that the source and target must be unmountable.  So you cannot
clone a volume you are booting from.

May 30, 2014

NYU has joined eduroam

NYU has joined  eduroam.  This roaming network access service 
allows faculty, students and staff from members of eduroam 
to obtain wireless access to the Internet when visiting other 
participating institutions by using your home institution's 
authentication credentials.

In Europe, eduroam is fairly ubiquitous.  To see a map of
participating members of eduroam and some general information, see

https://www.eduroam.org/index.php?p=where
https://www.eduroam.org 
NYU eduroam page

For NYU folks, you authenticate via

Username:  netid@nyu.edu
Password:  your usual NYU pw

May 20, 2014

New NYU VPN

Upgrade to the new NYU VPN Cisco AnyConnect client.  On the Mac, 
you can no longer use the VPN client that comes with OS X.
You must use the AnyConnect client.  Follow the appropriate links 
for your platform at the following page.

NYU VPN page

April 22, 2014

Default matlab is 8.3 (R2014a) (MLM 31)

Our  default matlab is now   Matlab 8.3 (aka R2014a). 
This means when you execute matlab  (/share/erda/bin/matlab)  
and  /share/Applications/MATLAB.app  you will invoke Matlab 8.3
for the appropriate unix platform ( Linux / Mac OS X ).

Note that for Snow Leopard and below, you must use Matlab 8.
It is now at   /share/Applications/Legacy/MATLAB8.0.app.

If you are sensitive to the version of matlab you must use,
follow the table below for the appropriate matlab to invoke.

Our Matlab distributions will then consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 8.3)
    matlab8.3   (this will invoke Matlab version 8.3)
    matlab8.2   (this will invoke Matlab version 8.2)
    matlab8.1   (this will invoke Matlab version 8.1)
    matlab8     (this will invoke Matlab version 8)
    matlab7.10  (this will invoke Matlab version 7.10)
**************************************************************

Matlab support map for OS X/Linux/Windows

If you don't need the GUI frontend of matlab, you may just do
from a terminal app the following.

     matlab -nodesktop -nodisplay

March 9, 2014

[NOTICE] EOL for Matlab 7.14 (R2012a) - March 22, 2014

We would like to set  March 22, 2014 (Saturday)   
as a tentative EOL (End of Life) date for our Matlab 7.14. 

The EOL will mean that we will no longer distribute 7.14 from
our shared area i.e. it will be archived and taken offline
from our server.  You will also no longer be able to call matlab7.14
to invoke this version of matlab.  Our network license server will 
continue to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

Matlab support map for OS X/Linux/Windows

**** 2013 ****

December 15, 2013 : standalone

Troubleshooting your standalone matlab license

This section is only about licensing issues. If your license is
actually bad, matlab will throw a licensing error almost right away.  
If your matlab doesn't seem to launch, but there are no error messages,
then it may be the last subsection below.

YOU MADE A MISTAKE
  - Your license file is not named  license.lic or license.dat.
    Perhaps your browser has secretly changed its extension.
  - Your license.lic has not been saved as a plain-text file.
    Make sure you have not used Word or other word prcessing apps
    to save this file. To double check, launch Terminal and go to
    the folder containing your license.lic  and run the command
    cat license.lic    to make sure the output is just plain text.
  - Your license.lic is not in the  licenses  folder within
    your matlab application folder.
  - Your hardware address has changed (due to some hardware modifications)
    since the last time  we generated a standalone license for you.
    We just need to regenerate a new license based on the new hardware address.
  - You have an old license file that matlab is still using rather than 
    this new license.  You will need to find and remove the old license.  Here 
    are the possible locations for matlab license files.
      https://www.cns.nyu.edu/installmatlab/#locations

MATLAB MADE A MISTAKE
  - A less common reason is that your OS has changed significantly
    and matlab is no longer using the same network device for the 
    hardware address.  Matlab license error panel may tell you
    the correct hardware address (hostid).
  - For some versions of macOS, Matlab may not use the first hardware
    address en0.  We then simply need to regenerate a license tied to en1.
  
USEFUL THINGS REGARDING YOUR LICENSE FILES FOR DEBUGGING
  - The hardware address attached to a license.lic is given by
    the HOSTID tag.  The expiration date of a license.lic is on each
    of the INCREMENT line - it should look like  30-jul-20xx.
  - To see the hardware address of various network devices on your 
    system, do in a terminal    ifconfig.

MATLAB TAKES FOREVER TO LAUNCH
  - If you have multiple license files in the Matlab licenses folder,
    Matlab will use them in lexicograhical order.  Matlab should automatically
    failover from one to the next one in order.  However Matlab may take
    a long time to timeout if a license does not work.  If you run into this
    issue, try moving all your license files apart from the main one to
    a subfolder.
  - For recent macOS, if you download the Matlab tarball via your browser,
    it will pick up a  com.apple.quarantine  tag on all the files within
    the Matlab app.  This will make your first launch of Matlab appear to be 
    wedged.  For an easy fix, see our  note here.

SOME RARE MATLAB ISSUES
  - Make sure you are not using the legacy network NYU matlab license servers.
  - If you are using Matlab 9.0 (R2016a) and are using the NYU license servers,
    then you need to patch your Matlab.  See the note here.

For general information regarding matlab here, see
www.cns.nyu.edu/sys/#september6-2012

December 12, 2013

New Matlab license servers

Starting with matlab 8.2, Mathworks has changed the
format of its license strings to support a new license server.
This has required us to migrate to different systems
for our license servers.  All of this should be transparent
to machines that use our license servers.  Eventually the
names of the license servers will be as before.  During our 
transition and test phase, we will be running both the old and 
new license servers.

ITS has also migrated its license servers to handle matlab 8.2
and above and their names are slightly different from before.

****************************
Short Summary
****************************
The following apply to CNS and ITS matlab license servers.
  - For matlab 8.2 and above, you must use a "new" matlab license server.
  - For matlab 8.1 and below, you may use an old or new matlab license server.
  - For the new NYU ITS matlab license servers and for general information
    regarding matlab here, see
    www.cns.nyu.edu/sys/#september6-2012

December 10, 2013

Matlab support map for macOS / Linux / Windows

2/10/2024


matlab 9.16-2024a 12.6 and up - Intel & ARM *** Monterey and forward
matlab 9.15-2023b 12.6 and up - Intel & ARM *** Monterey and forward
matlab 9.14-2023a 11.6 and up - Intel *** Big Sur and forward
matlab 9.13-2022b 11.6 and up - Intel *** Big Sur and forward

matlab 9.12-2022a 10.15 and up - Intel *** Catalina and forward
matlab 9.11-2021b 10.15 and up - Intel *** Catalina and forward
matlab 9.9-2020b  10.14 and up - Intel *** Mojave and forward
matlab 9.7-2019b  10.13 and up - Intel *** High Sierra + Mojave
matlab 9.6-2019a  10.12 and up - Intel *** Sierra + High Sierra + Mojave
matlab 9.5-2018b  10.12 and up - Intel *** Sierra + High Sierra + Mojave
matlab 9.4-2018a  10.11 and up - Intel *** El Capitan + Sierra + High Sierra
matlab 9.3-2017b  10.11 and up - Intel *** El Capitan + Sierra + High Sierra
matlab 9.2-2017a  10.10 and up - Intel *** Yosemite + El Capitan + Sierra
matlab 9.1-2016b  10.10 and up - Intel *** Yosemite + El Capitan + Sierra
matlab 9.0-2016a  10.10 and up - Intel *** Yosemite + El Capitan
matlab 8.6 (2015b)  10.9 and up - Intel *** Mavericks + Yosemite + El Capitan
matlab 8.5 (2015a)  10.9 and up - Intel *** Mavericks + Yosemite
matlab 8.4 (2014b)  10.7 and up - Intel *** Lion + ML + Mavericks + Yosemite (64bit)
matlab 8.3 (2014a)  10.7 and up - Intel *** Lion + ML + Mavericks (64bit)
matlab 8.2 (2013b)  10.7 and up - Intel *** Lion + ML + Mavericks (64bit)
matlab 8.1 (2013a)  10.7 and up - Intel *** Lion + ML + Mavericks (64bit)
matlab 8.0 (2012b)  10.6 and up - Intel Macs ONLY *** SL + Lion + ML (64bit)
matlab 7.14 (2012a)  10.6 and up - Intel Macs ONLY *** SL + Lion (64bit)
matlab 7.13 (2011b)  10.6 and up - Intel Macs ONLY *** SL + Lion (64bit)
matlab 7.12 (2011a)  10.6 and up - Intel Macs ONLY *** SL + Lion (64bit)
matlab 7.11 (2010b)  10.5.5 and up - Intel Macs ONLY *** L + SL (64bit)
matlab 7.10 (2010a)  10.5.5 and up - Intel Macs ONLY *** L + SL (32/64)
matlab 7.9 (2009b)   10.5.5 and up - Intel Macs ONLY *** L + SL (32/64)
matlab 7.8 (2009a)   10.5.5 and up - Intel Macs ONLY *** L + SL (32bit only)

matlab 7.7 (2008b)   10.4.8 and up - Intel Macs ONLY
matlab 7.6 (2008a)   10.4.8 and up - Intel Macs ONLY

matlab 7.5 (R2007b)   10.4.8 and up - Intel & PPC (G4 and up)


For a support map of all Matlab platforms, see the URLs here.
    Reference for matlab system requirements
    Matlab Platform road map

November 11, 2013

Lock screen menu item

To easily lock your screen, put a Keychain lock in your menu as follows.

Do  /Applications/Utilities/Keychain Access > Preferences > General tab > 
click on "Show Status in Menu Bar".

November 10, 2013

To set the startup disk for OS X

To set the startup disk from the commandline, do as root,
  # bless -mount /Volumes/name-of-startup-disk -setBoot

November 5, 2013

[NOTICE] EOL for Matlab 7.13 (R2011b) - November 16, 2013

We would like to set  November 16, 2013 (Saturday)   
as a tentative EOL (End of Life) date for our Matlab 7.13. 

The EOL will mean that we will no longer distribute 7.13 from
our shared area i.e. it will be archived and taken offline
from our server.  You will also no longer be able to call matlab7.13
to invoke this version of matlab.  Our network license servers will 
continue to distribute licenses for it as long as the license servers
and licenses we obtain from Mathworks will support it.  

Matlab support map for OS X/Linux/Windows

November 2, 2013

Gatekeeper and unidentified Apps

In Mountain Lion and forward, you won't be able to launch apps that
are from unidentified developers.  If you know an unidentified app
is safe, the best way to override the Gatekeeper is to do a right click
on the app and select Open.  You will get a dialog that asks whether
you are sure you want to open it - if yes, click on "Open".  You 
only to do this once for this app.

You could completely disable the Gatekeeper though this would be insecure.
You do this in System Preferences > Security.  If you must do this,
we would suggest you only do it temporarily.
 
For more details, see
support.apple.com/kb/PH11436
support.apple.com/kb/HT5290?viewlocale=en_US&locale=en_US

November 1, 2013

Apple man pages

You can find the full Apple man pages at
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/.

This may be useful if you want to peruse all the commands.

Here are a few useful OS X commands that are infrequently used.
See their respective manpage for the appropriate syntax.

Set search domain and other network parameters.
  # networksetup  

Set gatekeeper parameters.
  # spctl

Application firewall command.
  # /usr/libexec/ApplicationFirewall/socketfilterfw

Set boot disk.
  # bless

Get system info.
  # system_profiler -detailLevel mini

October 30, 2013

Major OS upgrades for desktop machines not allowed

This is a reminder of our long-standing policy that 
regular users should not carry out major upgrades of
operating systems on unix desktop machines (Mac and Linux) 
on the Meyer network.   

Our main concerns are that our security measures
are not compromised by such an upgrade and that 
the stability of user applications are not degraded.

If you need a major unix OS upgrade on your desktop machine, 
please email 
             systems@cns.nyu.edu.

Please also email us if you would like to request an 
exemption to the above policy.

We are persuaded to issue this reminder in part because
Apple's App Store is now aggressively prompting users
to install the free upgrade to Mavericks / Yosemite (10.9/10.10).

October 28, 2013

Last non-App Store versions of iWork 09 and iLife 11

Here is the recipe to updating your iWork 09 and iLife 11 to the
last non-App Store version.  These are all
compatible with Mavericks to Snow Leopard.

From a iWork 09 installation, install the iWork 9.3 update.  This
will update the suite to Keynote 5.3, Numbers 2.3 and Pages 4.3.

From a iLife 11 installation, install the iPhoto 9.1 update and then the
iPhoto 9.4.3 update.  For iMovie, install the iMovie 9.0.9 update and
for iWeb, install the iWeb 3.0.4 update.

You can find the above packages at /share/Public/ApplePackages/  
in addition to the Apple support site.

September 25, 2013

Time Machine hard reset

The Apple Time Machine (TM) works fine for the most part. If you run
into some unknown issues with TM, a quick remedy to try is to do a
hard reset of TM.

 - Turn off TM.
 - Remove /Library/Preferences/com.apple.TimeMachine.plist.
 - Restart computer.
 - Turn TM on again - you may have to chose the desired TM disk.

Here is a site devoted to TM.

  http://pondini.org/TM/Troubleshooting.html

July 19, 2013

Java in flux

In the recent months, there have been numerous Java security alerts.
If you have Java installed, it is crucial to keep it up-to-date.
You can obtain Java downloads (JDK and JRE) for all supported platforms at

    http://www.oracle.com/technetwork/java/javase/downloads/ 

For Mac only Java packages, it is probably easier to go to

    http://java.com/en/download/

Oracle have by now stopped patching Java 6.  However, under OS X, 
Matlab will only run under Java 6.  To obtain a fully patched version 
of Java 6, you have to go to Apple's support site.  You can also
install it from our shared area as root.

# cd /share/Public/ApplePackages/LION/
# installer -pkg JavaForOSX.pkg -target /

On the Mac, if you have installed Java 7, you may want to
remove it for now rather than having to maintain both Java 6 and 
Java 7.   To remove Java 7, remove the following folders and files, but 
you will have to reinstall Java 6.

  /System/Library/Frameworks/JavaVM.framework
  /System/Library/Frameworks/JavaFrameEmbedding.framework
  /System/Library/Java
  /Library/Application Support/Oracle
  /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  /Library/Java
  /Library/PreferencePanes/JavaControlPanel.prefPane
  /usr/bin/*java*

To save your Oracle Java receipts just in case, do
# cd /var/db/receipts/
# mkdir oracle-receipts
# mv com.oracle.j* oracle-receipts/

July 9, 2013

Well known Apple ports (TCP and UDP)

Here is a list of TCP and UDP ports used by Apple.

http://support.apple.com/kb/TS1629

June 15, 2013

Linux - disk thrashing

There is a bug with some versions of Linux that will 
after a while cause a severe amount of disk thrashing.
To fix, at least temporarily, do as root
 
# pkill -HUP gvfsd-metadata

April 2, 2013

[NOTICE] EOL for Matlab 7.5 (R2007b) - April 20, 2013

We would like to set  April 20, 2013 (Saturday)   
as a tentative EOL (End of Life) date for our Matlab 7.5. 

The EOL will mean that we will no longer distribute 7.5 from
our shared area i.e. it will be archived and taken offline
from our server.  Our network license server will continue
to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

The main reason we still had this very old version of Matlab
was that this version was the last Matlab that supported PPC Macs.

Please let us know as soon as possible if the above timeline
will pose a problem for you or if you have concerns regarding
this EOL timeline.

Matlab support map for OS X/Linux/Windows

March 15, 2013

Matlab incompatible with newer Xcode

For Matlab 7.12 through 8.0, there may be compatibility issues
with newer Xcode - specifically with the compilers that comes
with more recent Xcode distributions.

For patches from mathworks, see
http://www.mathworks.com/support/solutions/en/data/1-FR6LXJ/

March 5, 2013

Matlab parallel toolbox bug

After some recent Java security updates (early 2013), some java
bugs showed up under parallel toolbox in matlab.  This affect
all platforms Matlab support.

The mathwork fix is to simply replace the 
/toolbox/distcomp/private/initcommon.m
file.   You can find a working version at

  /share/erda/matlab/toolbox/distcomp/private/

This is for the present default version of matlab.
For other versions of matlab, go to the appropriate
matlab folder under  /share/erda/.

If you prefer to download the mathworks patch, simply go to

http://www.mathworks.com/support/bugreports/919688

February 26, 2013

Java Downloads

To obtain the current Java (Runtime Environment and JDK) for all
supported platforms (Linux, OS X, Solaris, Windows), go to
http://www.oracle.com/technetwork/java/javase/downloads/index.html 

To download the Java Runtime for your desktop, go to
http://java.com/en/download/ 

February 18, 2013

Resetting the SMC

If your Mac hardware system is behaving erratically, you may
need to reset its System Management Controller (SMC).  See the
following Apple support doc for the correct procedure for your
hardware.

http://support.apple.com/kb/HT3964

February 10, 2013

XProtect.plist

Apple updates its "malware definitions" via the following
two plist files  XProtect.meta.plist  and XProtect.plist.
They are located in the folder 
/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

**** 2012 ****

November 30, 2012 : psychtoolbox

Psychtoolbox

Psychtoolbox works with 64-Bit versions of Matlab on all systems and 
with 64-Bit Octave on Linux and OSX, as of september 2012.

To use Psychtoolbox, you just need to have Psychtoolbox visible
from your computer and then set your matlab paths to include
everything underneath that folder.

We have a recent copy of Psychtoolbox in our shared area
/share/erda/toolbox/.  You may want to copy it to your local disk
say for example to the folder  /Applications/  though it could
go anywhere you can write to.

To get matlab to recognize all the PT functions, just add
the following lines to the file  ~/Documents/MATLAB/startup.m. 
Modify appropriately for the location of your PT folder.

%% Assuming you have Psychtoolbox installed at  
%%   /Applications/Psychtoolbox
%% then to make matlab recognize all its functions, you do
addpath(genpath('/Applications/Psychtoolbox'))

If you want you may now download the current Psychtoolbox via the
following command.

svn checkout https://github.com/Psychtoolbox-3/Psychtoolbox-3/branches/beta/Psychtoolbox Psychtoolbox

To download an earlier version, say 3.0.10  you do

svn checkout https://github.com/Psychtoolbox-3/Psychtoolbox-3/branches/Psychtoolbox-3.0.10 Psychtoolbox


November 12, 2012 : debug-wireless

Debugging NYU wireless for macOS

If on your Mac laptop, it appears that you have authenticated successfully
to the wireless network named  nyu  but you still cannot get onto
the internet, then chances are the problem is with the NYU wireless
certificate.   The following should fix the problem.

If you are getting a lot of drop connections while others are not,
you may want to try the steps below to clear all remnants of your old
nyu  wireless setup and start over.

1. Open "System Preferences" and click on "Network Preferences"
   a. Click on "Wi-Fi" in left-hand column
   b. Click "Turn Wi-Fi Off"
   c. Click "Advanced"
   d. Under "Preferred Networks" remove any reference to "nyu", then click "Ok"

2. Open "Keychain Access" from /Applications/Utilities/
   a. search for "rad.nyu.edu", this is the NYU wireless certificate
   b. remove this certificate by highlighting then deleting it, this will
      require your system password
   c. close "Keychain Access"

3. Return to "Network Preferences"
   a. Turn Wi-Fi on.
   b. select "nyu" from list of available networks
   c. type your netid and password and wait for the  "Verify Certificate"
      dialog box
   d. when the "Verify Certificate" window pops up be sure to click
      "Continue", this will require your system password

*** IMPORTANT ***
If you do not get a popup window asking you to verify the "nyu" certificate
you should repeat this process.

October 27, 2012

Default matlab is 8.0 (R2012b) (MLM 28)

Per our message from  9/16/2012,  this is to confirm that 
matlab  (/share/erda/bin/matlab)  and  /share/Applications/MATLAB.app  
will now invoke Matlab 8.0 (aka R2012b) for the appropriate 
unix platform ( Linux / Mac OS X ).

Our Matlab distributions presently consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 8)
    matlab7.14  (this will invoke Matlab version 7.14)
    matlab7.13  (this will invoke Matlab version 7.13)
    matlab7.10  (this will invoke Matlab version 7.10)
    matlab7.5   (this will invoke Matlab version 7.5)
**************************************************************

http://www.cns.nyu.edu/sys/#september16-2012

October 18, 2012

Apple Preview application

Apple's Preview app have many of the commonly used features ascribed 
to Acrobat.   Here are some articles describing some of them.

Macworld article from 2012

Macworld article from 2011

Macworld article from 2008

Apple Preview hints

Preview in Mountain Lion

October 9, 2012

Apple video tutorials

Here are a bunch of Apple produced videos on various aspects
of Mac OS X.

Apple Support Videos

October 8, 2012

Mounting filesystems in Finder via ssh

Here is the replacement for the google's macfuse project.

Install the osxfuse and sshfs packages from here.
Fuse for OS X

If you want a gui frontend, try the Macfusion app using
the above as backend.
MacFusion gui for sshfs

October 4, 2012

Endnote system and CWYW compatibility

Here is a chart of the Endnote system and CWYW compatibility.

Endnote compatibility chart

September 16, 2012

Matlab 8.0 available for testing

Matlab 8.0  (aka R2012b) is now available for testing for
our supported UNIX platforms (Mac OS X Intel, Linux).  Both
the OS X and Linux versions support only 64-bit mode.  

During our test phase, please use it via the command

     matlab8    (/share/erda/bin/matlab8)

For OS X users,  you may also just double click on 
/share/erda/matlab8 to launch it.

We expect the test phase for matlab 8.0 to end around October 1, 2012.
Please let us know if you notice any anomalies with it.

September 15, 2012

[NOTICE] EOL for Matlab 7.12 (R2011a) - Oct 1, 2012

As we will soon bring Matlab 8.0 online,  we would 
like to set   October 1, 2012   as a tentative EOL (End of Life) 
date for our Matlab 7.12. 

The EOL will mean that we will no longer distribute 7.12 from
our shared area i.e. it will be archived and taken offline
from our server.  Our network license server will continue
to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

Matlab support map for OS X/Linux/Windows

September 14, 2012

Flush DNS cache

If you need new DNS info to be effective immediately, you may need
flush the cached DNS data.   Do in Terminal  as root,

  killall -HUP mDNSResponder

September 13, 2012

Trouble connecting to the wireless network nyu ?

The following applies to OS X.  If you are having trouble
using the  nyu  wireless network,  try the following.

If  nyu  already exists as a network, turn on wireless
and in  System Pref > Network > wireless,  click  Advanced...  
Under the wifi tab,  delete the nyu network profile.   
Then click +  to add a wireless network providing the 
information below.

Network name:  nyu
Security:  WPA2 Enterprise
Username:   your-netid
Password:  your-NYU-pw

You may then get a pop-up asking you to
accept a certificate.  Do so and you will
be asked for an admin pw to change the
Certificate Trust Setings.   Click Apply.

You should then get a  172.26.x.x  or something
similar IP.

I suspect the problem is caused by the fact the user has
not accepted the wireless network's certificate, but the
wireless setup preference does not prompt the user to do so 
rather it just fail to allow you to connect to the network.

September 7, 2012

Matlab for CNS students

Our license (NYU site license) does not allow us to generate 
standalone licenses for students' personal machines.  However 
students can use a NYU network license.  They will have to use VPN 
when they are not connected to a NYU network.

  NYU VPN instructions

While they are at CNS, almost all of our machines have 
matlab installed.

For students that actually want matlab on a laptop or a machine 
at home, do one of the following.
 
Macs: copy a recent version of matlab app (7.14) from  
/share/Applications/  to your usb device.  In MATLAB.app/licenses/,  
rename  network.lic.nyu to network.lic  and remove all other 
license files in there.

Windows: students have to install matlab onto their machines 
themselves from an install media folder.  See the install instructions here
Matlab for Windows install.    Obtain the install media from 
/share/Public/Distros/Windows  along with the network.lic  to your 
usb device.  

Finally, students may also purchase their own copy of matlab
from the NYU computer store for $99 and it comes with 6 toolboxes.

September 6, 2012

General Matlab information

***************************************
Matlab usage
***************************************
Most of our unix systems (Macs, Linux) have matlab installed or can
access it.  They are typically using our network license servers
to acquire licenses.  Computers on the NYU network or NYU VPN
can reach these license servers.

***************************************
Matlab licenses
***************************************
NYU has a site license for matlab.  What this means in practice
is that everyone on the NYU network can acquire matlab licenses.
If you are off the NYU network, you could VPN into the NYU network.
Instructions can be found here.

  Useful ITS URLs

Our matlab distributions all contain copies of the various network
license files.   Name the appropriate one for your purpose  network.lic.
Look inside one of the folders below for our network license files.

  MATLAB.app/licenses/   or   /share/erda/matlab/licenses/

As for standalone licenses, to see who qualifies for such a license
and how to obtain one, see

  Standalone matlab licenses


***************************************
Matlab application
***************************************
To install a copy of the matlab application itself, do one
of the following depending on your platform.

 **  OS X
Simply go to one of our desktop unix machines and copy the MATLAB.app
to your destination device.  In  MATLAB.app/licenses/  you will
find various network license files.  Use the appropriate one
for your purpose.  For example, to use the NYU license servers,
rename  3network.lic  to network.lic and remove all other license files
from that folder.

 **  Linux
Again from one of our desktop unix boxes, copy  /share/erda/matlab7.xx
to your destination device.  The above licensing information applies.

 **  Windows
You need to install it from the installation media which you can
obtain from   /share/Public/Distros/Windows/.  

For more details regarding the above, please consult the appropriate
file for your platform from the URL below.  The information there is for 
standalone licenses, but you can just ignore that part.

  Matlab Install Information

NOTE: If you cannot access the above shared area, please see our internal

  Internal Systems Group page




***************************************
Matlab license servers
***************************************
To obtain the license strings for the CNS license servers and
the NYU license server, please see our Internal System Group Page. 

April 16, 2012

Disabling Java on Mac Browsers

If you are using Leopard (10.5.x) or earlier, there are 
no available Java updates and Apple recommends you disable 
Java (not Javascript) in your browsers.  You may want to do
this even if your Java is updated.   In Safari, you do  
Preferences > Security > uncheck Java (not Javascript).  For the
other browsers, see

Disabling Java

April 15, 2012

Default matlab is 7.14 (R2012a) (MLM 27)

Per our message from  3/12/2012,  this is to confirm that 
matlab  (/share/erda/bin/matlab)  and  /share/Applications/MATLAB.app  
will now invoke Matlab  7.14 (aka R2012a) for the appropriate 
unix platform (Linux / Mac OS X).

Our Matlab distributions presently consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 7.14)
    matlab7.13  (this will invoke Matlab version 7.13)
    matlab7.12  (this will invoke Matlab version 7.12)
    matlab7.10  (this will invoke Matlab version 7.10)
    matlab7.5   (this will invoke Matlab version 7.5)
**************************************************************

http://www.cns.nyu.edu/sys/#march12-2012

March 15, 2012

[NOTICE] EOL for Matlab 7.11 (R2010b) - April 21, 2012

We would like to set  April 21, 2012   as a tentative 
EOL (End of Life) date for our Matlab 7.11. 

The EOL will mean that we will no longer distribute 7.11 from
our shared area i.e. it will be archived and taken offline
from our server.  Our network license server will continue
to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

We are keeping Matlab 7.10 for now, as it is the last version
that supports 32bit mode for OS X.

Matlab support map for OS X

March 12, 2012

Matlab 7.14 available for testing

Matlab 7.14  (aka R2012a) is now available for testing for
our supported UNIX platforms (Mac OS X Intel, Linux).  The
OS X version supports only 64-bit mode.  The Linux version
supports 32 and 64-bit mode.

During our test phase, please use it via the command

     matlab7.14    (/share/erda/bin/matlab7.14)

For OS X users,  /share/Applications/Unsupported/MATLAB.app
is an app bundle for matlab 7.14 (2012a).   Feel free to copy
it if you wish, though we may make changes to it during the 
test phase for 7.14.  You may also just double click on 
/share/erda/matlab7.14 to launch this matlab 7.14.

We expect the test phase for matlab 7.14 to end around March 31, 2012.
Please let us know if you notice any anomalies with it.

February 23, 2012

XQuartz X11 FAQ

The X11 distributed with Mac OS X has been from the open source
XQuartz development tree.   Starting with 10.8 (Mountain Lion) will
no longer distribute X11 with its OS.  Users will need to download the 
package from the above XQuartz site.  

XQuartz FAQ

February 19, 2012

Apple hardware product cycle guide

By looking at the historical product release cycles of a given
Apple hardware, you can make a rough estimate of its upcoming release.

See buyersguide.macrumors.com/.

February 4, 2012

Default matlab is 7.13 (R2011b) (MLM 26)

This is to confirm that matlab  (/share/erda/bin/matlab)  and  
/share/Applications/MATLAB.app  will invoke Matlab 7.13 (aka R2011b) 
for the appropriate unix platform (Linux / Mac OS X).

Our Matlab distributions presently consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 7.13)
    matlab7.12  (this will invoke Matlab version 7.12)
    matlab7.11  (this will invoke Matlab version 7.11)
    matlab7.10  (this will invoke Matlab version 7.10)
    matlab7.5   (this will invoke Matlab version 7.5)
**************************************************************

January 25, 2012

Firefox - restoring bookmarks

To restore your broken Firefox bookmarks, try the following.

Firefox > Bookmarks > Show all bookmarks.  This 
opens the Library window.   In that window, click
on the "Import and backup your bookmark" tool 
and select   Restore  and you will see the backup
bookmarks.   Firefox saves 5 to 10 of them.
For that reason, one should attempt the restore
as soon as possible or avoid using firefox to avoid
killing all the good backup bookmarks.

Mozilla knowledge base article

January 19, 2012

[NOTICE] EOL for Matlab 7.9 (R2009b) - February 4, 2012

We would like to set  February 4, 2012   as a tentative 
EOL (End of Life) date for our Matlab 7.9. 

The EOL will mean that we will no longer distribute 7.9 from
our shared area i.e. it will be archived and taken offline
from our server.  Our network license server will continue
to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

January 11, 2012

Installing CWYW support for Word

The instructions below is for Endnote X2, but should work for
any recent versions of Endnote and newer versions of Word.

To install CWYW support for Word 2008/2011. I would
suggest the following.  This will then give you CWYW support
on all of our machines in one step.

In the  <EndNote X2>/Cite While You Write/  folder,  copy
the appropriate files given below to some place in your 
home directory that makes sense such as

  ~/Library/Application Support/Microsoft/Startup/Word2008
  ~/Library/Application Support/Microsoft/Startup/Word2011

Word 2008:
EndNote CWYW Commands.dot 
EndNote Web CWYW Commands.dot 
EndNote CWYW Word 2008.bundle

Word 2011:
EndNote CWYW Word 2011.bundle

Then in   Word > Preferences > File Locations > Startup,
choose the above location.   Relaunch Word.  Now Word
should recognize Endnote.  To see whether Cite While You Write 
is correctly installed,  you should be able to see  
Word > Tools > EndNote X2. 

January 3, 2012

Using an alternate matlab license server

There could be instances where you may want to use a different
license server.  For example, if the default one is offline,
then it may appear your matlab is wedged as it will take a long
time before it will time out and go to the next license server.
In that case, you may want to chose a different license file.

The syntax for calling matlab using a specific license file is 

    matlab -c /path/to/license/file 

Typically the matlab we distribute will have 3 failover network
license files - 1network.lic  2network.lic  3network.lic.  If the
license server in 1network.lic has failed, then you could do
for example

  matlab -c /path/to/licenses/2network.lic   or

  /Applications/MATLAB.app/bin/matlab -c /Applications/MATLAB.app/licenses/2network.lic


**** 2011 ****

December 18, 2011

Useful unix commands

# From the current directory, list the sizes of the folders/files
# in decreasing order.

    du -sk * | sort -rn | more

# From the current directory, find all files/folders that were modified
# in the last 1 day.  Of course, you may replace 1 with any number you wish.

    find . -mtime -1 -ls

# Create a tarred and compressed version of a folder  foodir.
# If there are no errors running the tar command, then you may
# remove  foodir  after  foodir.tgz  has been created.

    cd to the directory holding  foodir
    tar cvzf path-to-put-my-tarball/foodir.tgz foodir

# Give my current quota status.

    quota -v myusername

December 12, 2011

Matlab 7.13 available for testing

Matlab 7.13  (aka R2011b) is now available for testing for
our supported UNIX platforms (Mac OS X Intel, Linux).  The
OS X version supports only 64-bit mode.  The Linux version
supports 32 and 64-bit mode.

During our test phase, please use it via the command

     matlab7.13    (/share/erda/bin/matlab7.11)

For OS X users,  /share/Applications/Unsupported/MATLAB.app
is an app bundle for matlab 7.13 (2011b).   Feel free to copy
it if you wish, though we may make changes to it during the 
test phase for 7.13.  You may also just double click on 
/share/erda/matlab7.13 to launch this matlab 7.13.

We expect the test phase for matlab 7.13 to end around January 20, 2012.
Please let us know if you notice any anomalies with it.

November 30, 2011

2012 Matlab licenses

Our network license server is now serving the 2012 concurrent
matlab licenses.

October 11, 2011

Bug Matlab 7.6 and below

After a mid-2011 Java update from Apple, Matlab 7.6 and below have
a tendency to crash when plotting figures and doing other similar activities.
Here is the workaround from Mathworks.

Modify the plain-text file  <matlab_root>/Contents/Matlab/bin/.matlab7rc.sh 
as follows.  In the "mac" and "maci" sections if there, the variable 
DYLD_LIBRARY_PATH=   should be nonempty and have the path given below.

if [ "$DYLD_LIBRARY_PATH" != "" ]; then
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
else
DYLD_LIBRARY_PATH=/System/Library/Frameworks/JavaVM.framework/Libraries
fi

For more details see
  www.mathworks.com/support/solutions/en/data/1-F37IJB/

If you are not sure how to make changes via a plain-text editor,
see the above link.  You should also save a copy of the .matlab7rc.sh
before modifying it.

October 1, 2011

Default matlab is 7.12 (R2011a)

This is to confirm that   matlab   (/share/erda/bin/matlab) 
will now invoke Matlab version 7.12 on all of our supported 
UNIX platforms (Mac OS X and Linux).

Our Matlab distributions currently consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 7.12)
    matlab7.11  (this will invoke Matlab version 7.11)
    matlab7.10  (this will invoke Matlab version 7.10)
    matlab7.9   (this will invoke Matlab version 7.9)
    matlab7.5   (this will invoke Matlab version 7.5)
**************************************************************

Under /share/Applications/, you will find MATLAB  which is
now version 7.12  and  MATLAB7.5.  If you need older versions
of MATLAB, please look in  /share/Applications/Legacy/.
Recall that on a PPC Mac,the latest version you can use is 
matlab version 7.5.
 

September 23, 2011

Default matlab to be 7.12

We will be making Matlab 7.12 (2011a) the default matlab
by the end of September 30.

September 7, 2011

NYU DNS servers (2011)

The DNS name servers are set automatically when you use DHCP.
In case you are not using DHCP, here are the current NYU name servers.

New NYU name servers
dns1.noc.nyu.edu 128.122.253.79
dns2.noc.nyu.edu 128.122.253.24
dns3.noc.nyu.edu 128.122.253.103
dns4.noc.nyu.edu 128.122.253.46

Using the last digit in the host portion of the device's IP address, 
we ask that sysadmins assign the primary, secondary, and tertiary 
DNS per the below scheme:

Server/Host IP (last digit): DNS server order 
xxx.xxx.xxx.xx0-2: dns1, dns2, dns3 
xxx.xxx.xxx.xx3-5: dns2, dns3, dns4 
xxx.xxx.xxx.xx6-7: dns3, dns4, dns1 
xxx.xxx.xxx.xx8-9: dns4, dns1, dns2

Legacy NYU name servers
nameserver      128.122.253.37
nameserver      128.122.253.92
nameserver      128.122.128.24

NYU DNS rebuilds at the following daily schedule.

   6 AM, 11 AM, 3 PM, 7 PM, and 11 PM.

DNS changes are usually reflected within 30 minutes
of each rebuild.

August 17, 2011

Using unix mail and Thunderbird together

Suppose you want to use a unix mail client (mail or pine)
as well as Thunderbird and you want to have just one set of saved 
mail folders.  (This is not possible with Apple Mail as it saves
the mail messages in a format not compatible with mail or pine.)

First note that Thunderbird keeps your saved mail messages in

  ~/Library/Thunderbird/Profiles/*.default/Mail/Local Folders/

Here, mail folder = one file containing a bunch of mail messagess.
In Thunderbird, each mail folder name  foo  consists of the
usual unix mail file  foo  plus a file name  foo.msf (sort of a plist file).
Each folder containing a bunch of mail folders name  foofolder 
consists of two files  foofolder and foofolder.msf  plus a directory
foofolder.sbd.

*****************************
Example
*****************************
For concreteness, let us say you have a bunch of saved unix mail
folders in  ~/mymail.  Now we want to create a Thunderbird
folder that will stay synchronized with that and we want to name it
mysavedmail.  Do the following.

  Quit Thunderbird
  cd ~/Library/Thunderbird/Profiles/*.default/Mail/Local Folders/
  ln -s ~/mymail mysavedmail.sbd
  touch mysavedmail mysavedmail.msf

That is it.  The next time you launch Thunderbird, you will
see the saved unix mail folders in ~/mymail in the Thunderbird
folder mysavedmail.  Now your unix mail programs and Thunderbird
will be operating on the the same set of files.

It is a good idea to click through all the mail folders within mysavedmail
in Thunderbird when you first set this up so that  foo.msf  are created
by Thunderbird for each mail folder f.

It is not a good idea to have Thunderbird launched and work on
your saved mail messages via unix mail at the same time.

*****************************
Notes
*****************************
    - In Thunderbird, in order to really delete messages, you have
      to do   File > Empty Trash  and  File > Compact Folders.
    - You could reverse the role of the Thunderbird mail folders and
      the unix mail folders.
    - You could do the same thing if you use Thunderbird on Linux machines.
      The Linux Thunderbird tree sits under  ~/.thunderbird   and so
      you could create another link to ~/mymail  fron under there.

August 11, 2011

Matlab 7.12 (R2011a) available for testing

Matlab 7.12  (aka R2011a) is now available for testing for
our supported UNIX platforms (Mac OS X Intel, Linux).  The
OS X version does not support 32-bit mode.  The Linux version
supports 32 and 64-bit mode.

During our test phase, please use it via the command

     matlab7.12    (/share/erda/bin/matlab7.12)

For an existing terminal,  do  rehash  before invoking
matlab7.12.

June 23, 2011

Legacy Office 2004 workaround

This note is only relevant for those of you using your
CNS home directory who are experiencing annoying bugs
with respect to some Office applications.  The following 
couple of simple steps may help.  

First, quit all your Office applications.

In the Finder, go to  ~/Library/Preferences/Microsoft/  and use the 
"Get Info" panel to make the following permission changes.

  - Make the file  Office Registration Cache 11  not readable by anyone.
  - Make the folder ~/Library/Preferences/Microsoft/  itself not writable
    by anyone.

Alternatively, you can do it from the commandline by invoking the following.

  -  cd ~/Library/Preferences/Microsoft
  -  chmod a-r "Office Registration Cache 11"
  -  chmod a-w .

The above "."  is part of the command. 

April 23, 2011

Some Unix tutorials

A beginner's guide to unix.

Unix help pages for novice unix users.

Unix guide for users with some unix background.

April 22, 2011

Turning off your RSS feeds

By default, on Macs RSS feeds are turned on and they could be
quite busy on the network.  If you are not reading RSS feeds,
please turn it off. 

To turn this off,  do  Safari > Preferences > RSS tab 
and uncheck everything  and make sure "Check for updates"
is set to Never.

March 14, 2011

LCD test

Here is a nice site on calibrating your LCD display.
LCD test site.

March 2, 2011

Inkscape - open source alternative to Illustrator

For a pretty decent alternative to Illustrator, try the open source
Inkscape which runs on Mac, Linux and Windows.  We have been installing
Inkscape on the Macs we setup at CNS.

Inkscape download and information.
Inkscape tutorials.

February 26, 2011

Default matlab is now matlab7.11

After a few weeks of testing of matlab version 7.11, 
this is to confirm that   matlab   (/share/erda/bin/matlab)
will now invoke Matlab version 7.11 on all of our supported 
UNIX platforms (Mac OS X and Linux).

Our Matlab distributions currently consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 7.11)
    matlab7.10  (this will invoke Matlab version 7.10)
    matlab7.9   (this will invoke Matlab version 7.9)
    matlab7.7   (this will invoke Matlab version 7.7)***
    matlab7.5   (this will invoke Matlab version 7.5)
**************************************************************

Under /share/Applications/, you will find MATLAB  which is
now version 7.11  and  MATLAB7.5.  Recall that on a PPC Mac,
the latest version you can use is matlab version 7.5.

January 18, 2011

Timeline for Thursday Jan 20 shutdown

Here are the time frames for the shutdown of our unix-type systems
due to the Meyer power outage on January 20. 

*** Thursday, Jan 20:
5pm---7pm    All desktop computers should be shut down *before* or *during*
                  this time frame.
6pm---7pm    All non-CNS servers will go offline and be powered down.
7pm---8:30pm All CNS server boxes will go offline and be powered down.
9pm          All Meyer networking will go offline.
> 9pm        All power for Meyer will be offline.


*** Thursday, Jan 20:
Power is "expected" to return around 10pm, but the precise time
    will not be known.
10pm-10:30pm:   Power returns to Meyer building.
10pm-10:30pm:   All network devices will start up.
10:30pm:        AC for the server room returns.

10:30pm-12am:   All server boxes and attached peripheral devices in the
                server room are expected to be booted up.
                (This cannot happen until the above are done.)
12am-1am:       Some essential clients will be booted back up after all
                the server boxes are fully operational.

January 15, 2011

Description of some CNS mailing lists

To see a description of the intended purpose of some of our
CNS mailing lists, please visit the following URL which is
only visible from inside the Meyer network.

localweb.cns.nyu.edu/cns-lists.html

January 14, 2011

[NOTICE] EOL for Matlab 7.7 (R2008b) - March 1, 2011

**** Archived and taken offline August 20, 2011.

We would like to set  March 1, 2011   as a tentative 
EOL (End of Life) date for our Matlab 7.7. 

The EOL will mean that we will no longer distribute 7.7 from
our shared area i.e. it will be archived and taken offline
from our server.  Our network license server will continue
to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

The legacy purpose served by matlab7.7 was for Intel Macs
still running Tiger (10.4.x).  The set of such machines
here still needed for running Matlab is basically fast approaching
empty.


EOL notice for Matlab 7.7.
www.cns.nyu.edu/sys/#january14-2011
EOL notice for Matlab 7.8.
www.cns.nyu.edu/sys/#july15-2010

January 13, 2011

Mounting a network drive from a PC

To map a network drive from Windows XP, see the instructions from the URL

compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm

Basically do  Windows Explorer > Tools > Map Network Drive.  Then use
the syntax  \\servername.cns.nyu.edu\path\to\share  to mount the remote
share folder.

If the above server computer uses a different username and password, click 
on the "different user name" hyperlink.

January 8, 2011

Matlab 7.11 available for testing

Matlab 7.11  (aka R2010b) is now available for testing for
our supported UNIX platforms (Mac OS X Intel, Linux).  The
OS X version does not support 32-bit mode.  The Linux version
supports 32 and 64-bit mode.

During our test phase, please use it via the command

     matlab7.11    (/share/erda/bin/matlab7.11)

For 7.11, Mathworks support says its installer wasn't quite
in production mode when it was released and so we had to put
in a wrapper script to make it behave as our users expect.

**** 2010 ****

December 15, 2010

SSH tunnel via a gateway host

Here are instructions to create and use a ssh tunnel to an internal 
CNS host (for concreteness call it internal.cns.nyu.edu) via an "open" 
gateway machine (call it gateway.cns.nyu.edu).

In principle, you could create a ssh tunnel to any port on internal.cns.
For concreteness, we will illustrate the commands with a tunnel to
port 22 (default sshd port).  For simplicity, we will assume you
have root access on the local machine.  If not, you will have to
make some minor modifications.

******************************************
Tunnel to port 22
******************************************
To create a tunnel to port 22 (sshd) on  internal.cns.nyu.edu  authenticating 
using the pw for your CNS user login (say paul) on gateway.cns.nyu.edu, 
do as root on your local machine,

# ssh -L22:internal.cns.nyu.edu:22 paul@gateway.cns.nyu.edu

Once you have given the correct pw for  paul  on gateway.cns, you would 
have  localhost = internal.cns.nyu.edu  as far as ssh-based connections are 
concerned on your local machine.

Now you can speak (ssh) directly to internal.cns.nyu.edu   via localhost.  
Note that the ssh tunnel will work for any user on internal.cns.nyu.edu,
but we will stick with the user paul for simplicity.

  o  Open a shell to internal.cns.nyu.edu for user paul.

>  ssh paul@localhost

  o  Copy the local folder foo.dir to  internal.cns.nyu.edu:/users2/paul/tmp  

>  scp -r foo.dir paul@localhost:/users2/paul/tmp

  o  Copy the remote folder foo.dir  on internal.cns.nyu.edu to
your current folder.

>  scp -r paul@localhost:/users2/paul/tmp/foo.dir .  
	("." means the current folder)

  o  Use sshfs  to mount the remote folder /users/paul  at
         /users/paul/mymount/paul.

>  sshfs paul@localhost:/users/paul /users/paul/mymount/paul \
   -oreconnect,volname=paul


NOTE:  If you do not have root privilege on your local machine, then
then you cannot forward privilege ports and so you have to use ports 
above 5000.  I normally just add 7000 to the real port.
So to create a tunnel to port 22 on internal.nyu.edu authenticating
using the pw for paul on gateway.cns.nyu.edu, we do

#  ssh -L7022:internal.cns.nyu.edu:22 paul@gateway.cns.nyu.edu

Now your ssh-based connections have to use port 7022 instead of the
default 22.  

So for example, the following will give you a shell on 
internal.cns.nyu.edu as user paul.

# ssh -p7022 paul@localhost

The following copies the given folder on internal.cns.nyu.edu
to your current directory.

# scp -P7022 -r paul@localhost:/users2/paul/tmp/foo.dir .

December 10, 2010

Replace win line breaks with unix line breaks

In vi, do the following in command mode,
:%s/^M/\r/g

The "^M" is cntrl+v cntrl+m

December 5, 2010

NYU laptop insurance

For NYU laptops i.e. laptops bought from a grant, setup fund
or departmental fund, there is NYU provided insurance. Coverage
includes not just loss from theft, but also loss caused by your
own inattention (e.g. spilling water over it or leaving it on
a train).  For additional details and contact information,
please see the following link.

  www.nyu.edu/insurance/insurance_web_site_034.htm

You should *not* install the tracking software mentioned at the
site above.  It may very well have serious security-related issues. 
ITS has thus far not vetted that software and you should stay away
from it until ITS has given the go-ahead.  You do not need that
software to file a claim.

October 30, 2010

Poster Printing on Macs

For some notes on poster printing on Macs at CNS, please see the
PDF file at the following URL.

   www.cns.nyu.edu/sys/poster/

For SfN 2016 poster information, see the page on
   Poster Presentations

October 13, 2010

Legacy Illustrator CS bug

When you see an error message from Illustrator that it does not
have memory to display your page when you do indeed have spare
memory and disk space, then check the following.

In  Illustrator > Preferences > Plug-ins & Scratch Disks, make sure
the Scratch Disks  is set to one of your local disk(s).  The default is
"Startup" which will not work because Startup refers to the Illustrator
application folder itself.  You probably do not have rights to write
in that area and you shouldn't in any case.  This is the reason
for the out of memory error message.

Due to Adobe's brilliant design, if you then use Illustrator on a
different machine, the above preference will likely revert to
"Startup" because Illustrator will not be able to find the original
local disk since most local disks have different names.

September 29, 2010

Using sshfs to mount remote disks

Using sshfs on Macs is easy and secure.  It is easy to install and easy
to use and very convenient for accessing remote disks from any where on
the internet as long as you have ssh access to the remote data hosts.  
Since it is based on ssh, it is secure and ubiquitous.

On our recent setup of desktop Macs, we have installed sshfs support.
You can use it, for example, to mount the disks of other unix boxes 
here or elsewhere on the internet.  Such mounts would appear in the 
Finder like any other remote disks.   Do  which sshfs  from Terminal
to see if it is in your paths.

You can also use sshfs on Linux systems as well when it is installed.

**************************************
Using sshfs
**************************************
There is a sshfs GUI called MacFUSION which you can download
from  http://www.macfusionapp.org/.  OS X updates have known
to break this app.

I prefer, however, to use the commandline  sshfs  which is
quite simple once you create aliases for your sshfs commands.
Here is the basic syntax.  For more options, see the sshfs web page.

  sshfs user@remote-host:/path/to/mount /my/mount/point \
       -oauto_cache,reconnect,volname=mounted-volume-name

You can make your sshfs mount onto any existing directory that you own.
In the examples below, I mount them at /users2/pfan/mymounts/janus.pfan,  
/users2/pfan/mymounts/annio.lcv.pfan, ...  

Note that you may make the mounts against any machines that has access to
the files you want.  Choose that wisely.  

**************************************
EXAMPLES (of sshfs shell aliases)
**************************************
# Choose the appropriate machine to make your sshfs mount against
# to suit your purpose.  Below janus.cns  is a gateway machine.
#
# Mount my user home directory on /users2/pfan/mymounts/janus.pfan
alias mtpfan sshfs pfan@janus.cns.nyu.edu:/users/pfan /users2/pfan/mymounts/janus.pfan -oauto_cache,reconnect,volname=janus.pfan

# Mount our shared macos folder on   /users2/pfan/mymounts/janus.shared
alias mtshared sshfs pfan@janus.cns.nyu.edu:/e/1.4/share/erda/macos /users2/pfan/mymounts/janus.shared -oauto_cache,reconnect,volname=janus.shared

# Mount my users-lcv directory on /users2/pfan/mymounts/annio.lcv.pfan
alias mtlcv sshfs pfan@annio.cns.nyu.edu:/users-lcv/pfan /users2/pfan/mymounts/annio.lcv.pfan -oauto_cache,reconnect,volname=annio.lcv.pfan

# Mount vnl archive directory on   /users2/pfan/mymounts/janus.vnl
alias mtvnl sshfs pfan@janus.cns.nyu.edu:/share/erda/Labs/vnl /users2/pfan/mymounts/janus.vnl -oauto_cache,reconnect,volname=janus.vnl

# Mount the davachilab directory on  /users2/pfan/mymounts/fmrilab.davachilab
alias mtdalab sshfs pfan@fmrilab.psych.nyu.edu:/Volumes/davachilab /users2/pfan/mymounts/fmrilab.davachilab oauto_cache,reconnect,volname=fmrilab.davachilab

**************************************
GUIfy sshfs commands
**************************************
It is possible to create a GUI of the above commands as follows.
A GUIfy version of the alias  mtpfan  above means I would do in Terminal
Shell > New Window > mtpfan  to execute the alias.

Here is how you set it up. Basically it would be a Terminal preference item.
It is actually much simplier than the instructions below would indicate.
In Terminal, do
    Terminal > Preferences > Settings   

and create a new terminal setting by clicking on the "+".  Label this  mtpfan.  
Include in this setting the following particular item which will execute 
the sshfs command below when this Terminal is selected.

Click on the  Shell tab > click on "Run command"  and put in
sshfs pfan@janus.cns.nyu.edu:/users/pfan /users2/pfan/mymounts/janus.pfan -oauto_cache,reconnect,volname=janus.pfan; echo Mounted janus.mtpfan; open /users2/pfan/mymounts/janus.pfan ; sleep 3; exit

Also under the same tab, chose  "Close if the shell exited cleanly".

Then to run the above sshfs command,  simply  do in Terminal's menu
    Shell > New Window > mtpfan

This will open a Terminal window where it will ask for the pw.
Once the pw has been authenticated, it will open a  Finder  window conveniently
at  janus.pfan   and then close down the above Terminal window.

**************************************
Unmounting it
**************************************
You can unmount a sshfs filesystem via the Finder.  If the
Finder is not cooperating, just invoke   umount .

**************************************
Installation
**************************************
You need to download
    MacFUSE-2.0.x.dmg                   
    sshfs binary

You can google macfuse or get the above from either

    /share/erda/Public/OtherPackages/MacFUSE    or
    http://www.cns.nyu.edu/sys/macfuse

Install the MacFUSE package  and  put sshfs (rename if necessary)
into your  /usr/local/bin.  Make sure  sshfs  is executable.

Once installed, a MacFUSE preference pane will appear in
System Preferences.

**************************************
References
**************************************
SSHFS Guide
http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS

Quick Start Guide
http://code.google.com/p/macfuse/wiki/QUICKER_START_GUIDE

FAQ
http://code.google.com/p/macfuse/wiki/FAQ

Download
http://code.google.com/p/macfuse/
http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS

September 15, 2010

OS X target-disk mode

Suppose you have a Mac (Mac1) and you want to quickly mount
the disk of a second Mac (Mac2), one way is to simply put
the second Mac in target-disk mode.  You do this as follows.

  Mac1 ----> Mac2 (target disk)

Shutdown Mac2 and connect a firewire cable
between them.  Start up Mac2 and hold down the
T key as soon as you hear the chime.  You may
release the T key as soon as you see a giant
firewire symbol on Mac2.  On Mac1, you will now see
Mac2 as a firewire disk.

When you are done, shutdown Mac2 using the 
power button.  When Mac2 is completely powered
down, you may then disconnect the firewire cable.

September 13, 2010

OS X keyboard shortcuts

You can find an extensive list of common OS X keyboard shortcuts at
    http://support.apple.com/kb/ht1343
  

September 7, 2010

Apple tutorials

******************************
Video-based tutorials
******************************
Apple applications
    www.apple.com/findouthow/
Science related tutorials
    www.apple.com/science/productivitylab/
Business related tips  (these are really general tips for non-beginners)
    www.apple.com/business/theater/
Creative pro related tips
    www.apple.com/pro/tips/

******************************
Text-based tutorials
******************************
Mac 101 - Getting started  (top of the URL tree for Mac 101 tutorials)
    www.apple.com/support/mac101/
Mac 101 - All Work and Play
    www.apple.com/support/mac101/work/
Mac 101 - Customize Your Mac
    www.apple.com/support/mac101/customize/

September 2, 2010

Font problems

If you are experiencing font problems under Leopard/Snow Leopard/Lion/ML,
try clearing your font cache using the instructions here.

    www.cns.nyu.edu/sys/#august30-2010

If that does not help, see if you are using some outdated
fonts from your  ~/Library/Fonts/.   Zip up (compress)
that font folder and remove the original.  Clear your
font cache per instruction above.  Then test your documents.
If this fixes your font problems and if appropriate you can 
try "carefully" put back the fonts you really need.

August 30, 2010

Clearing font cache

To clear your font cache under Leopard/Snow Leopard/Lion/ML,
quit all your applications and then launch Terminal and do
      atsutil databases -removeUser

Then you should restart your font server.
      atsutil server -shutdown
      atsutil server -ping

Wait a few seconds and see if your problem is still there.
If yes, log out and log back in.

If you want to clear the font cache for all users
on a given machine, then do
       sudo atsutil databases -remove

August 27, 2010

Launching matlab in 32-bit mode

********************************
GUI (OS X)
********************************
From the GUI, you select the matlab icon and in the Get Info
panel, you can click on  "Open in 32 Bit Mode".

********************************
Commandline (OS X)
********************************
If you run matlab from the commandline via

  matlab -maci

it will start up the 32bit version of matlab and
for the 64bit version, it is

  matlab -maci64

If you have a 64bit 7.x application bundle in /Applications,
then you do

  /Applications/MATLAB.app/bin/matlab -maci

You may want to create a shell alias for that if you
have do this often.

********************************
Commandline (Linux)
********************************
To execute matlab in 32bit mode,  do

  matlab -glnx86

To start matlab in 64bit mode if it is not already the
default mode, then you do

  matlab -glnxa64

********************************
Windows
********************************
The Windows installer will detect the system architecture and install 
the apppropriate version of matlab for your machine.   If you want
the 32bit version of matlab on your 64bit machine that you execute
/bin/win32/setup.exe


August 12, 2010

Some useful NYU URLs and ITS URLs

o NYU Email settings
      www.nyu.edu/its/email/
o NYU ITS support
      Email  askits@nyu.edu
      ITS support form:  www.nyu.edu/its/askits/contactus/
      ITS How To's reference:  www.nyu.edu/its/askits/
o NYU ITS home page
o Creating NYU wikis
      www.nyu.edu/its/wiki/
o NYU wireless configuration
      www.nyu.edu/its/wireless/configure/
o NYU VPN configuration
      www.nyu.edu/its/nyunet/offcampus/vpn/
o NYU software page
o NYU Endnote page
o NYU HPC Wiki
      wikis.nyu.edu/display/NYUHPC/

August 5, 2010 : matlabpaths

Modify matlab paths and startup behavior

Each version/install of matlab stores its default set of paths
in a file named  pathdef.m  within its distribution folder.
It is NOT good practice to modify this system-level file.  To modify
matlab paths or its startup behavior for your sessions of matlab, do the 
following instead.

On all supported unix systems, matlab will by default add the
following folder to your matlab paths at launch time and
execute the  startup.m  in it no matter where you launch
matlab from.

   ~/Documents/MATLAB/

Currently  ~/matlab/   will also work, but Mathworks is pushing
for people to use the former.   On Windows, it would be  Documents\MATLAB\
or  My Documents\MATLAB\   depending on the version.
 
So to modify your matlab paths and startup behavior, simply add the
appropriate matlab commands in  ~/Documents/MATLAB/startup.m.  Here are
some sample commands to put in startup.m.

EXAMPLES:
%%   add everything directly underneath my own matlab codes
addpath ~/projects/mytoolbox
%%   add everything recursively underneath a Psychtoolbox install
addpath(genpath('/Applications/Psychtoolbox'))
%%   add everything directly underneath mgl
addpath /share/erda/toolbox/mgl
% add everything directly underneath matlabPyrTools
addpath /share/erda/toolbox/matlabPyrTools
% add everything directly underneath AFNI
addpath /share/erda/heegerlab/AFNI
% to add to your javaclasspath
javaclasspath('/Applications/Psychtoolbox/PsychJava')
%%   Always start the command tool in my matlab project folder
cd ~/projects/mytoolbox

If you must save out a pathdef.m  file, try using the savepath function to 
specify a folder you own to save it to.

August 4, 2010

OS X fixing a network printer

The steps below should almost always fix a printing problem unless
the printer itself has hardware issues.  Launch System Preferences > Printer
and try the following in the order given.

  - Clear the printer queue of the problematic printer.
  - If that does not work, delete the printer and reset it up 
    following the instructions below.

You do need to have printer admin privilege to do the above.

August 3, 2010

OS X network printer setup

As a general rule, if your machine does not recognize your printer,
try using a "nearby" printer driver.  It will usually work just fine.
Avoid installing third-party or vendor drivers if at all possible.

***********************************
Lion -> El Capitan
***********************************
Basically the same as for Snow Leopard below.

***********************************
Snow Leopard
***********************************
Must be in  lpadmin  group to do this.
  - System Preferences > Print & Fax or Print & Scan > Click "+" .
       o Click on IP tab.
       o For Protocol, select  Line Printer Daemon - LPD.
       o In Printer's Address, put the DNS hostname.
         When you have entered a valid address,  the GUI will say 
         "Valid and complete address.".  It is strongly
          advised that you use a DNS hostname and not the IP.
       o For Print Using, select the model of your printer.  If your model is
         not listed, simply select a "nearby" printer.  If it is a recent
         printer, the appropriate model will be automatically selected.
       o Click the  Add  button.

***********************************
Leopard
***********************************
Must be in  lpadmin  group to do this.
  - System Preferences > Print & Fax > Click "+" .
       o Click on IP tab.
       o In Printer's Address, put either the DNS hostname or NIS hostname 
          (Default DNS hostname will look like 809hp1320.cns.nyu.edu and
          default NIS name looks like  p809 or color809  where 809 is the
          location of the printer.)  When you have entered a valid address,
          the GUI will say "Valid and complete address.".  It is strongly
          advised that you use a DNS hostname and not the IP.
       o For Print Using, select the model of your printer.  If your model is
         not listed, simply select a "nearby" printer.  If it is a recent
         printer, the appropriate model will be automatically selected.
       o Click the  Add  button.
************************
Tiger
************************
  - Launch /Applications/Utilities/Printer Setup Utility.
  - Click the  Add icon.
  - For Protocol, select  Line Printer Daemon - LPD.
      o In Printer's Address, put either the DNS hostname or NIS hostname 
        (Default DNS hostname will look like 809hp1320.cns.nyu.edu and
        default NIS name looks like  p809 or color809  where 809 is the
        location of the printer.)  When you have entered a valid address,
        the GUI will say "Valid and complete address.".  It is strongly
          advised that you use a hostname and not the IP.
       o For Print Using, select the model of your printer.  If your model is
         not listed, simply select a "nearby" printer.  If it is a recent
         printer, the appropriate model will be automatically selected.
      o Click the  Add button.

July 15, 2010

[NOTICE] EOL for Matlab 7.8 (R2009a) - August 1, 2010

**** Archived and taken offline September 10, 2010.

We would like to set  August 1, 2010   as a tentative 
EOL (End of Life) date for Matlab 7.8. 

The EOL will mean that we will no longer distribute 7.8 from
our shared area i.e. it will be archived and taken offline
from our server.  Our network license server will continue
to distribute licenses for it as long as the license server
and licenses we obtain from Mathworks will support it.  

After August 1, our distributions will consist of the following.
**************************************************************
    matlab      (this will invoke Matlab version 7.10)
    matlab7.9   (this will invoke Matlab version 7.9)
    matlab7.7   (this will invoke Matlab version 7.7)
    matlab7.5   (this will invoke Matlab version 7.5)
**************************************************************

Remarks:
The latest Matlab that Tiger can use is matlab7.7 and the latest
Matlab PPC Macs can use is matlab7.5.  Also note that matlab7.9
and above will run, by default, in 64-bit mode.  If you have
codes that only support 32-bit, please see my note on changing
this behavior ( http://www.cns.nyu.edu/sys/#august27-2010 ).

July 10, 2010

Safari's "+" tool

If you find the  "+" (add bookmark) attached to the address bar
in Safari to be useless and annoying, you can remove it as follows.

Safari > Customize Toolbar > drag the "+" tool to the Safari
toolbar.  This will decouple the "+" tool from the address bar.
Now drag out the "+" tool from the toolbar.


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 Systems Group                        systems@cns.nyu.edu
 Client and Server Systems            https://www.cns.nyu.edu/sys/
 macOS, Linux, and Oracle Solaris     https://localweb.cns.nyu.edu/sys/

www.cns.nyu.edu/sys/