Skip to content

key handling behavior when autostarted via crontab #67

@alphajoza

Description

@alphajoza

What version of GoTTY are you using (gotty --version)?

v1.5.0

What operating system and browser are you using?

Ubuntu 22.04.2 LTS
Google Chrome 112.0.5615.50 (Official Build) (64-bit)

What did you do?

I want to run gotty upon server reboot so I added the following to crontab -e:

@reboot /root/gotty/gotty --config "/root/gotty/.gotty" tmux new -A -s gotty

the content of /root/gotty/.gotty is:

address = "1.1.1.1"
port = "1010"
enable_tls = true
tls_crt_file = "/root/cert.crt"
tls_key_file = "/root/private.key"
enable_basic_auth = true
credential = "admin:admin"
permit_write = true

What did you expect to see?

successful execution and normal operation of gotty

What did you see instead?

crontab successfully executes and runs gotty upon reboot and I can access terminal at 1.1.1.1:1010 as usual but interpretation and handling of some key combinations are now different from what was the expected behavior.

for example: ctrl + l writes literally ^L on the terminal rather than resetting it.
or pressing tab for completing a filename, writes literally a tab character (empty space)

  1. Is this a bug or because of how crontab handles the execution?

  2. If not a bug, what is the correct procedure to run gotty upon server reboot?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions