Today, I tackled ThinkOrSwim, which I use for options trading. This isn't in any repositories, so I had to log into my account at TD Ameritrade (ThinkOrSwim's new owner), and go to their download page. It automatically detected I was on Linux, and gave me a handy link to click to download "thinkorswim_installer.sh". Then it was a simple matter of giving that script execute permission and running it, and I was off to the races.
$ chmod u+x thinkorswim_installer.sh
$ ./thinkorswim_installer.sh
But there were a couple of little wrinkles. The default install location is /usr/local/thinkorswim, but a normal user doesn't have write access to that directory. So it's important to change it to be somewhere the user has access to - in this case, I chose /home/mark/thinkorswim. You might think that simply installing it with "sudo" is the right answer, but no. Do that, and it refuses to run for a non-root user. The Java-based installer also fails to create any icons (known as launchers in Linux) in KDE, so it needs some manual assistance.
I remember when I installed ThinkOrSwim on my Gnome-based Ubuntu desktop, it managed to create a launcher on the desktop, so it must be that KDE confuses it somehow. First, I looked around in the /home/mark/thinkorswim directory to see if anything looked helpful. What I was looking for was, at the least, a guess at what the command is to launch it, or at most, a pre-made launcher that just needs to be put somewhere useful.
In the thinkorswim subdirectory, I found a couple of useful files:
- An executable script called "thinkorswim" (go figure) that prepped and ran the Java Virtual Machine (JVM) with the right parameters to launch ThinkOrSwim
- A little textfile called "thinkorswim.desktop" that had some configuration options that looked like they might be for a launcher:
[Desktop Entry]If I knew KDE a little better, I'm guessing I could just copy this thinkorswim.desktop file somewhere and have it magically show up in the right place in the menus. Since I don't, I'll just use the GUI menu editing utility to put the information in manually. I added a new menu group called Finance, and created a new item under it called Think Or Swim. Then I entered the information from the "desktop" file to the menu editor, as shown below:
Type=Application
Name=thinkorswim
Exec=/bin/sh "/home/mark/thinkorswim/thinkorswim"
Icon=/home/mark/thinkorswim/.install4j/thinkorswim.png
Categories=Application;
After hitting "Save", my new group and icon for Think Or Swim showed up just as I wanted them to.
One down, nine to go!
No comments:
Post a Comment