mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
connect using idcorrect DISPLAY
This commit is contained in:
parent
2834543b41
commit
33775da6df
1 changed files with 3 additions and 0 deletions
|
|
@ -353,6 +353,9 @@ module.exports.createClient = function(initCb, display, options)
|
||||||
display = ':0';
|
display = ':0';
|
||||||
|
|
||||||
var displayMatch = display.match(/^(?:[^:]*?\/)?(.*):(\d+)(?:.(\d+))?$/);
|
var displayMatch = display.match(/^(?:[^:]*?\/)?(.*):(\d+)(?:.(\d+))?$/);
|
||||||
|
if (!displayMatch)
|
||||||
|
throw new Error("Cannot parse display");
|
||||||
|
|
||||||
var host = displayMatch[1];
|
var host = displayMatch[1];
|
||||||
if (!host)
|
if (!host)
|
||||||
host = '127.0.0.1';
|
host = '127.0.0.1';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue