1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-04 01:23:21 +00:00

updated getXInfo, so returns only DISPLAY if XAUTHORITY is not found

This commit is contained in:
Bryan Roe
2019-05-17 16:09:47 -07:00
parent 1fc476d31e
commit f4f0a37522

View File

@@ -356,6 +356,23 @@ function monitorinfo()
}
}
}
if(ret == null)
{
// We couldn't find XAUTHORITY and DISPLAY, so as a last ditch effort, lets just look for DISPLAY
for (var n in lines)
{
var ln = lines[n].trim();
if (ln.length > 0)
{
var e = require('user-sessions').getEnvFromPid(ln);
if (e.DISPLAY)
{
ret = { tty: '?', display: e.DISPLAY };
return (ret);
}
}
}
}
}
else
{