mirror of
https://github.com/danbulant/node-x11
synced 2026-05-22 22:09:14 +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';
|
||||
|
||||
var displayMatch = display.match(/^(?:[^:]*?\/)?(.*):(\d+)(?:.(\d+))?$/);
|
||||
if (!displayMatch)
|
||||
throw new Error("Cannot parse display");
|
||||
|
||||
var host = displayMatch[1];
|
||||
if (!host)
|
||||
host = '127.0.0.1';
|
||||
|
|
|
|||
Loading…
Reference in a new issue