/** get the hostname of the #-th client, stored in the gconf-value-list client_hostnames */
gchar* get_hostname_of_client(int client_no){
	GSList* hostnames;
	hostnames = gconf_client_get_list(gconf_client, "/apps/labcontrol/system_config/client_hostnames", GCONF_VALUE_STRING, NULL);
	gchar* hostname;
	hostname = g_slist_nth_data(hostnames, client_no-1);
	return hostname;
}

/** get the publickey file required to connect to ssh as user from gconf*/
gchar* get_publickey_path_user(){
	return gconf_client_get_string(gconf_client, "/apps/labcontrol/system_config/publickey_path_user", NULL);
}

/** get the publickey file required to connect to ssh as root from gconf*/
gchar* get_publickey_path_root(){
	return gconf_client_get_string(gconf_client, "/apps/labcontrol/system_config/publickey_path_root", NULL);
}

/** get the username of the clients from gconf */
gchar* get_user_name_on_clients(){
	return gconf_client_get_string(gconf_client, "/apps/labcontrol/system_config/user_name_on_clients", NULL);
}

/** get the current stored client's state from gconf */
guint get_client_state_from_gconf(guint client_no){
	return gconf_client_get_int(gconf_client, g_strdup_printf("/apps/labcontrol/temp/status/%i", client_no), NULL);
}

/** set a given state of one client to gconf. This is used by the functions, that i.e. boot the clients. */
void set_client_state_to_gconf(guint client_no, guint new_state){	
	gconf_client_set_int(gconf_client, g_strdup_printf("/apps/labcontrol/temp/status/%i", client_no), new_state, NULL);
}