mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-18 21:31:12 +00:00
Terminal fixes
This commit is contained in:
parent
7d1b02bb2f
commit
4f2ccea254
|
@ -1,17 +1,20 @@
|
||||||
package io.xpipe.app.beacon.impl;
|
package io.xpipe.app.beacon.impl;
|
||||||
|
|
||||||
|
import com.sun.net.httpserver.HttpExchange;
|
||||||
import io.xpipe.app.util.TerminalLauncherManager;
|
import io.xpipe.app.util.TerminalLauncherManager;
|
||||||
import io.xpipe.beacon.BeaconClientException;
|
import io.xpipe.beacon.BeaconClientException;
|
||||||
import io.xpipe.beacon.api.SshLaunchExchange;
|
import io.xpipe.beacon.api.SshLaunchExchange;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.core.process.ProcessControlProvider;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
|
|
||||||
import com.sun.net.httpserver.HttpExchange;
|
|
||||||
|
|
||||||
public class SshLaunchExchangeImpl extends SshLaunchExchange {
|
public class SshLaunchExchangeImpl extends SshLaunchExchange {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object handle(HttpExchange exchange, Request msg) throws Exception {
|
public Object handle(HttpExchange exchange, Request msg) throws Exception {
|
||||||
|
if ("echo $SHELL".equals(msg.getArguments())) {
|
||||||
|
return "/bin/bash";
|
||||||
|
}
|
||||||
|
|
||||||
var usedDialect = ShellDialects.getStartableDialects().stream()
|
var usedDialect = ShellDialects.getStartableDialects().stream()
|
||||||
.filter(dialect -> dialect.getExecutableName().equalsIgnoreCase(msg.getArguments()))
|
.filter(dialect -> dialect.getExecutableName().equalsIgnoreCase(msg.getArguments()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
|
@ -345,7 +345,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean showInfo() throws IOException {
|
private boolean showInfo() throws IOException {
|
||||||
boolean set = AppCache.get("termiusSetupa", Boolean.class, () -> false);
|
boolean set = AppCache.get("termiusSetup", Boolean.class, () -> false);
|
||||||
if (set) {
|
if (set) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1012,9 +1012,9 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||||
TERMIUS,
|
TERMIUS,
|
||||||
XSHELL);
|
XSHELL);
|
||||||
List<ExternalTerminalType> LINUX_TERMINALS = List.of(
|
List<ExternalTerminalType> LINUX_TERMINALS = List.of(
|
||||||
KittyTerminalType.KITTY_LINUX,
|
|
||||||
AlacrittyTerminalType.ALACRITTY_LINUX,
|
AlacrittyTerminalType.ALACRITTY_LINUX,
|
||||||
WezTerminalType.WEZTERM_LINUX,
|
WezTerminalType.WEZTERM_LINUX,
|
||||||
|
KittyTerminalType.KITTY_LINUX,
|
||||||
KONSOLE,
|
KONSOLE,
|
||||||
XFCE,
|
XFCE,
|
||||||
ELEMENTARY,
|
ELEMENTARY,
|
||||||
|
|
|
@ -83,7 +83,8 @@ public interface KittyTerminalType extends ExternalTerminalType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default boolean isRecommended() {
|
default boolean isRecommended() {
|
||||||
return true;
|
// There are some race conditions with the socket
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue