~ubuntu-branches/ubuntu/jaunty/libgksu1.2/jaunty

« back to all changes in this revision

Viewing changes to docs/html/libgksu12-GksuContext.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-07-07 15:30:14 UTC
  • mfrom: (1.1.4 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060707153014-r6qp2uiv3pzfh4g2
Tags: 1.3.8-1ubuntu1
* Sync with Debian
* debian/control.in:
  - Build-Depends on libstartup-notification0-dev
  - libgksu1.2-1 Conflicts with libgksu1.2-0
  - soname change
* debian/libgksu1.2-1.install, debian/libgksu1.2-1.shlibs:
  - soname change
* debian/patches/01_startup_notification.patch:
  - add startup notification
* debian/patches/99_autoreconf.patch:
  - autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1
2
<html>
2
3
<head>
3
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
6
7
<link rel="start" href="index.html" title="LibGKSu Reference Manual">
7
8
<link rel="up" href="ch01.html" title="Main Reference">
8
9
<link rel="prev" href="ch01.html" title="Main Reference">
9
 
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
 
10
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
10
11
<link rel="stylesheet" href="style.css" type="text/css">
11
12
<link rel="chapter" href="ch01.html" title="Main Reference">
12
13
</head>
13
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14
 
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
15
17
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
16
18
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
17
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
18
20
<th width="100%" align="center">LibGKSu Reference Manual</th>
19
 
</tr></table>
 
21
<td>&#160;</td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
 
24
                  &#160;|&#160;
 
25
                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr>
 
26
</table>
20
27
<div class="refentry" lang="en">
21
28
<a name="libgksu12-GksuContext"></a><div class="titlepage"></div>
22
29
<div class="refnamediv"><table width="100%"><tr>
23
30
<td valign="top">
24
 
<h2><span class="refentrytitle">GksuContext - run programs as other users with su or sudo</span></h2>
 
31
<h2><span class="refentrytitle"><a name="top_of_page"></a>GksuContext - run programs as other users with su or sudo</span></h2>
25
32
<p>GksuContext - run programs as other users with su or sudo &#8212; Handler that contains all the necessary information for a 
26
33
program to be run by the libgksu library.</p>
27
34
</td>
28
35
<td valign="top" align="right"></td>
29
36
</tr></table></div>
30
37
<div class="refsynopsisdiv">
31
 
<h2>Synopsis</h2>
 
38
<a name="synopsis"></a><h2>Synopsis</h2>
32
39
<pre class="synopsis">
33
40
 
34
41
 
79
86
</pre>
80
87
</div>
81
88
<div class="refsect1" lang="en">
82
 
<a name="id2534208"></a><h2>Description</h2>
 
89
<a name="desc"></a><h2>Description</h2>
83
90
<p>
84
91
Everything that is done by libgksu needs to know a lot of stuff
85
92
about what to run, as what user to run and some more information,
88
95
</p>
89
96
</div>
90
97
<div class="refsect1" lang="en">
91
 
<a name="id2534223"></a><h2>Details</h2>
 
98
<a name="details"></a><h2>Details</h2>
92
99
<div class="refsect2" lang="en">
93
 
<a name="id2534229"></a><h3>
 
100
<a name="id2536511"></a><h3>
94
101
<a name="GksuContext"></a>GksuContext</h3>
95
 
<a class="indexterm" name="id2534239"></a><pre class="programlisting">typedef struct {
 
102
<a class="indexterm" name="id2536523"></a><pre class="programlisting">typedef struct {
96
103
  GObject parent;
97
104
 
98
105
  gchar *xauth;
194
201
</div>
195
202
<hr>
196
203
<div class="refsect2" lang="en">
197
 
<a name="id2469818"></a><h3>
 
204
<a name="id2472108"></a><h3>
198
205
<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>
 
206
<a class="indexterm" name="id2472120"></a><pre class="programlisting"><a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a>* gksu_context_new               ();</pre>
200
207
<p>
201
208
Creates a new context to use gksu with. You must
202
209
manually free the context with gksu_context_free
216
223
</div>
217
224
<hr>
218
225
<div class="refsect2" lang="en">
219
 
<a name="id2558889"></a><h3>
 
226
<a name="id2561254"></a><h3>
220
227
<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>
 
228
<a class="indexterm" name="id2561265"></a><pre class="programlisting">void        gksu_context_free               (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
222
229
<p>
223
230
Frees the provided <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.</p>
224
231
<p>
236
243
</div>
237
244
<hr>
238
245
<div class="refsect2" lang="en">
239
 
<a name="id2558953"></a><h3>
 
246
<a name="id2561320"></a><h3>
240
247
<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,
 
248
<a class="indexterm" name="id2561331"></a><pre class="programlisting">void        gksu_context_set_user           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
242
249
                                             gchar *username);</pre>
243
250
<p>
244
251
Sets up what user the command will be run as. The default
266
273
</div>
267
274
<hr>
268
275
<div class="refsect2" lang="en">
269
 
<a name="id2559033"></a><h3>
 
276
<a name="id2561406"></a><h3>
270
277
<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>
 
278
<a class="indexterm" name="id2561417"></a><pre class="programlisting">const gchar* gksu_context_get_user          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
272
279
<p>
273
 
Gets the user the command will be run as, as set 
 
280
Gets the user the command will be run as, as set
274
281
by gksu_context_set_user.</p>
275
282
<p>
276
283
 
295
302
</div>
296
303
<hr>
297
304
<div class="refsect2" lang="en">
298
 
<a name="id2559112"></a><h3>
 
305
<a name="id2561488"></a><h3>
299
306
<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,
 
307
<a class="indexterm" name="id2561499"></a><pre class="programlisting">void        gksu_context_set_command        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
301
308
                                             gchar *command);</pre>
302
309
<p>
303
310
Sets up what command will run with the target user.</p>
324
331
</div>
325
332
<hr>
326
333
<div class="refsect2" lang="en">
327
 
<a name="id2559199"></a><h3>
 
334
<a name="id2561577"></a><h3>
328
335
<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>
 
336
<a class="indexterm" name="id2561588"></a><pre class="programlisting">const gchar* gksu_context_get_command       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
330
337
<p>
331
 
Gets the command that will be run, as set by 
 
338
Gets the command that will be run, as set by
332
339
gksu_context_set_command.</p>
333
340
<p>
334
341
 
353
360
</div>
354
361
<hr>
355
362
<div class="refsect2" lang="en">
356
 
<a name="id2559279"></a><h3>
 
363
<a name="id2561659"></a><h3>
357
364
<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,
 
365
<a class="indexterm" name="id2561670"></a><pre class="programlisting">void        gksu_context_set_password       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
359
366
                                             gchar *password);</pre>
360
367
<p>
361
368
Sets up what is the password to be passed to su/sudo. *</p>
382
389
</div>
383
390
<hr>
384
391
<div class="refsect2" lang="en">
385
 
<a name="id2559366"></a><h3>
 
392
<a name="id2561749"></a><h3>
386
393
<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>
 
394
<a class="indexterm" name="id2561760"></a><pre class="programlisting">const gchar* gksu_context_get_password      (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
388
395
<p>
389
396
Gets the password that is set for calling the su/sudo
390
397
programs.</p>
411
418
</div>
412
419
<hr>
413
420
<div class="refsect2" lang="en">
414
 
<a name="id2559446"></a><h3>
 
421
<a name="id2561831"></a><h3>
415
422
<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,
 
423
<a class="indexterm" name="id2561844"></a><pre class="programlisting">void        gksu_context_set_login_shell    (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
417
424
                                             gboolean value);</pre>
418
425
<p>
419
426
Should the shell in which the command will be run be
441
448
</div>
442
449
<hr>
443
450
<div class="refsect2" lang="en">
444
 
<a name="id2559514"></a><h3>
 
451
<a name="id2561923"></a><h3>
445
452
<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>
 
453
<a class="indexterm" name="id2561936"></a><pre class="programlisting">gboolean    gksu_context_get_login_shell    (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
447
454
<p>
448
455
Finds out if the shell created by the underlying su process
449
456
will be a login shell.</p>
470
477
</div>
471
478
<hr>
472
479
<div class="refsect2" lang="en">
473
 
<a name="id2559588"></a><h3>
 
480
<a name="id2562006"></a><h3>
474
481
<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,
 
482
<a class="indexterm" name="id2562018"></a><pre class="programlisting">void        gksu_context_set_keep_env       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
476
483
                                             gboolean value);</pre>
477
484
<p>
478
485
Should the environment be kept as it is? Defaults to
501
508
</div>
502
509
<hr>
503
510
<div class="refsect2" lang="en">
504
 
<a name="id2559668"></a><h3>
 
511
<a name="id2562097"></a><h3>
505
512
<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>
 
513
<a class="indexterm" name="id2562109"></a><pre class="programlisting">gboolean    gksu_context_get_keep_env       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
507
514
<p>
508
515
Finds out if the environment in which the program will be
509
516
run will be reset.</p>
522
529
<tr>
523
530
<td>
524
531
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
525
 
<td> TRUE if the environment is going to be kept, 
 
532
<td> TRUE if the environment is going to be kept,
526
533
FALSE otherwise.
527
534
</td>
528
535
</tr>
531
538
</div>
532
539
<hr>
533
540
<div class="refsect2" lang="en">
534
 
<a name="id2559740"></a><h3>
 
541
<a name="id2562179"></a><h3>
535
542
<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,
 
543
<a class="indexterm" name="id2562190"></a><pre class="programlisting">void        gksu_context_set_debug          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
537
544
                                             gboolean value);</pre>
538
545
<p>
539
546
Set up if debuging information should be printed.</p>
560
567
</div>
561
568
<hr>
562
569
<div class="refsect2" lang="en">
563
 
<a name="id2559819"></a><h3>
 
570
<a name="id2562268"></a><h3>
564
571
<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>
 
572
<a class="indexterm" name="id2562279"></a><pre class="programlisting">gboolean    gksu_context_get_debug          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
566
573
<p>
567
574
Finds out if the library is configured to print debuging
568
575
information.</p>
589
596
</div>
590
597
<hr>
591
598
<div class="refsect2" lang="en">
592
 
<a name="id2559889"></a><h3>
 
599
<a name="id2562348"></a><h3>
593
600
<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,
 
601
<a class="indexterm" name="id2562359"></a><pre class="programlisting">void        gksu_context_set_ssh_fwd        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
595
602
                                             gboolean value);</pre>
