This is what I did to get txmt links orking using RubyMine on Ubuntu. I've tested it with Chrome and Firefox.
in /usr/local/bin/openInMine or other common executable location. You'll need to change your #! to reflect where ruby is found. use something like the one I've got if you are using RVM
Execute these two command. change the ruby script name and/or location as needed