Tuesday, March 26, 2013

How to run PEAKS Studio/Viewer on Mac OS X or Linux?

Occasionally, we are asked by users whether PEAKS can run on Mac OS X or Linux. PEAKS is written in Java, theoretically it should work. This post will show the steps you need to do to make PEAKS run a Mac OS X. The steps needed should be very similar to make PEAKS work on Linux.

Disclaimer: PEAKS does not officially support any OS other than Windows as of the time I am writing the post. The software may not be fully functional. Activating the software on OS X or Linux will consume the license, which means the same license can not be used again. I strongly recommend only following the steps to configure PEAKS Viewer (the unlicensed Studio) on OS X or Linux for PEAKS result sharing and presentation purposes.

Before you start

PEAKS is a Java program. So before porting PEAKS to Mac, we will make sure that Java is installed. Open a terminal window and type in the command:
java -version
If Java is installed, the version information will be displayed. In OS X Mountain Lion, if Java is not installed, this command will also trigger a window for Java installation.

Get the files

Since PEAKS only have the installer for Windows, you will need a Windows computer to install PEAKS and copy the installed files over to Mac.

To proceed, download PEAKS from the website on a Windows PC. Run the installer, follow the on screen instructions to complete the installation. By default, PEAKS 6 will be installed on C:\PeaksStudio6 directory. Copy the directory to a USB drive and copy it to Mac OS X, e.g. /Users/userx/PeaksStudio6.

Configure PEAKS on OS X

Open a Terminal window and change the directory to the PEAKS directory, for example, /Users/userx/PeaksStudio6, by typing the command:
cd /Users/userx/PeaksStudio6
We need to replace the Windows version JRE with the one installed in OS X:
rm -r -f jre
mkdir jre
cd jre
mkdir bin
cd bin
ln -s /usr/bin/java java.exe
cd /Users/userx/PeaksStudio6
We want to make sure PEAKS starts in one JVM (type the following on one line with a white space after ".jar"):
jre/bin/java.exe -cp peaksstudio.jar com.bsi.tools.computenodenumber.PerformanceConfigDialog
In the performance configuration dialog, select "Manually configure PEAKS performance" option and make sure that the "Start Client Separately" and "Start Compute Node Separately" checkboxes are unchecked. Click "Apply" and close the dialog.

Use a text editor, e.g. vim, to create the start up script peaks.sh:
jre/bin/java.exe -Xmx12000m -splash:splash.png -jar peaksstudio.jar
The number 12000 means that PEAKS can use up to 12GB of RAM. You can change this value based on your computer configuration, but a higher amount is always preferred.

We need to make the script executable:
chmod u+x peaks.sh
Now you can start PEAKS by simply run the script:
There are one more thing to do. When PEAKS is opened, go to Preferences. In the "General" section, change the default project folder to a correct directory in OS X.

Now you can view your PEAKS results on a Mac!


  1. I have installed Peaks6 using this tutorial and it worked perfectly. I have now tried to do the same for Peaks7, and although it loads correctly when I try and open a project I can only load the DENOVO tab. PEAKS, PEAKS PTM and SPIDER will not load. What can I do?

    1. Thank you for the comments. I also noticed the same issue but did not get a chance to dig into it yet. I will post on the blog if I get a workaround.