This provides a new configuration option that will turn off the ssh
config parsing. It also removes the flag required to override the ssh
config values with internal json values
This makes it possible to disable wsh for WSL connections. While this is
not recommended, it brings the code closer to the SSH connection
implementation and will make it easier to consolidate the two in the
future.
Skip SSH Agent client initialization if the IdentitiesOnly config is set
for a given host
For now, we only need to support this for the SSH Agent, but if we ever
add support for PKCS11Provider or SecurityKeyProvider, we'll need to
update this check to also ignore those.
See https://man.openbsd.org/ssh_config#IdentitiesOnly
This adds an RPC command for updating wsh on a remote machine without
starting a new session. It is not being used yet, but will be used for
connections using a single server in the future.
lots of misc connection refactoring / fixes:
* adds blocklogger as a way to writing logging information from the backend directly to the a terminal block
* use blocklogger in conncontroller
* use blocklogger in sshclient
* fix remote name in password prompt
* use sh -c to get around shell weirdness
* remove cmd.exe special cases
* use GetWatcher().GetFullConfig() rather than re-reading the config file
* change order of things we do when establishing a connection. ask for wsh up front. then do domain socket, then connserver
* reduce number of sessions required in the common case when wsh is already installed. running the connserver is now a "multi-command" which checks if it is installed, then asks for the version
* send jwt token over stdin instead of in initial command string
* fix focus bug for frontend conn modal
* track more information in connstatus
* simplify wshinstall function
* add nowshreason
* other misc cleanup
Simplifies the regex so it doesn't have as many negations.
Adds an option to pass the `/etc/passwd` values needed for pamparse so
that we can mock them for the tests. Also allows us to only grab those
values once at launch, since they shouldn't change.
This fix will overwrite the XDG variables when creating a shell session
and only if the installation is Snap (as determined by the presence of
the `$SNAP` environment variable). It also will parse the user's PAM
files, if present, to ensure that if the XDG variables were set there,
they're restored. Otherwise, if the variables are set in an RC or
profile file, we'll already pick it up when the shell starts.
closes#1696
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Mac's `defaults read -g AppleLocale` command can return locales that
don't have a language in /usr/share/locale. This prevents those locales
from using a language with UTF-8 support. This will use en_US.UTF-8 as a
default to cover those cases if there are problems. As per usual, if
LANG is already set, that value will be used instead.
* use pwsh over powershell if installed (on windows) for default shell
* refactor blockcontroller.DoRunShellCommand into a "setup" and "manage" phase
* fix wshcmd-conn to also disconnect wsl connections
* new genconn interfaces to make a standardized environment to run SSH/WSL commands via `sh -c`. also create better quoting functions that are composable
* replace html/template with text/template for shell command templating (avoids special chars getting turned into HTML entities, breaking the commands)
* do not reinstall wsh if the installed version has a higher version (prevents flip-flopping on shared systems)
* simplify clientOs/clientArch detection. use `uname -sm`. also validate the os/arch combo as compatible with our builds.
* replace CpHostToRemote with CpWshToRemote. hard codes wsh paths inside of the function instead of having them passed in (quoting restrictions)
* new SyncBuffer class to use with commands that properly synchronizes Writes/String output
* fix setTermSize to actually update DB with terminal size
fixed issue #1613 partially,
added window:dimensions as a setting which gives the user to define
dimensions.
fixed the zoom in and out logic to prevent the app from crashing.
Had issues with getting setting zoomfactor in emain-tabview.ts. will fix
it
I did not mean to close the previous pr, anyway i tried to implement
what you suggested, the backend now does most of it
and DeleteWorkspace will return an unclaimed id and avoid closing the
window.
```go
const moveToNewWorkspace = await WorkspaceService.DeleteWorkspace(workspaceId)
console.log("delete-workspace done", workspaceId, ww?.waveWindowId);
if (ww?.workspaceId == workspaceId){
if ( workspaceList?.length > 1 ) {
await ww.switchWorkspace(moveToNewWorkspace)
} else {
console.log("delete-workspace closing window", workspaceId, ww?.waveWindowId);
ww.destroy();
}
}
});
```
![unknown_2024 12 26-17
05](https://github.com/user-attachments/assets/9c8455e5-b71c-479d-a15c-ee5c99c7a909)
![unknown_2024 12 26-17
06](https://github.com/user-attachments/assets/5dbf63bc-1ffd-4088-abc0-7c02fac9af94)
---------
Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
As connections can now be stored in the internal connection, a missing
or invalid ssh config should not cause the entire list of connections to
be empty. This change ignores the error from the ssh config and proceeds
to construct the list without it.