¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Settings storage location


 

¿ªÔÆÌåÓý

It used to be the case that you could specify, on the TWS login form, where to store the settings. In fact the field is still there on the dialog, but it¡¯s disabled.

?

A while ago I came across something that explained how to change that now, but I can¡¯t remember what it said, and I can¡¯t find it again.

?

So can anyone please tell me how to manually set the settings location (and I don¡¯t mean the File | Save settings¡­ menu entry or anything like that).

?

Of course I realise that you can tell IBC where to save the settings, but I¡¯m talking about manually logging on to TWS.

?

Richard

?


 

I was unable to find a "Global Configuration" menu as well, Richard. So I took a quick look (on Linux) at the "tws" shell script that starts my TWS.

At the end of the scrip, when it assembles the final Java VM command line, it adds the definition "-DjtsConfigDir=\${installer:jtsConfigDir}" that seems to hard-wire the settings folder. I added a "/lalala" for fun and that shows up right in the greyed out folder dialog on the login screen.

So I guess you'd need to fiddle with the startup script to modify that folder.

´³¨¹°ù²µ±ð²Ô

PS. While looking into this I stumbled over the fact that tws.xml and ibg.xml are now encrypted as well. At least in 10.17


 

FYI, here're some switches that can be passed to tws (at least on Linux):

tws -J-DinstallDir=path1 -J-DjtsConfigDir=path2 username=yourusername password=yourpassword

where:

path1: folder containing the /jars directory, typically ~/Jts

path2: folder containing jts.ini, launcher.log and the user session directory

username and password are self explanatory and useful for auto login.

path2 can also be passed alone as in: tws path2 username=...

The -J-Dxxx=... switches are simply forwarded to the java command line as -Dxxx=...

And yes, it'a bummer but IB recently switched to encrypted configuration files. Unencrypted files can still be read and exported from TWS under Diagnostics or, from 10.18, under Help->Troubleshooting


 

¿ªÔÆÌåÓý

Thanks very much for that. I remember now it was this -DjtsConfigDir Java command line option that I saw before, but I still don¡¯t recall where. Actually I think where I saw it was in the tws.vmoptions file, which of course is equivalent to including it in the Java command line. Perhaps in some Docker file for IBC?

?

Anyway, it does work on Windows as well.

?

I noticed the encrypted configuration files yesterday as well. I really think IB have gone overboard on this..

?

?

From: [email protected] <[email protected]> On Behalf Of noreply.section+dev@...
Sent: 25 August 2022 21:36
To: [email protected]
Subject: Re: [TWS API] Settings storage location

?

FYI, here're some switches that can be passed to tws (at least on Linux):

tws -J-DinstallDir=path1 -J-DjtsConfigDir=path2 username=yourusername password=yourpassword

where:

path1: folder containing the /jars directory, typically ~/Jts

path2: folder containing jts.ini, launcher.log and the user session directory

username and password are self explanatory and useful for auto login.

path2 can also be passed alone as in: tws path2 username=...

The -J-Dxxx=... switches are simply forwarded to the java command line as -Dxxx=...

And yes, it'a bummer but IB recently switched to encrypted configuration files. Unencrypted files can still be read and exported from TWS under Diagnostics or, from 10.18, under Help->Troubleshooting


 

¿ªÔÆÌåÓý

Thanks ´³¨¹°ù²µ±ð²Ô. In the particular case where I wanted to do this, there was no script involved, but setting the -J-DjtsConfigDir switch on the TWS executable on Windows did the trick, as did -DjtsConfigDir in tws.vmoptions.

?

R.

?

From: [email protected] <[email protected]> On Behalf Of ´³¨¹°ù²µ±ð²Ô Reinold via groups.io
Sent: 25 August 2022 19:56
To: [email protected]
Subject: Re: [TWS API] Settings storage location

?

I was unable to find a "Global Configuration" menu as well, Richard. So I took a quick look (on Linux) at the "tws" shell script that starts my TWS.

At the end of the scrip, when it assembles the final Java VM command line, it adds the definition "-DjtsConfigDir=\${installer:jtsConfigDir}" that seems to hard-wire the settings folder. I added a "/lalala" for fun and that shows up right in the greyed out folder dialog on the login screen.

So I guess you'd need to fiddle with the startup script to modify that folder.

´³¨¹°ù²µ±ð²Ô

PS. While looking into this I stumbled over the fact that tws.xml and ibg.xml are now encrypted as well. At least in 10.17