mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 09:03:30 +01:00
vncserver: extract DetectUserName
This commit is contained in:
parent
5811e14b42
commit
a3b9a96df7
@ -40,8 +40,7 @@ $geometry = "1024x768";
|
||||
|
||||
$vncUserDir = "$ENV{HOME}/.vnc";
|
||||
$vncUserConfig = "$vncUserDir/config";
|
||||
$vncUserName = `id -u -n`;
|
||||
$vncUserName =~ s/^\s+|\s+$//g;
|
||||
$vncUserName = &DetectUserName();
|
||||
|
||||
$vncSystemConfigDir = "/etc/kasmvnc";
|
||||
$vncSystemConfigDefaultsFile = "$vncSystemConfigDir/vncserver-config-defaults";
|
||||
@ -933,3 +932,10 @@ sub DetectBinariesDir {
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub DetectUserName {
|
||||
my $vncUserName = `id -u -n`;
|
||||
$vncUserName =~ s/^\s+|\s+$//g;
|
||||
|
||||
return $vncUserName;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user