Advanced settings: use current username instead of Pi as default

Instead of using 'pi' as default, try to get the username of
the current user from the OS.

May not always work. (e.g. some Windows users may not have
setup a username themselves, but may be using a default user
created by the PC vendor).

Closes #497
This commit is contained in:
Floris Bos 2022-11-15 01:10:46 +01:00
parent e74efdca04
commit ebc6edc0c3
3 changed files with 24 additions and 0 deletions

View file

@ -478,7 +478,10 @@ Popup {
if ('sshUserName' in settings) {
fieldUserName.text = settings.sshUserName
chkSetUser.checked = true
} else {
fieldUserName.text = imageWriter.getCurrentUser()
}
if ('wifiSSID' in settings) {
fieldWifiSSID.text = settings.wifiSSID
if ('wifiSSIDHidden' in settings && settings.wifiSSIDHidden) {