mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Added default value of ':0' if $DISPLAY is not set
This commit is contained in:
@@ -653,7 +653,7 @@ function UserSessions()
|
||||
}
|
||||
this.consoleUid = function consoleUid()
|
||||
{
|
||||
var checkstr = process.platform == 'darwin' ? 'console' : process.env['DISPLAY'];
|
||||
var checkstr = process.platform == 'darwin' ? 'console' : ((process.env['DISPLAY'])?process.env['DISPLAY']:':0')
|
||||
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||
child.stdout.str = '';
|
||||
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
|
||||
|
||||
Reference in New Issue
Block a user