|x2goserver-run-extensions(8)||X2Go Server Tool||x2goserver-run-extensions(8)|
NAME¶x2goserver-run-extensions - Run X2Go Server Extensions
x2goserver-run-extensions <session_id> <modality>
DESCRIPTION¶x2goserver-run-extensions is called from within a number of X2Go Server core scripts.
WARNING: Do not call it directly unless you really know what you are doing.
x2goserver-run-extensions executes scripts that have been provided by third-party X2Go extension packages.
What this man page is about is not the script usage itself but the way of how to provide X2Go server extensions and features without the need to change the core X2Go server scripts.
MODALITIES¶x2goserver-run-extensions is called with user privileges. As first command line argument the session ID and as the second command line argument a so-called modality is provided.
This modality tells x2goserver-run-extensions at what stage of an X2Go session startup, resumption, suspension or termination the calling script currently is at.
The modality names all refer to a sub-directory of the path:
where <libexecdir> is /usr/libexec/x2go or /usr/lib/x2go on commonly-used GNU/Linux systems.
In any of these sub-directories third-party X2Go extension packages can place scripts or binaries that will then get executed by the core X2Go server commands, either before or after the essential functionality (e.g. x2goagent startup, x2goagent suspension, x2goagent resumption, etc.) or on failure of that essential functionality.
The following table shows the available modalities, the calling scripts and the location where to place third-party extension scripts:
CALLING SCRIPT MODALITY NAMES EXTENSION SCRIPTS LOCATION -------------- --------------- -------------------------- x2gostartagent pre-start extensions/pre-start.d/ post-start extensions/post-start.d/ fail-start extensions/fail-start.d/ x2goruncommand pre-runcommand extensions/pre-runcommand.d/ post-runcommand extensions/post-runcommand.d/ fail-runcommand extensions/fail-runcommand.d/ x2goresume-session pre-resume extensions/pre-resume.d/ post-resume extensions/post-resume.d/ fail-resume extensions/fail-resume.d/ x2gosuspend-session pre-suspend extensions/pre-suspend.d/ post-suspend extensions/post-suspend.d/ fail-suspend extensions/fail-suspend.d/ x2goterminate-session pre-terminate extensions/pre-terminate.d/ post-terminate extensions/post-terminate.d/ fail-terminate extensions/fail-terminate.d/
- When providing X2Go Server extensions by this mechanism, please pretty well make sure that extension scripts you place in either of the above folders do under no circumstance fail during execution. Return codes are ignored and failures are therefore not (yet) propagated.
EXECUTION OF EXTENSIONS¶Scripts (or binaries) that have been placed into one of the pre/post/fail modality folders (see above) are executed in alpha-numerical sorting order.
Extensions will only get executed if their file names start with three digits followed by an underscore character. This restriction is in place to make sure that X2Go Server extensions get executed in the correct/wanted order:
For example: 010_x2goserver-statistics 020_x2goserver-mail-notify 021_x2goserver-monitoring etc. pp.
RETURN VALUES¶x2goserver-run-extensions always returns 0 as exit code and pretends to be permanently happy :-).
SEE ALSO¶x2gostartagent(8), x2goruncommand(8), x2goresume-session(8), x2gosuspend-session(8) and x2goterminate-session(8).
AUTHOR¶This manual has been written by Mike Gabriel <firstname.lastname@example.org> for the X2Go project (https://www.x2go.org).
|Nov 2018||Version 220.127.116.11|