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:
@@ -40,9 +40,16 @@ catch(e)
|
|||||||
|
|
||||||
if (!process.env.XAUTHORITY || !process.env.DISPLAY)
|
if (!process.env.XAUTHORITY || !process.env.DISPLAY)
|
||||||
{
|
{
|
||||||
var xinfo = this.getXInfo(require('user-sessions').getUid(require('user-sessions').whoami()));
|
try
|
||||||
process.setenv('XAUTHORITY', xinfo.xauthority);
|
{
|
||||||
process.setenv('DISPLAY', xinfo.display);
|
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));
|
var display = X11.XOpenDisplay(GM.CreateVariable(process.env.DISPLAY));
|
||||||
|
|||||||
Reference in New Issue
Block a user