IB TWS and LINUX

Discussion in 'Interactive Brokers' started by someguy, Dec 1, 2001.

  1. someguy

    someguy

    I hope this helps out all those who would rather not use windows. Why, that's another message board.

    We all know that LINUX is a kernel running with various tools, not a specific distro, so this should be valid for all LINUX installs.

    First thing you have to do is get the Java Plugin installed properly. There is plenty of documentation about doing that. This is the hardest part of the whole deal. If you try to log into the Trader Workstation and your browser dies and the JVM gets killed unexpectedly check your install of the Java Plugin, hey, go to www.mbquart.com and click on mobile audio, I bet the same thing happens.

    The easiest way to do this is to install Netscape 6.1 or higher. This version of Netscape comes with Sun's Java 2 environment, and installs it correctly. Straight off the bat the TWS will work after the install of Netscape 6.1.

    There are issues with Mozilla/Geko browsers. Due to limitations in the HTML engine(geko) they do not validate the security certificate properly, you will not be able to access the Account Access portion of IB's website with this browser. Use 4.xx or something for this. You will also not be able to view the Java script menu on the left of their homepage . Again use 4.xx for this. (Netscape 6.1 is Mozilla 0.9.2, I believe so there are no mix ups, higher versions of Netscape 6.x = higher versions of Mozilla 0.9.x, obviously)

    Here is one quirk. I have tried this with about 8 different window managers. I believe, do to a function of X, you need to do some acrobatics to get the right clicking to work. I have not tried this with KDE because if I wanted something proprietary and bloated I would have been using Windows. Anyhew, to get the right click menu, here is what you have to do, this has been the case with all window managers I've tried; right click and hold down the right mouse button, don't let go. Left click once to get rid of the drag event, just left click, doesn't matter where you are. Now that you can move the highlight around with the right mouse button down, what ever you highlight and release the right mouse button over will be selected.

    That's about it. With this you should be able to use the Trader Workstation under LINUX. I am writing this message using my Sun so Solaris is next. Will let you know when I find out more.

    some guy
     
  2. orb

    orb

    I've found about the same thing. It runs fine on netscape 6. What I really want to do is get the standalone TWS working on linux. It shouldn't
    be a problem to download the jar directly. I installed on my wife's m$ machine and the invocation is trivial. I just haven't had the initiative yet
    to do it. The autoupdate portion wouldn't work but then at least it would be free from browser restrictions. In case any IB people see this - please please please have an option to download the standalone as something
    other than a windows EXE file. It drives me crazy.

    As for problems, I have had the same mouse problem - except I solve it by hitting a key on the keyboard.

    Another problem I've had is the way the code tries to explicitlty write
    to C:\ so I get a bunch of files with "C:\" at the beginning of them
    in my home directory. (my solution is to wrapper netscape with a script
    that changes to some subdirectory before starting the browser, so that the files will get written elsewhere.
     
  3. someguy

    someguy

    I think until IB releases an "open" version of TWS we aren't allowed to decompile the jar for our own needs. The Web based works fine for me.

    guy
     
  4. someguy

    someguy

    But, and sorry I am taking up another post, that would be kick ass if they did.

    guy

    PS. You may be able to grab the applet from ~/java_plugin_AppletStore but I doubt it will run without a recompile on your machine.
     
  5. orb

    orb

    I think you are missing the point - the standalone program on windows IS a java program distributes in one big jar file. The problem is that they distribute the whole package in an installer that is a windows EXE...

    Since we were talking about it, I just tried it and it actually runs fine. I just copied the jts directory from windows to unix and started up with "java -jar ~/jts/jts.jar ~/jts" . I'm not able to log in now, but I can't seem to be able to long in through the web browser applet right now either... It looks ok though...

    Unfortunately the updater is an exe which downloads a new self extracting exe and unpacks it. If they would alternatively distribute a tar file or somethign then we could trivially write our own updater.

    I like the idea of extension modules too. I'd love to be able write trading or analysis plug ins. Hey IB - you guys looking for senior java architects? I'd love to help you design this... :)
     
  6. orb

    orb

    I've been running TWS as a standalone java program this morning
    and the mouse issues that are normally there when running as an applet
    are gone. The right mouse works beautifully. Definately give it a shot!
     
  7. orb

    orb

    Ok. Here are some simple instructions for running JTS on linux w/o
    using the java plugin.

    1 - make a jts directory

    % mkdir ~/jts

    2 - download jts.jar

    % lynx -source http://www.interactivebrokers.com/java/classes/jts.jar > ~/jts/jts.jar

    Note - you can also pull jts.jar out of your applet cache if you have already used the applet. Also note, you will need to re-execute the
    above whenever a new version of the trading code is started

    3 - create jts.ini


    % cat > ~/jts/jts.ini << END
    [Communication]
    Peer=gw1.ibllc.com:4000
    Localport=0

    [Configuration]
    Pages=Local
    Preferences=Local
    Execution=Local

    END


    4 - invoke the code

    % java -jar ~/jts/jts.jar ~/jts

    That's all you need to do. If you've already have pages defined
    from running the applet, you can copy those over by hand. If anyone needs help, let me know. I've only been running like this a couple of days. I haven't noticed any problems. (unless you consider "running faster" and "not needing to click on 100 web pages to start it" problems :)
     
  8. someguy

    someguy

    THAT, was my point.

    You can obtain the applet from the applet store.

    Just simply rename

    ~/java_plugin_AppletStore/1.3.1/jar/jts.jar-15374586297.4.0.33276219744998225729.jar
    to jts.jar and follow the previously posted instructions.

    The fact that the web based version of the TWS is a full Java application, was the point I was trying to get accross. Thank you for posting it more clearly. :)
     
  9. someguy

    someguy

    I forgot to add, thanks for the lynx hint it makes life much easier, didn't think of that one.