mirror of
https://github.com/danbulant/node-x11
synced 2026-05-21 05:19:14 +00:00
fix in connection code
This commit is contained in:
parent
9560f967dc
commit
b35752cd28
1 changed files with 2 additions and 2 deletions
|
|
@ -342,7 +342,8 @@ module.exports.createClient = function(initCb, display)
|
|||
// try local socket on non-windows platforms
|
||||
if ( ['cygwin', 'win32', 'win64'].indexOf(process.platform) < 0 )
|
||||
{
|
||||
if (process.platform == 'darwin')
|
||||
console.log(['here1', display, process.platform]);
|
||||
if (process.platform == 'darwin' || process.platform == 'mac')
|
||||
{
|
||||
// socket path on OSX is /tmp/launch-(some id)/org.x:0
|
||||
if (display[0] == '/')
|
||||
|
|
@ -352,7 +353,6 @@ module.exports.createClient = function(initCb, display)
|
|||
} else if(host == '127.0.0.1')
|
||||
socketPath = '/tmp/.X11-unix/X' + displayNum;
|
||||
}
|
||||
socketPath = display;
|
||||
if(socketPath)
|
||||
{
|
||||
stream = net.createConnection(socketPath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue