Revert "fix dialog tty"

This reverts commit 66071e8599b728da8db3fa07d8d7b09e0a789511.