Switch to using the hostname from the CLI for settings

This removes the need to wait for data from the remote machine
before sending data to it.
This commit is contained in:
Kovid Goyal
2022-03-12 15:14:16 +05:30
parent f54a3e8036
commit b2e74e4830
5 changed files with 30 additions and 55 deletions

View File

@@ -4,7 +4,6 @@
import atexit
import base64
import getpass
import io
import os
import pwd
@@ -59,9 +58,8 @@ def dcs_to_kitty(type, payload):
def send_data_request():
hostname = os.environ.get('HOSTNAME') or os.uname().nodename
write_all(tty_fd, dcs_to_kitty(
'ssh', 'id=REQUEST_ID:hostname={}:pwfile=PASSWORD_FILENAME:user={}:compression=bz2:pw=DATA_PASSWORD'.format(hostname, getpass.getuser())))
'ssh', 'id=REQUEST_ID:pwfile=PASSWORD_FILENAME:pw=DATA_PASSWORD'))
def debug(msg):