Hello all,

I am using GConf API (gconf_client_get, etc.) to read system configures info, 
but I encounter the follow issue:
>       Wrote a small code to read system configure, it's OK on netbook 
> locally, but fails when execute from remote using ssh.
Sample code as follows:
#include <stdio.h>
#include <stdlib.h>
#include <gconf/gconf-value.h>
#include <gconf/gconf-client.h>
int main()
{   GError *error = NULL;
    GConfClient *client = (g_type_init(), gconf_client_get_default());
    const char *host;
    if (client != NULL){
        GConfValue *v = gconf_client_get(client, "/system/http_proxy/host", 
&error);
        if (v != NULL)
            host = gconf_value_get_string(v);
        printf("Host:%s\n",host);
        g_object_unref(client);
    }
}

Execute locally:
[xiaoqi...@zq-desktop cmake]# ./a.out
Host: proxy01.pd.intel.com      #[Correct proxy info]
Execute remotely
[xiaoqi...@zq-desktop cmake]# ./a.out
Host:                   #[No proxy info here]
--------------
We can see no host proxy info from remote.
The same issue also occurs at library using GConf API (gconf_client_get), and 
if I write a library using GConf API, then the API cant works well.

Any comment? How to write a library using GConf, or any options? GConf API 
seems using dbus to get info, how to control it?
Thanks in advance.

-Thanks
-Qiang



_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to