1x2goserver-run-extensions(8)   X2Go Server Tool   x2goserver-run-extensions(8)
2
3
4

NAME

6       x2goserver-run-extensions - Run X2Go Server Extensions
7

SYNOPSIS

9       x2goserver-run-extensions <session_id> <modality>
10
11

DESCRIPTION

13       x2goserver-run-extensions is called from within a number of X2Go Server
14       core scripts.
15
16       WARNING: Do not call it directly unless you really know what you are
17       doing.
18
19       x2goserver-run-extensions executes scripts that have been provided by
20       third-party X2Go extension packages.
21
22       What this man page is about is not the script usage itself but the way
23       of how to provide X2Go server extensions and features without the need
24       to change the core X2Go server scripts.
25

MODALITIES

27       x2goserver-run-extensions is called with user privileges. As first
28       command line argument the session ID and as the second command line
29       argument a so-called modality is provided.
30
31       This modality tells x2goserver-run-extensions at what stage of an X2Go
32       session startup, resumption, suspension or termination the calling
33       script currently is at.
34
35       These X2Go Server core scripts currently call x2goserver-run-
36       extensions: x2gostartagent(8), x2goruncommand(8), x2goresume-
37       session(8), x2gosuspend-session(8) and x2goterminate-session(8).
38
39       The modality names all refer to a sub-directory of the path:
40
41         <libexecdir>/x2go/extensions
42
43       where <libexecdir> is /usr/libexec/x2go or /usr/lib/x2go on commonly-
44       used GNU/Linux systems.
45
46       In any of these sub-directories third-party X2Go extension packages can
47       place scripts or binaries that will then get executed by the core X2Go
48       server commands, either before or after the essential functionality
49       (e.g. x2goagent startup, x2goagent suspension, x2goagent resumption,
50       etc.) or on failure of that essential functionality.
51
52       The following table shows the available modalities, the calling scripts
53       and the location where to place third-party extension scripts:
54
55
56        CALLING SCRIPT        MODALITY NAMES    EXTENSION SCRIPTS LOCATION
57        --------------        ---------------   --------------------------
58        x2gostartagent        pre-start         extensions/pre-start.d/
59                              post-start        extensions/post-start.d/
60                              fail-start        extensions/fail-start.d/
61        x2goruncommand        pre-runcommand    extensions/pre-runcommand.d/
62                              post-runcommand   extensions/post-runcommand.d/
63                              fail-runcommand   extensions/fail-runcommand.d/
64        x2goresume-session    pre-resume        extensions/pre-resume.d/
65                              post-resume       extensions/post-resume.d/
66                              fail-resume       extensions/fail-resume.d/
67        x2gosuspend-session   pre-suspend       extensions/pre-suspend.d/
68                              post-suspend      extensions/post-suspend.d/
69                              fail-suspend      extensions/fail-suspend.d/
70        x2goterminate-session pre-terminate     extensions/pre-terminate.d/
71                              post-terminate    extensions/post-terminate.d/
72                              fail-terminate    extensions/fail-terminate.d/
73
74
75       IMPORTANT:
76              When providing X2Go Server extensions by this mechanism, please
77              pretty well make sure that extension scripts you place in either
78              of the above folders do under no circumstance fail during
79              execution. Return codes are ignored and failures are therefore
80              not (yet) propagated.
81

EXECUTION OF EXTENSIONS

83       Scripts (or binaries) that have been placed into one of the
84       pre/post/fail modality folders (see above) are executed in alpha-
85       numerical sorting order.
86
87       Extensions will only get executed if their file names start with three
88       digits followed by an underscore character.  This restriction is in
89       place to make sure that X2Go Server extensions get executed in the
90       correct/wanted order:
91
92       For example:
93         010_x2goserver-statistics
94         020_x2goserver-mail-notify
95         021_x2goserver-monitoring
96         etc. pp.
97

RETURN VALUES

99       x2goserver-run-extensions always returns 0 as exit code and pretends to
100       be permanently happy :-).
101

SEE ALSO

103       x2gostartagent(8), x2goruncommand(8), x2goresume-session(8),
104       x2gosuspend-session(8) and x2goterminate-session(8).
105

AUTHOR

107       This manual has been written by Mike Gabriel <mike.gabriel@das-
108       netzwerkteam.de> for the X2Go project (https://www.x2go.org).
109
110
111
112Version 4.1.0.3                    Nov 2018       x2goserver-run-extensions(8)
Impressum