From 9f6b17a091222f8240194ae331f64e92ed2c3c28 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Sep 2020 13:10:33 +0200 Subject: Update private VM management scripts --- etc/private/vm-login | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'etc/private/vm-login') diff --git a/etc/private/vm-login b/etc/private/vm-login index 3b501ca..4573cba 100755 --- a/etc/private/vm-login +++ b/etc/private/vm-login @@ -1,6 +1,8 @@ #! /usr/bin/env bash -# Get virtual machine console. +# Get virtual machine console (using screen). +# +# Note: use Ctrl-a k to exit screen (or Ctrl-a a k if running inside screen). # usage="usage: $0 " @@ -22,7 +24,9 @@ pty="$(dirname "$con")/$(basename -s .sock "$con").pty" socat "UNIX-CONNECT:$con" "PTY,link=$pty" & pid="$!" -screen "$pty" +# Hack around terminal permission issue when running under `su - `. +# +script -q -c "screen $pty" /dev/null # Note: socat may have already terminated (e.g., VM was shut down). # -- cgit v1.1