feat: rewrite terminal to use vte_terminal_spawn_sync

Replaced the SSH library + IO thread + intermediate PTY bridge with
vte_terminal_spawn_sync(). This eliminates the broken terminal behavior
(backspace, Ctrl+C, copy/paste, bash completion) caused by the
intermediate PTY with no process on the slave side.

- SshTerminal now spawns 'ssh' as a VTE subprocess
- Removed libssh dependency from terminal (still used for key validation)
- Removed IO thread, manual PTY creation, and thread synchronization
- VTE now handles all terminal I/O, line discipline, resize, etc.
- Password saved: uses sshpass -e with SSHPASS env var if available
- Password not saved: ssh prompts interactively in the terminal
- Removed show_password_dialog (no longer needed)
- Simplified connect flow in ssh_client.cpp
This commit is contained in:
x3
2026-09-07 16:54:21 +00:00
parent 69369aedb8
commit 916a167f67
12 changed files with 142 additions and 576 deletions
Vendored
+1 -99
View File
@@ -613,8 +613,6 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
LIBSSH_LIBS
LIBSSH_CFLAGS
VTE_LIBS
VTE_CFLAGS
GTK_LIBS
@@ -732,9 +730,7 @@ PKG_CONFIG_LIBDIR
GTK_CFLAGS
GTK_LIBS
VTE_CFLAGS
VTE_LIBS
LIBSSH_CFLAGS
LIBSSH_LIBS'
VTE_LIBS'
# Initialize some variables set by options.
@@ -1382,9 +1378,6 @@ Some influential environment variables:
GTK_LIBS linker flags for GTK, overriding pkg-config
VTE_CFLAGS C compiler flags for VTE, overriding pkg-config
VTE_LIBS linker flags for VTE, overriding pkg-config
LIBSSH_CFLAGS
C compiler flags for LIBSSH, overriding pkg-config
LIBSSH_LIBS linker flags for LIBSSH, overriding pkg-config
Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -5120,97 +5113,6 @@ printf "%s\n" "yes" >&6; }
fi
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh >= 0.9" >&5
printf %s "checking for libssh >= 0.9... " >&6; }
if test -n "$LIBSSH_CFLAGS"; then
pkg_cv_LIBSSH_CFLAGS="$LIBSSH_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libssh >= 0.9\""; } >&5
($PKG_CONFIG --exists --print-errors "libssh >= 0.9") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBSSH_CFLAGS=`$PKG_CONFIG --cflags "libssh >= 0.9" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBSSH_LIBS"; then
pkg_cv_LIBSSH_LIBS="$LIBSSH_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libssh >= 0.9\""; } >&5
($PKG_CONFIG --exists --print-errors "libssh >= 0.9") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBSSH_LIBS=`$PKG_CONFIG --libs "libssh >= 0.9" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
LIBSSH_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libssh >= 0.9" 2>&1`
else
LIBSSH_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libssh >= 0.9" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSSH_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (libssh >= 0.9) were not met:
$LIBSSH_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBSSH_CFLAGS
and LIBSSH_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables LIBSSH_CFLAGS
and LIBSSH_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
LIBSSH_CFLAGS=$pkg_cv_LIBSSH_CFLAGS
LIBSSH_LIBS=$pkg_cv_LIBSSH_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
ac_config_files="$ac_config_files Makefile src/Makefile"
cat >confcache <<\_ACEOF