1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

Added try/catch block, becuase puppy linux doesn't have who

This commit is contained in:
Bryan Roe
2020-04-09 21:29:25 -07:00
parent 78459080d7
commit aa48bfe70a

View File

@@ -40,9 +40,16 @@ catch(e)
if (!process.env.XAUTHORITY || !process.env.DISPLAY)
{
var xinfo = this.getXInfo(require('user-sessions').getUid(require('user-sessions').whoami()));
process.setenv('XAUTHORITY', xinfo.xauthority);
process.setenv('DISPLAY', xinfo.display);
try
{
var xinfo = this.getXInfo(require('user-sessions').getUid(require('user-sessions').whoami()));
process.setenv('XAUTHORITY', xinfo.xauthority);
process.setenv('DISPLAY', xinfo.display);
}
catch(ff)
{
console.log(ff);
}
}
var display = X11.XOpenDisplay(GM.CreateVariable(process.env.DISPLAY));