Currently, the example cdm hook only runs cdm on tty1. I'd like to run it on multiple terminals in order to have multiple x sessions in parallel (this would of course need another config option for disabling the check for a running X process, but that's the easy part).
The obvious problem with that feature is that if we make the ttys configurable in the config file, we need to either include the check in cdm itself, which is bad in case of crashes, or read the config file in the cdm hook, which is bad because of code duplication.
My first idea was to make the cdm script sourceable and executable[1]. We could then source the script from the hook and use its functions to read the tty configuration, but the problem with crashes would persist.
Do you have another idea how to achieve selecting ttys via configuration? I am volunteering for implementing it.
Currently, the example cdm hook only runs cdm on tty1. I'd like to run it on multiple terminals in order to have multiple x sessions in parallel (this would of course need another config option for disabling the check for a running X process, but that's the easy part).
The obvious problem with that feature is that if we make the ttys configurable in the config file, we need to either include the check in cdm itself, which is bad in case of crashes, or read the config file in the cdm hook, which is bad because of code duplication.
My first idea was to make the cdm script sourceable and executable[1]. We could then source the script from the hook and use its functions to read the tty configuration, but the problem with crashes would persist.
Do you have another idea how to achieve selecting ttys via configuration? I am volunteering for implementing it.
[1] https://www.linuxquestions.org/questions/programming-9/detect-bash-script-source-vs-direct-execution-685193/