Creating settings file for specific use case of c9sdk



I’ve seen that it is possible to customize the SDK by writing a specific settings.js file in settings folder (containing options passed to different plugins) and using the --settings parameter to load the file.

I’m running two instances of the SDK in parallel ([1] with a workspace folder set with -w, and [2] in test mode, to distinguish them). What I would like to do is to use [2] like the frontend (serving the IDE) which then connects to [1]'s remote VFS (through SSH I suppose).
I’ve seen variables like host and port in the standalone.js settings file, but it doesn’t seem to work.

Any way to achieve this ?


Could you explain a bit more what you are trying to do? Are you running two instances of cloud9 on two different computers? By test mode do you mean the -t flag?


By test mode, yes I mean the -t flag. But if needed I can set another workspace folder on this instance.
What I would like to do is to have a SDK instance which only serves the IDE.
This instance would connect to another instance which is only the virtual machine (virtual file system and terminal access)

The goal would be to connect to my SSH workspace from the SDK. Is this possible directly from the CLI or do I have to customize a settings file to set which host I want to connect to ?


You’d most likely need to change some code, since there is no builtin setting for that.
Why do you need to serve client from different instance, does the second instance run on an url that is accessible from your browser?


I thought to use a second instance in order to find what settings would let met connect to it, but I realized it’s better to work directly with my SSH workspace (already set up, ran and my SSH key is authorized)

My question becomes :
How do I set my credentials (username, hostname, initial path, port, node.js binary path …) to let the SDK connect to my remote SSH workspace ?
If I need to write some code to do it, which plugin does the job ? c9.vfs.server, c9.cli.*, c9.ide.server ?


It depends how do you want to connect to the remote workspace and why you can’t run cloud9 on it.
All of c9.vfs.server, c9.vfs.client, c9.vfs.standalone may need to be modified