MacNotes

From UABgrid Documentation
(Difference between revisions)
Jump to: navigation, search
(Configurations)
(Useful Links: add link to mac automator tool)
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Mac OS user notes ==
+
[[Media:[[Media:Example.ogg]]]]== Mac OS user notes ==
 +
 
 +
=== Open Source Software ===
 +
'''* [http://www.macports.org MacPorts]: Tool to access and install open-source software on the Mac OS X operating system.'''
 +
# [http://svn.macports.org/repository/macports/downloads/MacPorts-1.7.1/MacPorts-1.7.1-10.5-Leopard.dmg Install MacPorts for Mac OS X 10.5 (Leopard)]
 +
# [https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20414 Install Xcode] -  integrated development environment for creating great Mac and iPhone applications. You would need an Apple Developer Connection (ADC) id, which can be created from the above link and then can download Xcode for free.
 +
Refer [http://guide.macports.org/#installing here] for further details on installing MacPorts.
 +
 
 +
Similar to '''yum/apt-get''', '''port''' is the command used to interact with MacPorts. Common port commands are:
 +
port list
 +
port search <search-text>
 +
port info <app-name> 
 +
port install <app-name>
 +
 
 +
More port commands can be found with
 +
 
 +
man 1 port
 +
 
 +
'''* [http://www.freesmug.org/ FreeSoftware Mac User Group]: Tutorials, info, and news about free and open source Mac software.'''
  
 
=== Software Install ===
 
=== Software Install ===
 
* '''Microsoft Office 200'''8: Download ISO from [http://www.uab.edu/it/software/index.php UAB IT software library]. The Mac OS X is able to do installation directly from an ISO file.  
 
* '''Microsoft Office 200'''8: Download ISO from [http://www.uab.edu/it/software/index.php UAB IT software library]. The Mac OS X is able to do installation directly from an ISO file.  
* '''Mozilla Firefox''': Download and install Firefox from the [http://www.mozilla.com/en-US/firefox/firefox.html Mozilla website]
+
==== Mozilla ====
 +
* '''Firefox''': Download and install Firefox from the [http://www.mozilla.com/en-US/firefox/firefox.html Mozilla website]
 +
* '''Thunderbird''': Download and Install Thunderbird from [http://www.mozillamessaging.com/en-US/thunderbird/ here].
 +
 
 +
===== Mailbox Alert Add-on to Thunderbird =====
 +
 
 +
By default, Thunderbird on Mac does not provide a pop up for new messages. To get pop-ups from thunderbird, every time you get a new message, [https://addons.mozilla.org/en-US/thunderbird/addon/2610 install this Mailbox Alert Add-on]. After installing the add-on,
 +
# Select a folder in your account
 +
# Go to Tools -> Mailbox Alert Preferences
 +
# Check '''Show a message''' and type in a message in the second blank text field
 +
# Check icon
 +
# Check Play a sound
 +
# Click Global Preferences and change Position, Effect, Pop up duration On click options to your liking.
 +
Now you will get a pop up and the folder with the new message will be highlighted in blue with the number of new messages in parentheses beside the folder.
 +
 
 +
===== Notification system: Growl =====
 +
I installed growl on my mac, which is a notification system for Mac. I found it quite useful for getting new email notification. It can be configured to give other system notifications as well. For more info.:  http://growl.info/about.php
 +
 
 +
===== Daily notebook / journaling system: Journler =====
 +
The 'journler' seems to be good application for taking and organizing notes. It also supports publishing to a blog and posting as an email. It has a keyboard shortcut for inserting date/time, which I find really useful in text editors. For more info.:  http://journler.com/
 +
 
 +
===== Terminal application: iTerm =====
 +
iTerm is an external terminal emulation program for Mac. It supports tabbed browsing and naming tabs is easy. We can bookmark our most frequently used sessions. I found it much better than native Mac's terminal program. For more info.: http://iterm.sourceforge.net/
 +
 
 +
 
 +
===== MIME Edit Add-on to Thunderbird =====
 +
 
 +
To open file attachments of type *.doc, *.pdf etc., from Thunderbird, [https://addons.mozilla.org/en-US/thunderbird/addon/4498  install this MIME Edit Add-on]. After installing the Add-on,
 +
# Go to menu Tools->MIME Edit...
 +
# Go to Edit tab and click "New Type" button
 +
# In "MIME type" and "Extension" textfields, type "PDF".
 +
# Select the radiobutton "Open it with" and choose the path of acroread application by clicking the 'Choose' button.
 +
# Click OK on all open dialogs and restart Thunderbird.
 +
 
 +
==== Image Editor ====
 +
 
 +
* GNU Image Manipulation Program (GIMP) is a powerful tool for the preparation and manipulation of digital images. The GIMP provides the user with a wide variety of image manipulation, painting, processing, and rendering tools.
 +
* Homepage:    http://www.gimp.org/
 +
* Install Gimp on Mac OS 10.5 with MacPorts (make sure you [http://docs.uabgrid.uab.edu/wiki/MacNotes#Open_Source_Software install MacPorts first]) as follows:
 +
 
 +
sudo port install gimp2
 +
 
 +
NOTE: Takes quite a while to get started the first time the port install is run (~3-5m) and then some more to first download and install the dependencies like curl, perl etc. The list of gimp dependencies are:
 +
$ port deps gimp2
 +
gimp2 has build dependencies on:
 +
pkgconfig
 +
intltool
 +
p5-xml-parser
 +
gimp2 has library dependencies on:
 +
iso-codes
 +
gegl
 +
gtk2
 +
libmng
 +
libexif
 +
aalib
 +
librsvg
 +
poppler
 +
gnome-vfs
 +
libgnomeui
 +
curl
 +
libwmf
 +
lcms
 +
dbus-glib
 +
py25-gtk
  
 
=== Configurations ===  
 
=== Configurations ===  
 
* LDAP for address book: Check [http://main.uab.edu/Sites/it/faqs/49036 UAB IT FAQ page] for LDAP configuration settings.  
 
* LDAP for address book: Check [http://main.uab.edu/Sites/it/faqs/49036 UAB IT FAQ page] for LDAP configuration settings.  
 +
 +
=== MySQL ===
 +
 +
==== References ====
 +
* [http://developer.apple.com/internet/opensource/osdb.html MySQL on Mac OS X]
 +
* [http://www.malisphoto.com/tips/mysql-on-os-x.html Compling and Editing MSQL5 on Mac OS X 10.6]
 +
* [http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html MySQL ref Manual - Installing MySQL on Mac OS X]
 +
 +
=== Eclipse ===
 +
 +
Installing Eclipse on Mac is a no-brainer. Configuring is a bit tricky, especially, if you dont know your way around Mac.
 +
 +
To configure Eclipse with increased JVM heap size, so that you dont get '''OutOfMemoryError'''
 +
 +
# Edit '''eclipse.ini''' inside the Eclipse application bundle, to pass arguments to Eclipse
 +
#  select the Eclipse application bundle icon while holding down the Control Key. This will present you with a popup menu.
 +
# select "Show Package Contents" in the popup menu. Locate eclipse.ini file in the Contents/MacOS subfolder and open it with your favorite text editor to edit the command line options.
 +
# the options for increasing the JVM heap size are:
 +
<pre>
 +
-vmargs
 +
-Xms128m
 +
-Xmx512m
 +
-XX:MaxPermSize=128m
 +
</pre>
 +
 +
==== References ====
 +
* [http://blog.xam.dk/?p=58 Max's blog Eclipse and Memory Settings]
 +
* [http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm IBM's Running Eclipse]
 +
 +
=== Java -1.5 ===
 +
 +
Mac OS X 10.5 (leopard) and 10.6 (snow leopard) are installed with only Java-1.6. For applications requiring Java-1.5 (like caGrid apps - catissue etc), download Apple's version of Java-1.5
 +
 +
* [http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_7 Java for Mac OS X 10.5 update 7]
 +
 +
==== References ====
 +
 +
[http://chxor.chxo.com/post/183013153/installing-java-1-5-on-snow-leopard Installing Java-1.5 on snow leopard]
 +
 +
 +
 +
=== JBoss 4.2.2.GA ===
 +
 +
Starting the Jboss container on Mac OS X (10.6) results in the following error
 +
<pre>
 +
./bin/run.sh: line 89: ulimit: open files: cannot modify limit: Invalid argument
 +
</pre>
 +
 +
JBoss forum has [https://jira.jboss.org/jira/browse/JBAS-4948 a thread] on the above error. Provided in the thread is patch ( not the attachment) in the last email (dated 03-29-2010). This patch sets the variable ''MAX_FD_LIMIT'' in case of a ''darwin'' based system with ''sysctl'' command instead of ''ulimit''. The complete and a more current patch is as follows:
 +
<pre>
 +
--- run.sh.orig 2010-04-16 12:50:20.000000000 -0500
 +
+++ run.sh      2010-04-16 12:51:32.000000000 -0500
 +
@@ -78,8 +78,11 @@
 +
export JBOSS_HOME
 +
 +
# Increase the maximum file descriptors if we can
 +
-if [ "$cygwin" = "false" ]; then
 +
+if [ "$darwin" = "false" ]; then
 +
    MAX_FD_LIMIT=`ulimit -H -n`
 +
+else
 +
+    MAX_FD_LIMIT=`sysctl -n kern.maxfilesperproc`
 +
+fi
 +
    if [ $? -eq 0 ]; then
 +
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
 +
            # use the system max
 +
@@ -93,7 +96,6 @@
 +
    else
 +
        warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
 +
    fi
 +
-fi
 +
 +
# Setup the JVM
 +
if [ "x$JAVA" = "x" ]; then
 +
</pre>
 +
 +
Save the above as ''patch.txt'' and apply the patch to Jboss startup script (run.sh) as follows:
 +
<pre>
 +
cd $JBOSS_HOME/bin
 +
 +
patch -b run.sh < patch.txt
 +
</pre>
 +
 +
=== Create ''pidof'' command ===
 +
''pidof'' utility does not exist in Mac OS X. Create one as follows:
 +
<pre>
 +
#!/bin/sh
 +
ps axc|awk "{if (\$5==\"$1\") print \$1}";
 +
</pre>
 +
 +
Save the above in '''/bin/pidof'''. Change permissions
 +
 +
<pre>
 +
chmod 755 /bin/pidof
 +
</pre>
 +
 +
To list the process id, run the command with a service/app name, for eg.,
 +
 +
<pre>
 +
pidof iTunes
 +
</pre>
 +
 +
Reference: http://www.macosxhints.com/article.php?story=20030618114543169
  
 
=== Useful Links ===  
 
=== Useful Links ===  
 
* [http://support.apple.com/kb/HT1343 Mac OS X keyboard shortcuts]
 
* [http://support.apple.com/kb/HT1343 Mac OS X keyboard shortcuts]
 +
* A very useful tool is the '''Automator''' in mac - http://support.apple.com/kb/ht2488
 +
 +
=== Tips for getting Mac-friendly or otherwise ===
 +
* '''Disable auto unzipping of Safari downloaded zip file''': Safari automatically unzips downloaded zip file. You can disable it by Safari-Preferences -> General tab -> Uncheck 'Open safe files after downloading' . Also note that Safari/Mac does not show any window/prompt/status when the download starts.
 +
* '''Changing Terminal window title''': echo -n -e "\033]0; <your-title> \007"
 +
*  '''Home/End keys''': When editing text, Home/End keys on Mac keyboard function differently than on Windows,  i.e., when trying to traverse from one end of a sentence to the other. You should instead use the following:
 +
** To get to the end of the sentence, use Command+Left Arrow
 +
** To get to the beginning of the sentence, use Command+Right Arrow
 +
* '''Print screen''':
 +
** Whole screen - Command+Shift+3
 +
** Select screen area - Command+Shift+4
 +
** Also can make use of the [http://eduscapes.com/tap/topic7.htm#1 Mac Grab Utility]

Latest revision as of 17:33, 26 July 2011

[[Media:Media:Example.ogg]]== Mac OS user notes ==

Contents

[edit] Open Source Software

* MacPorts: Tool to access and install open-source software on the Mac OS X operating system.

  1. Install MacPorts for Mac OS X 10.5 (Leopard)
  2. Install Xcode - integrated development environment for creating great Mac and iPhone applications. You would need an Apple Developer Connection (ADC) id, which can be created from the above link and then can download Xcode for free.

Refer here for further details on installing MacPorts.

Similar to yum/apt-get, port is the command used to interact with MacPorts. Common port commands are:

port list
port search <search-text>
port info <app-name>  
port install <app-name>

More port commands can be found with

man 1 port

* FreeSoftware Mac User Group: Tutorials, info, and news about free and open source Mac software.

[edit] Software Install

  • Microsoft Office 2008: Download ISO from UAB IT software library. The Mac OS X is able to do installation directly from an ISO file.

[edit] Mozilla

  • Firefox: Download and install Firefox from the Mozilla website
  • Thunderbird: Download and Install Thunderbird from here.
[edit] Mailbox Alert Add-on to Thunderbird

By default, Thunderbird on Mac does not provide a pop up for new messages. To get pop-ups from thunderbird, every time you get a new message, install this Mailbox Alert Add-on. After installing the add-on,

  1. Select a folder in your account
  2. Go to Tools -> Mailbox Alert Preferences
  3. Check Show a message and type in a message in the second blank text field
  4. Check icon
  5. Check Play a sound
  6. Click Global Preferences and change Position, Effect, Pop up duration On click options to your liking.

Now you will get a pop up and the folder with the new message will be highlighted in blue with the number of new messages in parentheses beside the folder.

[edit] Notification system: Growl

I installed growl on my mac, which is a notification system for Mac. I found it quite useful for getting new email notification. It can be configured to give other system notifications as well. For more info.: http://growl.info/about.php

[edit] Daily notebook / journaling system: Journler

The 'journler' seems to be good application for taking and organizing notes. It also supports publishing to a blog and posting as an email. It has a keyboard shortcut for inserting date/time, which I find really useful in text editors. For more info.: http://journler.com/

[edit] Terminal application: iTerm

iTerm is an external terminal emulation program for Mac. It supports tabbed browsing and naming tabs is easy. We can bookmark our most frequently used sessions. I found it much better than native Mac's terminal program. For more info.: http://iterm.sourceforge.net/


[edit] MIME Edit Add-on to Thunderbird

To open file attachments of type *.doc, *.pdf etc., from Thunderbird, install this MIME Edit Add-on. After installing the Add-on,

  1. Go to menu Tools->MIME Edit...
  2. Go to Edit tab and click "New Type" button
  3. In "MIME type" and "Extension" textfields, type "PDF".
  4. Select the radiobutton "Open it with" and choose the path of acroread application by clicking the 'Choose' button.
  5. Click OK on all open dialogs and restart Thunderbird.

[edit] Image Editor

  • GNU Image Manipulation Program (GIMP) is a powerful tool for the preparation and manipulation of digital images. The GIMP provides the user with a wide variety of image manipulation, painting, processing, and rendering tools.
  • Homepage: http://www.gimp.org/
  • Install Gimp on Mac OS 10.5 with MacPorts (make sure you install MacPorts first) as follows:
sudo port install gimp2

NOTE: Takes quite a while to get started the first time the port install is run (~3-5m) and then some more to first download and install the dependencies like curl, perl etc. The list of gimp dependencies are:

$ port deps gimp2
gimp2 has build dependencies on:
pkgconfig
intltool
p5-xml-parser
gimp2 has library dependencies on:
iso-codes
gegl
gtk2
libmng
libexif
aalib
librsvg
poppler
gnome-vfs
libgnomeui
curl
libwmf
lcms
dbus-glib
py25-gtk

[edit] Configurations

  • LDAP for address book: Check UAB IT FAQ page for LDAP configuration settings.

[edit] MySQL

[edit] References

[edit] Eclipse

Installing Eclipse on Mac is a no-brainer. Configuring is a bit tricky, especially, if you dont know your way around Mac.

To configure Eclipse with increased JVM heap size, so that you dont get OutOfMemoryError

  1. Edit eclipse.ini inside the Eclipse application bundle, to pass arguments to Eclipse
  2. select the Eclipse application bundle icon while holding down the Control Key. This will present you with a popup menu.
  3. select "Show Package Contents" in the popup menu. Locate eclipse.ini file in the Contents/MacOS subfolder and open it with your favorite text editor to edit the command line options.
  4. the options for increasing the JVM heap size are:
-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=128m

[edit] References

[edit] Java -1.5

Mac OS X 10.5 (leopard) and 10.6 (snow leopard) are installed with only Java-1.6. For applications requiring Java-1.5 (like caGrid apps - catissue etc), download Apple's version of Java-1.5

* Java for Mac OS X 10.5 update 7

[edit] References

Installing Java-1.5 on snow leopard


[edit] JBoss 4.2.2.GA

Starting the Jboss container on Mac OS X (10.6) results in the following error

./bin/run.sh: line 89: ulimit: open files: cannot modify limit: Invalid argument

JBoss forum has a thread on the above error. Provided in the thread is patch ( not the attachment) in the last email (dated 03-29-2010). This patch sets the variable MAX_FD_LIMIT in case of a darwin based system with sysctl command instead of ulimit. The complete and a more current patch is as follows:

--- run.sh.orig 2010-04-16 12:50:20.000000000 -0500
+++ run.sh      2010-04-16 12:51:32.000000000 -0500
@@ -78,8 +78,11 @@
 export JBOSS_HOME
 
 # Increase the maximum file descriptors if we can
-if [ "$cygwin" = "false" ]; then
+if [ "$darwin" = "false" ]; then
     MAX_FD_LIMIT=`ulimit -H -n`
+else
+    MAX_FD_LIMIT=`sysctl -n kern.maxfilesperproc`
+fi
     if [ $? -eq 0 ]; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
            # use the system max
@@ -93,7 +96,6 @@
     else
        warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
     fi
-fi
 
 # Setup the JVM
 if [ "x$JAVA" = "x" ]; then

Save the above as patch.txt and apply the patch to Jboss startup script (run.sh) as follows:

cd $JBOSS_HOME/bin

patch -b run.sh < patch.txt

[edit] Create pidof command

pidof utility does not exist in Mac OS X. Create one as follows:

#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}";

Save the above in /bin/pidof. Change permissions

chmod 755 /bin/pidof 

To list the process id, run the command with a service/app name, for eg.,

pidof iTunes

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

[edit] Useful Links

[edit] Tips for getting Mac-friendly or otherwise

  • Disable auto unzipping of Safari downloaded zip file: Safari automatically unzips downloaded zip file. You can disable it by Safari-Preferences -> General tab -> Uncheck 'Open safe files after downloading' . Also note that Safari/Mac does not show any window/prompt/status when the download starts.
  • Changing Terminal window title: echo -n -e "\033]0; <your-title> \007"
  • Home/End keys: When editing text, Home/End keys on Mac keyboard function differently than on Windows, i.e., when trying to traverse from one end of a sentence to the other. You should instead use the following:
    • To get to the end of the sentence, use Command+Left Arrow
    • To get to the beginning of the sentence, use Command+Right Arrow
  • Print screen:
    • Whole screen - Command+Shift+3
    • Select screen area - Command+Shift+4
    • Also can make use of the Mac Grab Utility
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox