evertiro / cdm

Console Display Manager
http://evertiro.com
GNU General Public License v2.0
428 stars 40 forks source link

Idea: make ttys configurable and multiple X11 sessions possible #27

Open neurolabs opened 11 years ago

neurolabs commented 11 years ago

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/