Skip to content

Commit a702935

Browse files
committed
'export HOME to xterm'
1 parent 73cd042 commit a702935

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/xterm/server.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,14 @@ static function createWorker() {
9696
$connection->auth = true;
9797
}
9898

99+
$current_user_home = posix_getpwuid(posix_getuid())['dir'];
100+
99101
unset($_SERVER['argv']);
100102
$env = array_merge([
101103
'COLUMNS'=>$initial['cols'],
102104
'LINES'=>$initial['rows'],
103-
'TERM'=>'xterm'
105+
'TERM'=>'xterm',
106+
'HOME'=>$current_user_home
104107
],$_SERVER);
105108
$connection->process = proc_open('bash', [['pty'],['pty'],['pty']], $pipes, $initial['path'], $env);
106109
$connection->pipes = $pipes;

0 commit comments

Comments
 (0)