Eventscripts

From Stratodesk Knowledge Base
Jump to: navigation, search

NoTouch has different "hooks" that can be used to attach custom program code at certain events. This is about advanced customization scenarios and not used in day-to-day operation. You may define your own scripts or copy/paste commands that you got from third parties or Stratodesk support. While absolutely no Linux know-how is necessary in regular NoTouch operation, this is the way to go to the Linux OS level and fully use its power. Most likely, if you install 3rd party applications on your own you will find these event scripts handy as well.

Boot-up event scripts

The boot-up event scripts are found in "All" and then "Event scripts". It is so rarely used that there is no top-level link in the local configuration application, that's why you need to click on "All" first. In NoTouch Center however, these parameters are merged into the "Eventscripts" tab.

EventScripts.png

The parameters are structured according to the point they are executed in the boot process:

  • Startup 0 - before hotplug service. This executed at the earlierst possible moment. Devices, neither internal nor peripherals, are yet initialized.
  • Startup 1 - before network initialization. Right before starting to initialize the network, but after initializing devices and loading drivers.
  • Startup 2 - with networking. At this point the system should be on the network and have an IP address.
  • Startup 3 - after local services. This is run when local services such as the SSH service (if activated), the NTP service (if activated), the administration tool etc are running.
  • Startup 4 - at GUI/X11 start. This command is special because it will block the NoTouch execution - it is executed during the GUI subsystem (X11 server) start.

Note - if not explicitly mentioned, commands will not block execution. That makes sure the system will boot up, but it may lead to race conditions (i.e. you believing your command should do something but in fact a NoTouch-internal routine could be faster and disturb your command).

Connection-specific event scripts

You can also define scripts or commands that are executed on connection-specific events, such as starting a connection. Please see Connection#customization hooks for more information.

X Server event scripts

To put custom code into the execution of the X server (=the low-level GUI subsystem), please see X11#Customization hooks.

Network-related event scripts

To run custom code based on network interface up/down events, please see Interface configuration#Event scripts.