596
603
<p>
597
604
Set up if we are running inside a sshd forwarding
621
628
</div>
622
629
<hr>
623
630
<div class="refsect2" lang="en">
624
 
<a name="id2559970"></a><h3>
 
631
<a name="id2562439"></a><h3>
625
632
<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>
 
633
<a class="indexterm" name="id2562450"></a><pre class="programlisting">gboolean    gksu_context_get_ssh_fwd        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
627
634
<p>
628
635
Finds out if the library is configured as being run inside a
629
636
ssh X11 forwarding tunnel.
651
658
</div>
652
659
<hr>
653
660
<div class="refsect2" lang="en">
654
 
<a name="id2560042"></a><h3>
 
661
<a name="id2562520"></a><h3>
655
662
<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
 
663
<a class="indexterm" name="id2562534"></a><pre class="programlisting">gboolean    gksu_context_sudo_try_need_password
657
664
                                            (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
658
665
<p>
659
666
Checks if we need to ask for a password or if we have ways of
683
690
</div>
684
691
<hr>
685
692
<div class="refsect2" lang="en">
686
 
<a name="id2560117"></a><h3>
 
693
<a name="id2562605"></a><h3>
687
694
<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>
 
695
<a class="indexterm" name="id2562618"></a><pre class="programlisting">gboolean    gksu_context_try_need_password  (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
689
696
<p>
690
697
Checks if we need to ask for a password or if we have ways of
691
698
getting the password for ourselves or we simply don't need it.
714
721
</div>
715
722
<hr>
716
723
<div class="refsect2" lang="en">
717
 
<a name="id2560191"></a><h3>
 
724
<a name="id2562689"></a><h3>
718
725
<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,
 
726
<a class="indexterm" name="id2562700"></a><pre class="programlisting">gboolean    gksu_context_run_full           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
720
727
                                             GksuAskPasswordFunc ask_pass,
721
728
                                             gpointer user_data,
722
729
                                             GksuPasswordNotNeededFunc pass_not_needed,
785
792
</div>
786
793
<hr>
787
794
<div class="refsect2" lang="en">
788
 
<a name="id2560420"></a><h3>
 
795
<a name="id2562916"></a><h3>
789
796
<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,
 
797
<a class="indexterm" name="id2562927"></a><pre class="programlisting">gboolean    gksu_context_run                (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
791
798
                                             GError **error);</pre>
792
799
<p>
793
800
This could be considered one of the main functions in GKSu.
821
828
</div>
822
829
<hr>
823
830
<div class="refsect2" lang="en">
824
 
<a name="id2560517"></a><h3>
 
831
<a name="id2563016"></a><h3>
825
832
<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,
 
833
<a class="indexterm" name="id2563027"></a><pre class="programlisting">gboolean    gksu_context_sudo_run_full      (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
827
834
                                             GksuAskPasswordFunc ask_pass,
828
835
                                             gpointer user_data,
829
836
                                             GksuPasswordNotNeededFunc pass_not_needed,
892
899
</div>
893
900
<hr>
894
901
<div class="refsect2" lang="en">
895
 
<a name="id2560746"></a><h3>
 
902
<a name="id2563247"></a><h3>
896
903
<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,
 
904
<a class="indexterm" name="id2563257"></a><pre class="programlisting">gboolean    gksu_context_sudo_run           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
898
905
                                             GError **error);</pre>
899
906
<p>
900
907
This could be considered one of the main functions in GKSu.
930
937
</div>
931
938
</div>
932
939
<div class="refsect1" lang="en">
933
 
<a name="id2560854"></a><h2>See Also</h2>
 
940
<a name="id2563357"></a><h2>See Also</h2>
934
941
<p>
935
942
For convenience Gtk+2.0 widgets to request the user's password take a
936
943
look at libgksuui1.0 and its API reference.
937
944
</p>
938
945
</div>
939
946
</div>
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>&lt;&lt;&#160;Main Reference</b></a></td>
942
 
<td align="right"></td>
943
 
</tr></table>
944
947
</body>
945
948
</html>