diff --git a/bin/guacctl b/bin/guacctl index 4c0508f1..252c8c4d 100755 --- a/bin/guacctl +++ b/bin/guacctl @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2013 Glyptodon LLC +# Copyright (C) 2016 Glyptodon LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -25,11 +25,12 @@ # guacctl # ------- # -# Utility for sending Guacamole-specific console codes for controlling the SSH -# session, such as: +# Utility for sending Guacamole-specific console codes for controlling a +# terminal session, such as: # -# * Downloading files -# * Setting the destination directory for uploads +# * Downloading files (SSH only) +# * Setting the destination directory for uploads (SSH only) +# * Redirecting output to a named pipe stream (SSH or telnet) # # This script may also be run as "guacget", in which case the script accepts # no options and assumes anything given on the commandline is a file to be @@ -58,6 +59,19 @@ send_set_directory() { printf "\033]482201;%s\007" "$FILENAME" } +# Sends the Guacamole-specific console code for redirecting output to a named +# pipe stream (instead of the terminal emulator) +send_open_pipe_stream() { + NAME="$1" + printf "\033]482202;%s\007" "$NAME" +} + +# Sends the Guacamole-specific console code for redirecting output back to the +# terminal emulator +send_close_pipe_stream() { + printf "\033]482203\007" +} + # Prints the given error text to STDERR. error() { echo "$NAME:" "$@" >&2 @@ -66,12 +80,16 @@ error() { # Prints usage documentation for this script. usage() { cat >&2 <