Document toolboxDocument toolbox

(12.4.2-en) Post-session Custom Commands in IGEL OS 12

You can define an action to be performed when a process or group of processes has ended. The following will refer to this as a global post-session command. You can use the pre-defined actions Logoff or Shutdown or define a custom command.

The main purpose of this function is to monitor the processes of the Base System, but it can also be used for apps. However, typically, apps bring their own post-session commands. The global post-session command can be given priority over the app-specific post-session commands.

You can specify a list of return codes that indicate that the session has ended successfully. Moreover, you can define which command parameters should be ignored; herewith, you can prevent a command like wfica -version from triggering a post-session command.

 


Menu path: System > System Customization > Custom Commands > Post Session

image-20240925-124041.png

 

Activate generic base_system post-session command

The action defined under The post-session command to be executed will be performed when all processes set as a trigger have been ended successfully.
No action will be performed when the process ends. (Default)

 

 

The post-session command to be executed

This command will be executed when all monitored processes have finished successfully.

Possible options:

  • Logoff

  • Shutdown

  • Enter custom command here: Enter the command you want to have executed.

 

 

This session will have priority in executing the post-session command

This setting is relevant if app-specific post-session commands are enabled.

Example: An IGEL Azure Virtual Desktop (AVD) session that has post-session command priority is running. Now, a Citrix Workspace App session that has its own post-session command is started and ended while the AVD session is still running. Because the priority is assigned to the AVD session, the post-session command of the Citrix Workspace App session is ignored.

The global post-session command has priority over any app-specific post-session command.
The global post-session command has no priority.

 

How to Assign Post-Session Command to a One or More Processes

  1. Click image-20240930-081401.png to add a process.

 

 

  1. Enter the Process name. This is the name of the binary that is being executed; it also appears when you monitor your processes with ps or top. In our example, the process a local terminal.

image-20241002-103455.png

 

  1. Enter the Valid return codes for the session. When the process returns one of these return codes, it will be considered as ended successfully. The post-session command will only be executed if the process ends successfully.
    The return codes must be comma-separated. You can define ranges using “..”; for example, a range between 10 and 20 is written as 10..20.

 

 

  1. With Ignore command lines, you can ensure that the post-session command will only be triggered if the program runs normally, not with parameters like --version, or --help, for instance.
    The command lines must be comma-separated.

 

 

  1. Click Confirm, then Save and Close (or Save), and decide whether the change should be sent to the device immediately or after the next reboot.