Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
zshrc: add function grml-remote-support
Provide a simple way to connect to the running Grml system via tmate
by encoding the tmate ssh session in a QR code which can be scanned and
sent to the remote support side.
  • Loading branch information
jkirk committed Jun 24, 2020
commit d336df85259da98b36d8b4db20351e2b0448fd0f
11 changes: 11 additions & 0 deletions etc/zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -2817,6 +2817,17 @@ graphic chipset."
return 1
}
fi

if check_com -c tmate && check_com -c qrencode ; then
function grml-remote-support() {
tmate -L grml-remote-support new -s grml-remote-support -d
tmate -L grml-remote-support wait tmate-ready
tmate -L grml-remote-support display -p '#{tmate_ssh}' | qrencode -t ANSI
echo "tmate session: $(tmate -L grml-remote-support display -p '#{tmate_ssh}')"
echo
echo "Scan this QR code and send it to your support team."
}
fi
}

# now run the functions
Expand Down