diff options
Diffstat (limited to 'source/dialogs')
-rw-r--r-- | source/dialogs/ssh.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/source/dialogs/ssh.c b/source/dialogs/ssh.c index 96230bf8..66fdc74a 100644 --- a/source/dialogs/ssh.c +++ b/source/dialogs/ssh.c @@ -78,25 +78,10 @@ static inline int execshssh ( const char *host ) { char **args = NULL; int argsv = 0; - helper_parse_setup ( config.ssh_command, &args, &argsv, "{host}", host, NULL ); - - GError *error = NULL; - g_spawn_async ( NULL, args, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error ); - - if ( error != NULL ) { - char *msg = g_strdup_printf ( "Failed to execute: 'ssh %s'\nError: '%s'", host, error->message ); - rofi_view_error_dialog ( msg, FALSE ); - g_free ( msg ); - // print error. - g_error_free ( error ); - g_strfreev ( args ); - return FALSE; - } - // Free the args list. - g_strfreev ( args ); + helper_parse_setup ( config.ssh_command, &args, &argsv, "{host}", host, NULL ); - return TRUE; + return helper_execute ( NULL, args, "ssh ", host ); } /** |