February 2016 update: Recently, TOS pushed an update out that moved from Java 1.7 to Java 1.8. This has corrected most, if not all, problems outlined below. I do not think the information below is still needed, but will leave it here in case it helps someone now or in the future.
ThinkOrSwim (TOS) on Linux!
Please check the date you are reading this - because TOS makes frequent changes, the information I'm providing here may not work for you.
I'm currently running TOS on three (3) different platforms: Ubuntu 14.04, Windows 7 (on VirtualBox in Ubuntu 14.04), and on LinuxMint 17.02.
All are working, although the Windows version is, by far, working the best. There just doesn't appear to be much interest from TOS in making this a quality experience on a Linux based machine!
I'm not going to detail any installation on Windows - the TOS installation is fine.
Instead, these are are my 'notes' from installing on LinuxMint - it was the same as on Ubuntu.
- from a terminal, verify the version of Java you are running, using the command
The response to this on my machine is: "build 1.7.0-88-b15".
The main thing here is that it must be version 1.7.......! TOS will not work with 1.8..... or newer! If you aren't running version 1.7, then you will need to resolve this before you go any further. In my case, it took me a while to resolve, but ultimately I ended up (first) verifying I didn't have any applications using Java 1.8, (next) I uninstalled Java 1.8, then I obtained Java 1.7 from Oracle and installed it.
The following assumes you running 1.7...!
- pull the Linux distribution down from TOS website. Specify the Ubuntu/Debian version.
- save it to your download folder.
- run the TOS install, being sure to install for just yourself, not for all users (this is very critical) at the popup window. We won't be launching via the desktop icon, so there's no need to let it install this. Instead, we will be launching from via a terminal shell command.
- once installed, you'll have to make some mandatory edits to some of your TOS files.
- the first edit change is associated with the amount of memory that can be used by the Java Virtual Machine. It comes preconfigured with a really low value. So, we're going to change this. I'm using a starting value of 1024 MBytes, and a max value of 2048 MBytes. That means TOS will start with a minimum of 1.024 GBytes of memory allocated, and can consume up to 2.048 GBytes. Make sure you have enough memory to support those values, or set to your own system capabilities!
- in terminal, enter: cd #to make sure we are starting at your home directory
- in terminal, enter: cd thinkorswim
- in terminal, enter: cp thinkorswim.vmoptions thinkorswim.vmoptions.bak #to make a backup copy you can revert to if needed.
- in terminal, enter: gedit thinkorswim.vmptions
- in gedit, find the line: -Xmx<>m , and change the value to -Xmx2048m # I no longer know what my original values were, but seems like it was 512m
- in gedit, find the line: -Xms<>m , and change the value to -Xms1024m #remember - adjust these values so as not to exceed the amount of free memory you have available, or else you will start swapping, and the system will be too unresponsive for you to use at that point.
- exit and save from gedit.
- the next edit change is associated with changing the TOS shell script that launches TOS. It's located in the same directory you were in above (~/thinkorswim). So, you are going to gedit the directory/file ~/thinkorswim/thinkorswim
- in terminal, find out where the Java executable is located, by issuing the following command in the terminal: whereis java
- my response to this contains multiple fields, separated by 'space'. The installation on my machine makes use of file links, so I'm going to show you how mine resolved. The first field response to 'whereis java' is the important field. On my machine, it begins with /usr/bin/java
-- Steps to see linkage:
-- in terminal, enter: ls -al /usr/bin/java #responds /usr/bin/java -> /etc/alternatives/java
-- in terminal, enter: ls -al /etc/alternatives/java #responds /etc/alternatives/java -> /usr/lib/jvm/java-7-oracle/jre/bin/java
--this is the actual location of the file. You should be able to use any of these values in your thinkorswim shell script, but if you have problems, use the last one - the actual file and location.
- Verify this on your system! If it doesn't resolve to Java version 7, then you can't use it. I haven't tested it, but even if you have a Java version 8 installed, if you point to this final location of Java 7, then it probably should work.
- in terminal, enter: cp thinkorswim thinkorswim.bak #making a backup copy you can revert to if needed.
- in terminal, enter: gedit thinkorswim
- in gedit, find the line: #INSTALL4J_JAVA_HOME_OVERRIDE
- you are going to remove the comment (#) character, so do that!
- next, you will need to enter (assuming you are going to use the final location from above), or the links (if they are all set up properly): /usr/lib/jvm/java-7-oracle/jre/bin/java
- Your line should look like this:
(unless you used your verified link /usr/bin/java instead. Note that these links can change if Java updates to 1.8 or newer on you at some point, so a good reason to use the hard coded version until TOS ever gets around to upgrading their JVM version reliance.)
- At this point, the changes required to get going should be complete.
- However, this would not work correctly on either my Ubuntu system, nor my LinuxMint system, if I used the desktop launcher for TOS. However, if I opened a terminal, and from the ~/thinkorswim directory entered:
then my system would work correctly. If I did it from the launcher, it may work for a while, then crash, or not work at all......no idea what the issue was.
The TOS system on my Linux based machines are not as robust nor as reliable as running on Windows, even though it is running inside of a VirtualBox instance on the Ubuntu machine! However, it does work. I use it on the LinuxMint node to display some graphs, while on the Ubuntu/VirtualBox/Windows node I do my trading, with a total of 4 monitors - 2 on Ubuntu/VirtualBox/Windows, and 2 on LinuxMint.
Hope this helps!!!