University of California at Berkeley Department of Electrical Engineering & Computer Sciences Instructional Support Group /share/b/pub/mac.help /share/b/pub/macos.help Apr 15 2013 CONTENTS: Macintosh Computers in EECS Instructional Labs Copying Files Between PCs and Macs Finding Application Programs Working with XCode Working with the iPhone STK Reading .dfg Files Accessing EECS UNIX files from the EECS Macs Accessing EECS Windows files from the EECS Macs Accessing EECS UNIX files from your Mac Microsoft Word and the Library/Fonts Folder Printing from the EECS Macs Forcing Safari to not cache files in your Home Folder Terminal Commands to open the cdrom tray: MacOS Tips MacOSX Tips for CS3 (thanks to Nathan Spindel) Macintosh Computers in EECS Instructional Labs ---------------------------------------------- 30 MacPros (Intel x86 cpus) are in 200 Sutardja Dai Hall. 8 Mac G5s (PowerPC cpus) are in 349 Soda Hall. Software installed includes X11 Preview (Adobe Acrobat Reader) Gimp (open source image editing software) CHUD Microsoft Office for MacOSX Maya and Alias Xcode Please see http://inst.eecs.berkeley.edu/clients for a list of computers, login and cardkey access information and maps of the rooms. Copying Files Between PCs and Macs ---------------------------------- The Instructional UNIX and MacOSX computers share the same password and home directory, but the Windows computers use an independent password and home directory. So you may find that you have a file in your UNIX/MacOSX home directory that you would like to access from your Windows account, or vice versa. On each operating system, you can connect to the home directory of the other so that you can transfer files by dragging them between winodows. If you are on a Windows system: 1) Logon to your Windows account 2) Open the Start\Run window, enter "cmd" and click OK. 3) In the black command prompt window, type: net use X: \\mamba\%USERNAME% /user:eecs\%USERNAME% /p:yes When prompted for a password, enter your Windows password. This assumes that you have the same USERNAME on the UNIX systems as on the Windows systems. If you are on a MacOSX system: 1) Logon to your MacOS account (using your UNIX logon/password). (Image: /share/b/pub/jpg/macos1.jpg) 2) In the Finder, click on the "Go" menu and click on "Connect to Server" or press the Command and "k" keys. (You are in the Finder application if the "Finder" menu is listed along the top of the screen. If you are not in the Finder, you can start it by clicking on its icon in the Dock, which is a smiley face in a blue box along the bottom of the screen.) (Image: /share/b/pub/jpg/macos2.jpg) 3) Type "smb://fileservice/class_name", where class_name is your class (such as "cs39j" or "cs294-7"). (Image: /share/b/pub/jpg/macos3.jpg) 4) Enter "EECS" for the Domain and your Windows user name and password. Click on "Add to Favorites" so it appears automatically the next time. (Image: /share/b/pub/jpg/macos4.jpg) 5) An icon with your class name appears on the desktop. Click on it. In the window that appears, click on the semester folder ("fa02" or etc) and click on the folder with your login name on it. That is your Windows home directory. (Image: /share/b/pub/jpg/macos5.jpg) 6) To open a window with your UNIX/MacOS files, click on the disk drive icon with the local computer name on it and click on "Home". (Image: /share/b/pub/jpg/macos5.jpg) 7) CS294-7 students can also connect to the group shared directory by connecting to "smb://mamba/cs294-7" in step 3 above (enter Domain "EECS" and your Windows login and password if prompted). In the window that appears, click on the "public_html" folder, then the "group-share" folder to get to the group shared directory. If you are on a UNIX system: You can transfer files to and from your Windows home directory using the Samba "smbclient" command. For an example, see http://inst.eecs.berkeley.edu/connecting.html#file_transfers (UNIX to Windows). You could also use the CD-RW, the ZIP drives, Firewire drives (such as a Mac booted in Target mode), USB Drives or Memory Sticks on the Macs and PCs in 199 Cory, 330 Soda or 349 Soda and on the Solaris PCs in 275 Soda to transfer files to the removeable media. Finding Application Programs ---------------------------- Some application programs are referenced as icons on the "Dock", a bar at the bottom of the MacOSX sreen. Placing the mouse pointer on an icon displays the name of the application. Other application programs can be found in a directory listing by clicking on "Applications" in any directory window. (Image: /share/b/pub/jpg/macos6.jpg) The "fink list" command lists all sofware packages that have been installed. /Applications/FinkCommander/FinkCommander lists all sofware packages from http://fink.sourceforge.net/ and shows the ones that have been installed. (Sep 2005) On our Macs, the program /usr/sww/bin/AbiWord will read Microsoft Word Files. To run it: Start X11: /Applications/Utilities/X11 open an 'xterm' In the xterm, type /usr/sww/bin/AbiWord& (July 2004) Microsoft Office for MacOSX is licensed for UC Berkeley-owned computers, including the Instructional student labs. EECS funds this via a campus site license agreement. (July 2004) NeoOffice/J (www.neooffice.org) is a port of Sun's StarOffice productivity suite to Mac OS X. While it's described as a prototype, in fact it's quite stable. Among other things, it reads and writes Microsoft Office format files. Working with XCode ------------------ Xcode does not like to save files to an NFS mounted drive (such as the home directories on our systems). Students must create a local folder and copy it between the Mac and the user home directory. They should remember to copy the files to their home directories when they are done so that they get the same files when the move to a different system. Also, under Snow Leopard (MacOSX 10.6), XCode users need to be added to the _developer group. The sys admins ("inst@eecs.berkeley.edu") will do this for all of the accounts in a class. Working with the iPhone STK --------------------------- The iPhone Simulator is typically installed in /Developer/STK on the Macs in 200 Sutardja-Dai Hall. It runs only on Intel-based Macs (i.e., not on our older PowerPC-based Mac G5s). The iPhone Simulator has to write some files to disk before it can launch, and it can't write them to NFS-mounted drives. The networked user home drives on the Instructional systems are NFS-mounted drives. So you need to create a symlink called "Iphone Simulator" in your home directory to a directory in /tmp (which is on the local Mac computer drive) so that files are written to the local hard drive. For example, in a command line window, type these commands: mkdir /Users/Shared/$USER ln -s /Users/Shared/$USER "$HOME/Iphone Simulator" Don't forget to copy your files from the /Users/Shared/$USER directory back to your $HOME directory before you logout. The files in /Users/Shared could be deleted after you have logged out. Here is the CS160 wiki page with more info on the iPhone simulator problem and some links: http://vis.berkeley.edu/courses/cs160-sp10/wiki/index.php/How_to_fix_the_iPhone_development_environment_in_the_Orchard_Mac_Lab It appears that you can register for an iPhone Developer account for Apple App Store for free if it's for instructional purposes: https://developer.apple.com/programs/ios/university/ Reading .dfg Files ------------------ MacOSX files that end in .dmg" are disk image files. At a Mac worskation console, you can access the contents simply by clicking on the file icon. At the MacOSX commmand line (such as if you are logged in using 'ssh'), you can access the contents by connecting to the dmg like a disk drive, with the commands % hdiutil attach "An Example.dmg" /dev/disk1 /Volumes/An Example % ls "/Volumes/An Example" Accessing EECS UNIX files from the EECS Macs -------------------------------------------- If you just want to share files between UNIX and MacOS systems, you can just store them in your home directory. The same home directory that you get on the Instuctional UNIX systems is your MacOSX home directory. If you want to execute programs on UNIX, open a Terminal window, type "ssh" and login to an Instructional UNIX computer (such as cory.eecs.berkeley.edu). For example, if you have the login 'jdoe' on the computer cory.eecs, type "ssh cory.eecs -l jdoe". If you want to run programs on UNIX that will pop up XWindows windows on the Mac: Start X11: /Applications/Utilities/X11 open an 'xterm' In the xterm, type ssh cory.eecs -X -l jdoe Accessing EECS Windows files from the EECS Macs ----------------------------------------------- If you just want to share files between Windows and MacOS systems, you can connect to a Windows home directory from a Mac or to a UNIX/MacOSX home directory from Windows using the steps described above in "Copying Files Between PCs and Macs". If you want to execute programs on Windows, you have to login to a Windows system (if you have an account). There is no way to start a command shell on our Windows systems from another computer. Accessing EECS UNIX files from your Mac --------------------------------------- Pre-Mac0S X users can run Ssh (/share/b/pub/ssh.help) to login to UNIX systems and MacX (/share/b/pub/macx.help) to display XWindows graphics. MacOSX users can run Ssh (/share/b/pub/ssh.help) to login to UNIX systems. Printing from the EECS Macs --------------------------- Start Print Center: /Applications/Utilities/"Print Center" Add Printer Choose in 1st selection Bar: IP Printing Choose Printer Type: LPD/LPR Choose Printer Address: iprint.eecs.berkeley.edu Choose Queue Name: lw349, lw199 or lw105 You can have 1 printer definition for each printer Once you choose a default printer, You can print to it from a terminal window using regular unix commands, such as: enscript -r -f Courier28 File Microsoft Word and the Library/Fonts Folder ------------------------------------------- To avoid filling your Library/Fonts Folder, which counts against your quota: In a Terminal Window: cd Library/ rm -rf Fonts ln -s /Applications/"Microsoft Office 2004"/Office/Fonts Fonts Forcing Safari to not cache files in your Home Folder ---------------------------------------------------- Since all the macs are running the squid proxy server, which caches web files to the local disk, you don't need browser caching. Use /Applications/"Safari Enhancer" to disable the cache, which would count against your quota. Terminal Commands to open the cdrom tray: ----------------------------------------- drutil tray open drutil tray eject MacOS Tips ---------- Symptom: "I get the error message 'unknown parameter "xterm-color"' when I ssh from a Mac to a UNIX system and run an XWindows command." Solution: Type "setenv TERM xterm" when you log to the UNIX system. Or, on the Mac, go to the Terminal App "Preferences" window and select a different kind of term. Special keyboard function: <3> = screen image to picture#.tif file in home dir = switch amongst open applications = on a folder name, opens folder in a new window = quit the current application <.> = quit the current application