From 4f2ccea2541df836bf6d0687075cb9d3b9b3a028 Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 29 Aug 2024 00:30:16 +0000 Subject: [PATCH] Terminal fixes --- .../io/xpipe/app/beacon/impl/SshLaunchExchangeImpl.java | 7 +++++-- .../java/io/xpipe/app/terminal/ExternalTerminalType.java | 4 ++-- .../main/java/io/xpipe/app/terminal/KittyTerminalType.java | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/SshLaunchExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/SshLaunchExchangeImpl.java index 716da1155..e990553c3 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/SshLaunchExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/SshLaunchExchangeImpl.java @@ -1,17 +1,20 @@ package io.xpipe.app.beacon.impl; +import com.sun.net.httpserver.HttpExchange; import io.xpipe.app.util.TerminalLauncherManager; import io.xpipe.beacon.BeaconClientException; import io.xpipe.beacon.api.SshLaunchExchange; import io.xpipe.core.process.ProcessControlProvider; import io.xpipe.core.process.ShellDialects; -import com.sun.net.httpserver.HttpExchange; - public class SshLaunchExchangeImpl extends SshLaunchExchange { @Override public Object handle(HttpExchange exchange, Request msg) throws Exception { + if ("echo $SHELL".equals(msg.getArguments())) { + return "/bin/bash"; + } + var usedDialect = ShellDialects.getStartableDialects().stream() .filter(dialect -> dialect.getExecutableName().equalsIgnoreCase(msg.getArguments())) .findFirst(); diff --git a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java index 1b2059536..7ec8c50a8 100644 --- a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java @@ -345,7 +345,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue { } private boolean showInfo() throws IOException { - boolean set = AppCache.get("termiusSetupa", Boolean.class, () -> false); + boolean set = AppCache.get("termiusSetup", Boolean.class, () -> false); if (set) { return true; } @@ -1012,9 +1012,9 @@ public interface ExternalTerminalType extends PrefsChoiceValue { TERMIUS, XSHELL); List LINUX_TERMINALS = List.of( - KittyTerminalType.KITTY_LINUX, AlacrittyTerminalType.ALACRITTY_LINUX, WezTerminalType.WEZTERM_LINUX, + KittyTerminalType.KITTY_LINUX, KONSOLE, XFCE, ELEMENTARY, diff --git a/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java index 5e384096b..645f296ac 100644 --- a/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java @@ -83,7 +83,8 @@ public interface KittyTerminalType extends ExternalTerminalType { @Override default boolean isRecommended() { - return true; + // There are some race conditions with the socket + return false; } @Override