diff --git a/src/protocols/ssh/client.c b/src/protocols/ssh/client.c index 9eb902fd..3183e22e 100644 --- a/src/protocols/ssh/client.c +++ b/src/protocols/ssh/client.c @@ -56,6 +56,7 @@ const char* GUAC_CLIENT_ARGS[] = { #ifdef ENABLE_SSH_AGENT "enable-agent", #endif + "color-scheme", NULL }; @@ -113,6 +114,14 @@ enum __SSH_ARGS_IDX { IDX_ENABLE_AGENT, #endif + /** + * The name of the color scheme to use. Currently valid color schemes are: + * "black-white", "white-black", "gray-black", and "green-black", each + * following the "foreground-background" pattern. By default, this will be + * "gray-black". + */ + IDX_COLOR_SCHEME, + SSH_ARGS_COUNT }; @@ -174,7 +183,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) { client_data->font_name, client_data->font_size, client->info.optimal_resolution, client->info.optimal_width, client->info.optimal_height, - GUAC_TERMINAL_SCHEME_GRAY_BLACK); + argv[IDX_COLOR_SCHEME]); /* Fail if terminal init failed */ if (client_data->term == NULL) { diff --git a/src/protocols/telnet/client.c b/src/protocols/telnet/client.c index d24a0bf6..dab2bdab 100644 --- a/src/protocols/telnet/client.c +++ b/src/protocols/telnet/client.c @@ -53,6 +53,7 @@ const char* GUAC_CLIENT_ARGS[] = { "password-regex", "font-name", "font-size", + "color-scheme", NULL }; @@ -100,6 +101,14 @@ enum __TELNET_ARGS_IDX { */ IDX_FONT_SIZE, + /** + * The name of the color scheme to use. Currently valid color schemes are: + * "black-white", "white-black", "gray-black", and "green-black", each + * following the "foreground-background" pattern. By default, this will be + * "gray-black". + */ + IDX_COLOR_SCHEME, + TELNET_ARGS_COUNT }; @@ -201,7 +210,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) { client_data->font_name, client_data->font_size, client->info.optimal_resolution, client->info.optimal_width, client->info.optimal_height, - GUAC_TERMINAL_SCHEME_GRAY_BLACK); + argv[IDX_COLOR_SCHEME]); /* Fail if terminal init failed */ if (client_data->term == NULL) {