59
115
Object that holds all configuration information, some
60
116
important environment variables and some meta-information
61
about mainly x authentication.</p><p>
117
about mainly x authentication.</p>
63
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term">GObject�<em class="structfield"><code>parent</code></em>;</span></td><td> <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> is based on <span class="type">GObject</span>
64
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>xauth</code></em>;</span></td><td> the X authorization token
65
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>dir</code></em>;</span></td><td> the directory where the .Xauthority file is created in sudo
121
<div class="variablelist"><table border="0">
122
<col align="left" valign="top">
126
<span class="term">GObject <em class="structfield"><code>parent</code></em>;</span></td>
127
<td> <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> is based on <span class="type">GObject</span>
132
<span class="term">gchar *<em class="structfield"><code>xauth</code></em>;</span></td>
133
<td> the X authorization token
138
<span class="term">gchar *<em class="structfield"><code>dir</code></em>;</span></td>
139
<td> the directory where the .Xauthority file is created in sudo
67
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>display</code></em>;</span></td><td> storage for the DISPLAY environment variable
68
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>user</code></em>;</span></td><td> user gksu will switch to
69
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>password</code></em>;</span></td><td> the password that should be passed to su or sudo
70
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>command</code></em>;</span></td><td> which command to run with su
71
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>login_shell</code></em>;</span></td><td> should run a login shell?
72
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>keep_env</code></em>;</span></td><td> should the current environment be kept?
73
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>debug</code></em>;</span></td><td> show debug information?
74
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>ssh_fwd</code></em>;</span></td><td> are we running inside a ssh X11 forwarding
145
<span class="term">gchar *<em class="structfield"><code>display</code></em>;</span></td>
146
<td> storage for the DISPLAY environment variable
151
<span class="term">gchar *<em class="structfield"><code>user</code></em>;</span></td>
152
<td> user gksu will switch to
157
<span class="term">gchar *<em class="structfield"><code>password</code></em>;</span></td>
158
<td> the password that should be passed to su or sudo
163
<span class="term">gchar *<em class="structfield"><code>command</code></em>;</span></td>
164
<td> which command to run with su
169
<span class="term">gboolean <em class="structfield"><code>login_shell</code></em>;</span></td>
170
<td> should run a login shell?
175
<span class="term">gboolean <em class="structfield"><code>keep_env</code></em>;</span></td>
176
<td> should the current environment be kept?
181
<span class="term">gboolean <em class="structfield"><code>debug</code></em>;</span></td>
182
<td> show debug information?
187
<span class="term">gboolean <em class="structfield"><code>ssh_fwd</code></em>;</span></td>
188
<td> are we running inside a ssh X11 forwarding
76
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471669"></a><h3><a name="gksu-context-new"></a>gksu_context_new ()</h3><a class="indexterm" name="id2471677"></a><pre class="programlisting"><a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a>* gksu_context_new ();</pre><p>
196
<div class="refsect2" lang="en">
197
<a name="id2469818"></a><h3>
198
<a name="gksu-context-new"></a>gksu_context_new ()</h3>
199
<a class="indexterm" name="id2469828"></a><pre class="programlisting"><a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a>* gksu_context_new ();</pre>
77
201
Creates a new context to use gksu with. You must
78
202
manually free the context with gksu_context_free
81
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a new <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.
82
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471716"></a><h3><a name="gksu-context-free"></a>gksu_context_free ()</h3><a class="indexterm" name="id2471724"></a><pre class="programlisting">void gksu_context_free (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
83
Frees the provided <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.</p><p>
85
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> to be freed.
86
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471774"></a><h3><a name="gksu-context-set-user"></a>gksu_context_set_user ()</h3><a class="indexterm" name="id2471782"></a><pre class="programlisting">void gksu_context_set_user (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
87
gchar *username);</pre><p>
207
<div class="variablelist"><table border="0">
208
<col align="left" valign="top">
211
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
212
<td> a new <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.
218
<div class="refsect2" lang="en">
219
<a name="id2558889"></a><h3>
220
<a name="gksu-context-free"></a>gksu_context_free ()</h3>
221
<a class="indexterm" name="id2558898"></a><pre class="programlisting">void gksu_context_free (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
223
Frees the provided <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.</p>
227
<div class="variablelist"><table border="0">
228
<col align="left" valign="top">
231
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
232
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> to be freed.
238
<div class="refsect2" lang="en">
239
<a name="id2558953"></a><h3>
240
<a name="gksu-context-set-user"></a>gksu_context_set_user ()</h3>
241
<a class="indexterm" name="id2558962"></a><pre class="programlisting">void gksu_context_set_user (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
242
gchar *username);</pre>
88
244
Sets up what user the command will be run as. The default
89
is root, but you can run the command as any user.</p><p>
245
is root, but you can run the command as any user.</p>
91
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
92
</td></tr><tr><td><span class="term"><em class="parameter"><code>username</code></em>�:</span></td><td> the target username
93
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471844"></a><h3><a name="gksu-context-get-user"></a>gksu_context_get_user ()</h3><a class="indexterm" name="id2471853"></a><pre class="programlisting">const gchar* gksu_context_get_user (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
249
<div class="variablelist"><table border="0">
250
<col align="left" valign="top">
254
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
255
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
260
<span class="term"><em class="parameter"><code>username</code></em> :</span></td>
261
<td> the target username
268
<div class="refsect2" lang="en">
269
<a name="id2559033"></a><h3>
270
<a name="gksu-context-get-user"></a>gksu_context_get_user ()</h3>
271
<a class="indexterm" name="id2559042"></a><pre class="programlisting">const gchar* gksu_context_get_user (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
94
273
Gets the user the command will be run as, as set
95
by gksu_context_set_user.</p><p>
97
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
98
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a pointer to the string containing the username.
99
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2585860"></a><h3><a name="gksu-context-set-command"></a>gksu_context_set_command ()</h3><a class="indexterm" name="id2585869"></a><pre class="programlisting">void gksu_context_set_command (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
100
gchar *command);</pre><p>
101
Sets up what command will run with the target user.</p><p>
103
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
104
</td></tr><tr><td><span class="term"><em class="parameter"><code>command</code></em>�:</span></td><td> the command that shall be ran
105
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2585930"></a><h3><a name="gksu-context-get-command"></a>gksu_context_get_command ()</h3><a class="indexterm" name="id2585938"></a><pre class="programlisting">const gchar* gksu_context_get_command (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
274
by gksu_context_set_user.</p>
278
<div class="variablelist"><table border="0">
279
<col align="left" valign="top">
283
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
284
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
289
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
290
<td> a pointer to the string containing the username.
297
<div class="refsect2" lang="en">
298
<a name="id2559112"></a><h3>
299
<a name="gksu-context-set-command"></a>gksu_context_set_command ()</h3>
300
<a class="indexterm" name="id2559121"></a><pre class="programlisting">void gksu_context_set_command (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
301
gchar *command);</pre>
303
Sets up what command will run with the target user.</p>
307
<div class="variablelist"><table border="0">
308
<col align="left" valign="top">
312
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
313
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
318
<span class="term"><em class="parameter"><code>command</code></em> :</span></td>
319
<td> the command that shall be ran
326
<div class="refsect2" lang="en">
327
<a name="id2559199"></a><h3>
328
<a name="gksu-context-get-command"></a>gksu_context_get_command ()</h3>
329
<a class="indexterm" name="id2559208"></a><pre class="programlisting">const gchar* gksu_context_get_command (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
106
331
Gets the command that will be run, as set by
107
gksu_context_set_command.</p><p>
109
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
110
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a pointer to the string containing the command.
111
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2585995"></a><h3><a name="gksu-context-set-password"></a>gksu_context_set_password ()</h3><a class="indexterm" name="id2586004"></a><pre class="programlisting">void gksu_context_set_password (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
112
gchar *password);</pre><p>
113
Sets up what is the password to be passed to su/sudo. *</p><p>
115
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
116
</td></tr><tr><td><span class="term"><em class="parameter"><code>password</code></em>�:</span></td><td> the password
117
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586066"></a><h3><a name="gksu-context-get-password"></a>gksu_context_get_password ()</h3><a class="indexterm" name="id2586074"></a><pre class="programlisting">const gchar* gksu_context_get_password (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
332
gksu_context_set_command.</p>
336
<div class="variablelist"><table border="0">
337
<col align="left" valign="top">
341
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
342
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
347
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
348
<td> a pointer to the string containing the command.
355
<div class="refsect2" lang="en">
356
<a name="id2559279"></a><h3>
357
<a name="gksu-context-set-password"></a>gksu_context_set_password ()</h3>
358
<a class="indexterm" name="id2559288"></a><pre class="programlisting">void gksu_context_set_password (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
359
gchar *password);</pre>
361
Sets up what is the password to be passed to su/sudo. *</p>
365
<div class="variablelist"><table border="0">
366
<col align="left" valign="top">
370
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
371
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
376
<span class="term"><em class="parameter"><code>password</code></em> :</span></td>
384
<div class="refsect2" lang="en">
385
<a name="id2559366"></a><h3>
386
<a name="gksu-context-get-password"></a>gksu_context_get_password ()</h3>
387
<a class="indexterm" name="id2559376"></a><pre class="programlisting">const gchar* gksu_context_get_password (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
118
389
Gets the password that is set for calling the su/sudo
121
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
122
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a pointer to the string containing the password.
123
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586131"></a><h3><a name="gksu-context-set-login-shell"></a>gksu_context_set_login_shell ()</h3><a class="indexterm" name="id2586139"></a><pre class="programlisting">void gksu_context_set_login_shell (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
124
gboolean value);</pre><p>
394
<div class="variablelist"><table border="0">
395
<col align="left" valign="top">
399
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
400
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
405
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
406
<td> a pointer to the string containing the password.
413
<div class="refsect2" lang="en">
414
<a name="id2559446"></a><h3>
415
<a name="gksu-context-set-login-shell"></a>gksu_context_set_login_shell ()</h3>
416
<a class="indexterm" name="id2546881"></a><pre class="programlisting">void gksu_context_set_login_shell (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
417
gboolean value);</pre>
125
419
Should the shell in which the command will be run be
126
a login shell?</p><p>
128
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
129
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
130
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586201"></a><h3><a name="gksu-context-get-login-shell"></a>gksu_context_get_login_shell ()</h3><a class="indexterm" name="id2586210"></a><pre class="programlisting">gboolean gksu_context_get_login_shell (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
424
<div class="variablelist"><table border="0">
425
<col align="left" valign="top">
429
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
430
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
435
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
443
<div class="refsect2" lang="en">
444
<a name="id2559514"></a><h3>
445
<a name="gksu-context-get-login-shell"></a>gksu_context_get_login_shell ()</h3>
446
<a class="indexterm" name="id2559524"></a><pre class="programlisting">gboolean gksu_context_get_login_shell (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
131
448
Finds out if the shell created by the underlying su process
132
will be a login shell.</p><p>
449
will be a login shell.</p>
134
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
135
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if the shell will be a login shell, FALSE otherwise.
136
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586268"></a><h3><a name="gksu-context-set-keep-env"></a>gksu_context_set_keep_env ()</h3><a class="indexterm" name="id2586277"></a><pre class="programlisting">void gksu_context_set_keep_env (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
137
gboolean value);</pre><p>
453
<div class="variablelist"><table border="0">
454
<col align="left" valign="top">
458
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
459
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
464
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
465
<td> TRUE if the shell will be a login shell, FALSE otherwise.
472
<div class="refsect2" lang="en">
473
<a name="id2559588"></a><h3>
474
<a name="gksu-context-set-keep-env"></a>gksu_context_set_keep_env ()</h3>
475
<a class="indexterm" name="id2559597"></a><pre class="programlisting">void gksu_context_set_keep_env (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
476
gboolean value);</pre>
138
478
Should the environment be kept as it is? Defaults to
139
479
TRUE. Notice that setting this to FALSE may cause the
140
X authorization stuff to fail.</p><p>
480
X authorization stuff to fail.</p>
142
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
143
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
144
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586340"></a><h3><a name="gksu-context-get-keep-env"></a>gksu_context_get_keep_env ()</h3><a class="indexterm" name="id2586350"></a><pre class="programlisting">gboolean gksu_context_get_keep_env (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
484
<div class="variablelist"><table border="0">
485
<col align="left" valign="top">
489
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
490
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
495
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
503
<div class="refsect2" lang="en">
504
<a name="id2559668"></a><h3>
505
<a name="gksu-context-get-keep-env"></a>gksu_context_get_keep_env ()</h3>
506
<a class="indexterm" name="id2559677"></a><pre class="programlisting">gboolean gksu_context_get_keep_env (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
145
508
Finds out if the environment in which the program will be
146
run will be reset.</p><p>
509
run will be reset.</p>
148
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
149
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if the environment is going to be kept,
513
<div class="variablelist"><table border="0">
514
<col align="left" valign="top">
518
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
519
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
524
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
525
<td> TRUE if the environment is going to be kept,
151
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586407"></a><h3><a name="gksu-context-set-debug"></a>gksu_context_set_debug ()</h3><a class="indexterm" name="id2586415"></a><pre class="programlisting">void gksu_context_set_debug (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
152
gboolean value);</pre><p>
153
Set up if debuging information should be printed.</p><p>
533
<div class="refsect2" lang="en">
534
<a name="id2559740"></a><h3>
535
<a name="gksu-context-set-debug"></a>gksu_context_set_debug ()</h3>
536
<a class="indexterm" name="id2559749"></a><pre class="programlisting">void gksu_context_set_debug (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
537
gboolean value);</pre>
539
Set up if debuging information should be printed.</p>
155
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
156
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
157
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586477"></a><h3><a name="gksu-context-get-debug"></a>gksu_context_get_debug ()</h3><a class="indexterm" name="id2586485"></a><pre class="programlisting">gboolean gksu_context_get_debug (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
543
<div class="variablelist"><table border="0">
544
<col align="left" valign="top">
548
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
549
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
554
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
562
<div class="refsect2" lang="en">
563
<a name="id2559819"></a><h3>
564
<a name="gksu-context-get-debug"></a>gksu_context_get_debug ()</h3>
565
<a class="indexterm" name="id2559827"></a><pre class="programlisting">gboolean gksu_context_get_debug (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
158
567
Finds out if the library is configured to print debuging
161
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
162
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if it is, FALSE otherwise.
163
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586542"></a><h3><a name="gksu-context-set-ssh-fwd"></a>gksu_context_set_ssh_fwd ()</h3><a class="indexterm" name="id2586550"></a><pre class="programlisting">void gksu_context_set_ssh_fwd (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
164
gboolean value);</pre><p>
572
<div class="variablelist"><table border="0">
573
<col align="left" valign="top">
577
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
578
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
583
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
584
<td> TRUE if it is, FALSE otherwise.
591
<div class="refsect2" lang="en">
592
<a name="id2559889"></a><h3>
593
<a name="gksu-context-set-ssh-fwd"></a>gksu_context_set_ssh_fwd ()</h3>
594
<a class="indexterm" name="id2559898"></a><pre class="programlisting">void gksu_context_set_ssh_fwd (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
595
gboolean value);</pre>
165
597
Set up if we are running inside a sshd forwarding
166
598
session. That's because the X authorization semantics
168
-> THIS SETTING IS CURRENTLY USED FOR NOTHING</p><p>
600
-> THIS SETTING IS CURRENTLY USED FOR NOTHING</p>
170
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
171
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
172
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586614"></a><h3><a name="gksu-context-get-ssh-fwd"></a>gksu_context_get_ssh_fwd ()</h3><a class="indexterm" name="id2586622"></a><pre class="programlisting">gboolean gksu_context_get_ssh_fwd (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
604
<div class="variablelist"><table border="0">
605
<col align="left" valign="top">
609
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
610
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
615
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
623
<div class="refsect2" lang="en">
624
<a name="id2559970"></a><h3>
625
<a name="gksu-context-get-ssh-fwd"></a>gksu_context_get_ssh_fwd ()</h3>
626
<a class="indexterm" name="id2559978"></a><pre class="programlisting">gboolean gksu_context_get_ssh_fwd (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
173
628
Finds out if the library is configured as being run inside a
174
629
ssh X11 forwarding tunnel.
175
-> THIS SETTING IS CURRENTLY USED FOR NOTHING</p><p>
177
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
178
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if it is, FALSE otherwise.
179
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586680"></a><h3><a name="gksu-context-try-need-password"></a>gksu_context_try_need_password ()</h3><a class="indexterm" name="id2586691"></a><pre class="programlisting">gboolean gksu_context_try_need_password (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
180
Checks if we need to ask for a password or if we have ways of
181
getting the password for ourselves or we simply don't need it.</p><p>
183
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
184
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if requesting a password is needed, FALSE otherwise.
186
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586749"></a><h3><a name="gksu-context-run"></a>gksu_context_run ()</h3><a class="indexterm" name="id2586757"></a><pre class="programlisting">gboolean gksu_context_run (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
187
GError **error);</pre><p>
188
This could be considered one of the main functions in GKSu.
189
it is responsible for doing the 'user changing' magic.</p><p>
191
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
192
</td></tr><tr><td><span class="term"><em class="parameter"><code>error</code></em>�:</span></td><td> a <span class="type">GError</span> object to be filled with the error code or NULL
193
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> the child's error status, 0 if all went fine, -1 if failed
194
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586838"></a><h3><a name="gksu-context-sudo-run"></a>gksu_context_sudo_run ()</h3><a class="indexterm" name="id2586846"></a><pre class="programlisting">gboolean gksu_context_sudo_run (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
195
GError **error);</pre><p>
630
-> THIS SETTING IS CURRENTLY USED FOR NOTHING</p>
634
<div class="variablelist"><table border="0">
635
<col align="left" valign="top">
639
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
640
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
645
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
646
<td> TRUE if it is, FALSE otherwise.
653
<div class="refsect2" lang="en">
654
<a name="id2560042"></a><h3>
655
<a name="gksu-context-sudo-try-need-password"></a>gksu_context_sudo_try_need_password ()</h3>
656
<a class="indexterm" name="id2560053"></a><pre class="programlisting">gboolean gksu_context_sudo_try_need_password
657
(<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
659
Checks if we need to ask for a password or if we have ways of
660
getting the password for ourselves or we simply don't need it.
665
<div class="variablelist"><table border="0">
666
<col align="left" valign="top">
670
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
671
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
676
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
677
<td> TRUE if requesting a password is needed, FALSE otherwise.
685
<div class="refsect2" lang="en">
686
<a name="id2560117"></a><h3>
687
<a name="gksu-context-try-need-password"></a>gksu_context_try_need_password ()</h3>
688
<a class="indexterm" name="id2560127"></a><pre class="programlisting">gboolean gksu_context_try_need_password (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
690
Checks if we need to ask for a password or if we have ways of
691
getting the password for ourselves or we simply don't need it.
696
<div class="variablelist"><table border="0">
697
<col align="left" valign="top">
701
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
702
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
707
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
708
<td> TRUE if requesting a password is needed, FALSE otherwise.
716
<div class="refsect2" lang="en">
717
<a name="id2560191"></a><h3>
718
<a name="gksu-context-run-full"></a>gksu_context_run_full ()</h3>
719
<a class="indexterm" name="id2560199"></a><pre class="programlisting">gboolean gksu_context_run_full (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
720
GksuAskPasswordFunc ask_pass,
722
GksuPasswordNotNeededFunc pass_not_needed,
723
gpointer pnn_user_data,
724
GError **error);</pre>
726
This could be considered one of the main functions in GKSu.
727
it is responsible for doing the 'user changing' magic calling
728
the <span class="type">GksuAskPasswordFunc</span> function to request a password if needed.
729
and the <span class="type">GksuPasswordNotNeededFunc</span> function if a password won't be
730
needed, so the application has the oportunity of warning the user
736
<div class="variablelist"><table border="0">
737
<col align="left" valign="top">
741
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
742
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
747
<span class="term"><em class="parameter"><code>ask_pass</code></em> :</span></td>
748
<td> a <span class="type">GksuAskPasswordFunc</span>
753
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
754
<td> a <span class="type">gpointer</span> with user data to be passed to the
755
<span class="type">GksuAskPasswordFunc</span>
760
<span class="term"><em class="parameter"><code>pass_not_needed</code></em> :</span></td>
761
<td> a <span class="type">GksuPasswordNotNeededFunc</span>
766
<span class="term"><em class="parameter"><code>pnn_user_data</code></em> :</span></td>
767
<td> a <span class="type">gpointer</span> with the user data to be passed to the
768
<span class="type">GksuPasswordNotNeededFunc</span>
773
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
774
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
779
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
780
<td> the child's error status, 0 if all went fine, -1 if failed
787
<div class="refsect2" lang="en">
788
<a name="id2560420"></a><h3>
789
<a name="gksu-context-run"></a>gksu_context_run ()</h3>
790
<a class="indexterm" name="id2560428"></a><pre class="programlisting">gboolean gksu_context_run (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
791
GError **error);</pre>
793
This could be considered one of the main functions in GKSu.
794
it is responsible for doing the 'user changing' magic.</p>
798
<div class="variablelist"><table border="0">
799
<col align="left" valign="top">
803
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
804
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
809
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
810
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
815
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
816
<td> the child's error status, 0 if all went fine, -1 if failed
823
<div class="refsect2" lang="en">
824
<a name="id2560517"></a><h3>
825
<a name="gksu-context-sudo-run-full"></a>gksu_context_sudo_run_full ()</h3>
826
<a class="indexterm" name="id2560526"></a><pre class="programlisting">gboolean gksu_context_sudo_run_full (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
827
GksuAskPasswordFunc ask_pass,
829
GksuPasswordNotNeededFunc pass_not_needed,
830
gpointer pnn_user_data,
831
GError **error);</pre>
833
This could be considered one of the main functions in GKSu.
834
it is responsible for doing the 'user changing' magic calling
835
the <span class="type">GksuAskPasswordFunc</span> function to request a password if needed.
836
and the <span class="type">GksuPasswordNotNeededFunc</span> function if a password won't be
837
needed, so the application has the oportunity of warning the user
843
<div class="variablelist"><table border="0">
844
<col align="left" valign="top">
848
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
849
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
854
<span class="term"><em class="parameter"><code>ask_pass</code></em> :</span></td>
855
<td> a <span class="type">GksuAskPasswordFunc</span>
860
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
861
<td> a <span class="type">gpointer</span> with user data to be passed to the
862
<span class="type">GksuAskPasswordFunc</span>
867
<span class="term"><em class="parameter"><code>pass_not_needed</code></em> :</span></td>
868
<td> a <span class="type">GksuPasswordNotNeededFunc</span>
873
<span class="term"><em class="parameter"><code>pnn_user_data</code></em> :</span></td>
874
<td> a <span class="type">gpointer</span> with the user data to be passed to the
875
<span class="type">GksuPasswordNotNeededFunc</span>
880
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
881
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
886
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
887
<td> the child's error status, 0 if all went fine, -1 if failed
894
<div class="refsect2" lang="en">
895
<a name="id2560746"></a><h3>
896
<a name="gksu-context-sudo-run"></a>gksu_context_sudo_run ()</h3>
897
<a class="indexterm" name="id2560754"></a><pre class="programlisting">gboolean gksu_context_sudo_run (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
898
GError **error);</pre>
196
900
This could be considered one of the main functions in GKSu.
197
901
it is responsible for doing the 'user changing' magic by
198
902
calling <code class="function">gksu_ask_password()</code> if it needs the user's password
199
it behaves like sudo.</p><p>
903
it behaves like sudo.</p>
201
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
202
</td></tr><tr><td><span class="term"><em class="parameter"><code>error</code></em>�:</span></td><td> a <span class="type">GError</span> object to be filled with the error code or NULL
203
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> the child's error status, 0 if all went fine, -1 if failed
204
</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2586936"></a><h2>See Also</h2><p>
907
<div class="variablelist"><table border="0">
908
<col align="left" valign="top">
912
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
913
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
918
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
919
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
924
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
925
<td> the child's error status, 0 if all went fine, -1 if failed
932
<div class="refsect1" lang="en">
933
<a name="id2560854"></a><h2>See Also</h2>
205
935
For convenience Gtk+2.0 widgets to request the user's password take a
206
936
look at libgksuui1.0 and its API reference.
207
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="ch01.html"><b><<�Main Reference</b></a></td><td align="right"></td></tr></table></body></html>
940
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
941
<td align="left"><a accesskey="p" href="ch01.html"><b><< Main Reference</b></a></td>
942
<td align="right"></td>