Fixing get_dns for both GUI and Non-GUI installation