Looks like the path is hardcoded somewhere in the code.
Yes. The Mist connections are hard coded to use IPC only, and not RPC.
user@Kumquat:~/EthereumSource/mist$ find . -iname '*ipc*'
./tests/mocha-in-browser/spec/ipc-spec.js
./modules/ipc
./modules/ipc/ipcProviderBackend.js
./modules/ipc/ipcProviderWrapper.js
./modules/ipc/getIpcPath.js
./modules/ipcCommunicator.js
user@Kumquat:~/EthereumSource/mist$ find . -iname '*rpc*'
./nodes/eth/darwin-x64/libjsonrpccpp-client.0.dylib
./nodes/eth/darwin-x64/libjsonrpccpp-server.0.dylib
./nodes/eth/darwin-x64/libjsonrpccpp-common.0.dylib
./nodes/eth/darwin-x64/libweb3jsonrpc.dylib
And your IPC paths can be found in modules/ipc/getIpcPath.js lines 7 to 24
module.exports = function() {
var p = require('path');
var path = global.path.HOME;
if(process.platform === 'darwin')
path += '/Library/Ethereum/geth.ipc';
if(process.platform === 'freebsd' ||
process.platform === 'linux' ||
process.platform === 'sunos')
path += '/.ethereum/geth.ipc';
if(process.platform === 'win32')
path = '\\\\.\\pipe\\geth.ipc';
console.log('CONNECT to IPC PATH: '+ path);
return path;
};
Mist and geth communicate via IPC by opening a file descriptor on the local computer and then send messages to each other through this file descriptor. So no remote connection currently.
How can i connect Mist to a private network which is remote?
You could try connecting your local instance of geth with your remote geth node using the P2P protocol, and then connect Mist to your local geth instance using IPC.
In other words, just make your local computer another node in your private network.
You can install a separately installed copy of geth, or use the geth packaged with Mist which is available in the following directories:
{MISTINSTALLDIRECTORY}/resources/node/geth/geth for Linux and Mac OS X
{MISTINSTALLDIRECTORY}\resources\node\geth\geth.exe for Windows
If your private network has a --networkid {xyz} and a custom genesis file, use the --networkid {xyz} and --genesis {custom genesis file}.
The next thing is to get your local geth to talk to your private network nodes. This will have to be done using --bootnodes or creating the files static-nodes.json or trusted nodes in your data directory. Remember to add --maxpeers {x} for a non-zero {x} as omitting this from the command line seems to prevent the connections being made.