fix uncatched error with missing polkit. Closes: #5955

Using `localhost` name does not always work, sometimes (like in this case) you need to explicitly use `127.0.0.1` (or a string variable containing that ip, not the hostname).
I'm not sure about hosts allow with other socket types.