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
+2 -7
View File
@@ -107,8 +107,7 @@ am_x3_ssh_OBJECTS = x3_ssh-main.$(OBJEXT) \
x3_ssh-ssh_client.$(OBJEXT) x3_ssh-key_store.$(OBJEXT)
x3_ssh_OBJECTS = $(am_x3_ssh_OBJECTS)
am__DEPENDENCIES_1 =
x3_ssh_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
x3_ssh_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
x3_ssh_LINK = $(CXXLD) $(x3_ssh_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
@@ -234,8 +233,6 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSSH_CFLAGS = @LIBSSH_CFLAGS@
LIBSSH_LIBS = @LIBSSH_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
@@ -313,14 +310,12 @@ x3_ssh_CXXFLAGS = \
-std=c++17 \
$(GTK_CFLAGS) \
$(VTE_CFLAGS) \
$(LIBSSH_CFLAGS) \
-DLOCALEDIR=\"$(localedir)\" \
-DICONDIR=\"$(datadir)/icons\"
x3_ssh_LDADD = \
$(GTK_LIBS) \
$(VTE_LIBS) \
$(LIBSSH_LIBS)
$(VTE_LIBS)
iconsdir = $(datadir)/icons
dist_icons_DATA = ../icons/x3-ssh.png