Search code examples
shelljitsi

Automatically entering value when Dialogue Appears (Shell)


I am trying to write a script to install jitsi-meet automatically.

During installation, a dialog appears. Can i enter the value of the field from the script automatically and simulate ENTER so that i can install without any human interaction?


Solution

  • After more research on this topic, i've found that there is no simple script you can write to enter values automatically.

    The only possible solution i've found are:

    1. Debconf [Thank You, Mark Setchell] If the application supports it, You can simply use use debconf to set values before hand.
    2. Passing values as arguments. If the application supports it, You can pass value as arguments in CLI.

    Specifically in the case of jitsi-meet, you can set value with the help of debconf. Install debconf-utils: sudo apt install debconf-utils

    Then, use debconf-get-selections | grep jitsi to view the values already set and to change values(or set new values):

    echo "jitsi-videobridge jitsi-videobridge/jvb-hostname string my-domain" | debconf-set-selections
    echo "jitsi-meet jitsi-meet/cert-choice select Self-signed certificate will be generated" | debconf-set-selections
    Or
    echo "jitsi-meet jitsi-meet/cert-path-crt string /etc/ssl/my-domain.crt" | debconf-set-selections
    echo "jitsi-meet jitsi-meet/cert-choice select A certificate is available and the files are uploaded on the server" | debconf-set-selections
    echo "jitsi-meet jitsi-meet/cert-path-key string /etc/ssl/my-domain.key" | debconf-set-selections
    

    You can use sudo DEBIAN_FRONTEND=noninteractive apt-get -y install jitsi-meet at the time of installation to avoid the interactive input screens. :)