Re: Usage of GConf API issue (gconf_client_get_default,gconf_client_get)

Ghee Teo <[email protected]> Tue, 06 Apr 2010 10:19:49 +0100
Newsgroups gmane.comp.gnome.lib.gconf
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--===============1251065080==
Content-type: multipart/alternative;
 boundary="Boundary_(ID_cpHeWqUD3HNA6Zy9SZiDYw)"

This is a multi-part message in MIME format.

--Boundary_(ID_cpHeWqUD3HNA6Zy9SZiDYw)
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT

On 04/ 6/10 08:20 AM, Zhang, Qiang Z wrote:
> Hi all,
> I am trying to write a library using GConf API (gconf_client_get, 
> etc.) to read system configures info, but I encounter the follow issue:
> gconf_client_get got nothing, and I found the DBUS_SESSION_BUS_ADDRESS 
> is not set in the library process environment.
This is set when dbus-launch is run and typically is done during login.
Try dbus-launch --exit-with-session --sh-syntax <your command>
It should set that up for your program.

-Ghee
> I don't know why DBUS_SESSION_BUS_ADDRESS is not set in my library 
> process environment. In fact, DBUS_SESSION_BUS_ADDRESS is already set 
> in system.
> So How to set correct DBUS_SESSION_BUS_ADDRESS in my library?
> Thanks in advanced
> -Best regards
> -Qiang
>
>
> _______________________________________________
> gconf-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gconf-list
>    


--Boundary_(ID_cpHeWqUD3HNA6Zy9SZiDYw)
Content-type: text/html; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 04/ 6/10 08:20 AM, Zhang, Qiang Z wrote:
<blockquote
 cite="mid:CF2F38D4AE21BB4CB845318E4C5ECB671D6A83CE@shsmsx501.ccr.corp.intel.com"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
  <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style><font
 size="2" face="Arial, sans-serif">
  <div style="text-align: justify;">Hi all,</div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">&nbsp;</font></div>
  <div style="text-align: justify;">I am trying to write a library
using GConf API (gconf_client_get, etc.) to read system configures
info, but I encounter the follow issue:</div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">gconf_client_get got nothing, and I
found the DBUS_SESSION_BUS_ADDRESS is not set in the library process
environment.</font></div>
  </font></blockquote>
This is set when dbus-launch is run and typically is done during login.<br>
Try dbus-launch --exit-with-session --sh-syntax &lt;your command&gt;<br>
It should set that up for your program.<br>
<br>
-Ghee<br>
<blockquote
 cite="mid:CF2F38D4AE21BB4CB845318E4C5ECB671D6A83CE@shsmsx501.ccr.corp.intel.com"
 type="cite"><font size="2" face="Arial, sans-serif">
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">&nbsp;</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">I don&#8217;t know why
DBUS_SESSION_BUS_ADDRESS is not set in my library process environment.
In fact, DBUS_SESSION_BUS_ADDRESS is already set in system.</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">So How to set correct
DBUS_SESSION_BUS_ADDRESS in my library?</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">&nbsp;</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">Thanks in advanced</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">&nbsp;</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">-Best regards</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">-Qiang</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">&nbsp;</font></div>
  <div style="text-align: justify;"><font size="2"
 face="Times New Roman, serif">&nbsp;</font></div>
  </font>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gconf-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="http://mail.gnome.org/mailman/listinfo/gconf-list">http://mail.gnome.org/mailman/listinfo/gconf-list</a>
  </pre>
</blockquote>
<br>
</body>
</html>

--Boundary_(ID_cpHeWqUD3HNA6Zy9SZiDYw)--

--===============1251065080==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gconf-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gconf-list
--===============1251065080==--