1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-18 02:42:05 +03:00
Commit Graph

1204 Commits

Author SHA1 Message Date
Wez Furlong
16a17857f6 update to ssh2 0.4.0 2019-09-15 17:54:37 -07:00
dependabot[bot]
67b500b891 Bump nokogiri from 1.10.3 to 1.10.4 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.3...v1.10.4)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-15 14:37:47 -07:00
Wez Furlong
e818ad9dd1 pty, wezterm: add support for serial ports
Tested only on windows with a USB serial connector to my NUC running
linux.

This allows opening up wezterm on a serial port connection.
Serial is closer to a tty than a pty, so it is a bit different
to configure and use.

This commit allows running:

```
wezterm serial COM3
```

to open a window that connects to the specified COM port.

You can change the baud rate with:

```
wezterm serial --baud 9600 COM3
```

There are more options that could be set, but I'm a bit lazy and
have only exposed the baud rate to the wezterm cli so far.
2019-08-07 10:59:42 -07:00
Wez Furlong
24f6d90ccf improve error reporting for mux-over-ssh 2019-08-06 18:55:55 -07:00
Wez Furlong
786a4c8551 pty: add concept of "default prog" to the pty layer
Previously we had the logic for this in wezterm itself; it would know
how to figure out which shell to run, or whether we should run a
different program by default (the `default_prog` setting).

This was OK, but when I added support for ssh we hit a conceptual
issue: the local side of the ssh session doesn't have any information
about the shell that should be invoked on the remote side and instead
needs to ask the remote to figure that out.   The interfaces defined
in the code didn't allow for this.

This commit formalizes the concept of a default program and allows
it to be carried through to the pty layer, including over ssh sessions.

Since we now have enough smarts to figure out the local shell and the
local home dir, I've removed the logic that run `login -pf` on macos
by default; this should make the terminal startup very slightly faster
on macos, but since I'm currently on a windows system, I can only test
linux and windows on this side of this commit.  I'll follow up on macos
later.
2019-08-06 15:03:25 -07:00
Wez Furlong
073615ef39 pty: remove some dead code 2019-08-06 14:24:06 -07:00
Wez Furlong
863cf1768a pty: fixup passing term to ssh pty requests 2019-08-06 14:17:03 -07:00
Wez Furlong
acfd712efc pty: fix passing env to windows child processes 2019-08-06 14:11:49 -07:00
Wez Furlong
567f3c4c0b remove muxed prefix from mux client title bar 2019-08-06 08:33:01 -07:00
Wez Furlong
cd31323c6a use dark mode by default on windows 2019-08-05 18:00:41 -07:00
Wez Furlong
df43d0e0e9 groundwork for re-connecting muxer over ssh
We can't enable this until we grow some smarts about when the disconnect
warrants a reconnection or not.
2019-08-05 13:41:23 -07:00
Wez Furlong
ca8227a00f use my fork of ssh2 so that we can run properly on windows 2019-08-05 13:40:43 -07:00
Wez Furlong
093a0bb541 refactor code that iterates over client domains
More DRY
2019-08-05 12:55:58 -07:00
Wez Furlong
0fed030dac add wezterm connect DOMAIN subcommand for connecting to muxer
This makes it a bit more convenient to control when and which
multiplexer(s) you want to connect to.

Now that each domain must have a name in the configuration file,
we can address them more conveniently from the command line.
2019-08-05 11:39:05 -07:00
Wez Furlong
f9137c0eec allow using domain names in keybindings and Mux lookup 2019-08-05 11:20:28 -07:00
Wez Furlong
5d6bc3882c require all domains to have names 2019-08-05 11:04:56 -07:00
Wez Furlong
af69842fa0 fix parameter order :-/ 2019-08-05 10:49:48 -07:00
Wez Furlong
51c336d94f remove SshDomain.direct_pty
Now that we have `wezterm ssh ...` we don't need this to be in the
configuration.
2019-08-05 09:43:02 -07:00
Wez Furlong
b46dbe60ba use $USERNAME on windows when defaulting ssh user 2019-08-05 09:35:30 -07:00
Wez Furlong
127b2a567b add wezterm ssh user@host some command
This is mostly useful for folks on Windows, as you can also run
`wezterm start ssh user@host some command` to run the `ssh` binary in a
local pty and let it manage your ssh session.

On Windows the local pty currently breaks mouse reporting
(see https://github.com/microsoft/terminal/issues/376) so it is
desirable to avoid using a local pty if we're going to talk to a
remote system.

This commit makes it a bit more convenient to establish an ad-hoc ssh
session with a pty on a remote host.  This method uses libssh2 under the
covers and thus doesn't support gssapi, which is potentially frustrating
for kerberized environments, but works ok for the majority of users.

There are two issues that I want to resolve in follow up work:

* The TERM has to be sent very early in the channel establishment,
  before we "know" the TERM in the `portable-pty` interface.  Will need to
  figure out how to specify that earlier in an appropriate way.
* Similarly, if no command is specified, we should request the use
  of the shell subsystem but we don't have a way to capture this
  intend with the cmdbuilder. Will need to solve this too.
2019-08-05 09:05:54 -07:00
Wez Furlong
c294b4d7a1 allow direct ssh pty
This basically works, but I want to tidy up how we enable this kind
of connection; right now its a bit of a hack.
2019-08-03 12:47:55 -07:00
Wez Furlong
1818cce7f0 factor out ssh connection code 2019-08-03 11:35:44 -07:00
Wez Furlong
3571cd926e cargo fmt fixup 2019-08-02 12:54:18 -07:00
Wez Furlong
c8aa11ac81 pty: add ssh support
This commit adds (untested!) support for remote ttys over ssh.
It requires that the embedding application connect and authenticate
the ssh session prior to turning it into a PtySystem implementation.
2019-08-02 10:55:04 -07:00
Wez Furlong
5d6f1a5725 adjustments for upstream ssh2 crate changes 2019-08-01 10:26:39 -07:00
Wez Furlong
9d0209d9a5 windows: fix .ssh/known_hosts path 2019-07-30 10:52:10 -07:00
Wez Furlong
dde589af49 fix an issue with pid files when running under wsl
They don't always work, so let's just not use them when under wsl.
Since we now know how to detect when we're running under wsl, we
can use that knowledge to bypass permission checking for the unix
domain sockets automatically too.
2019-07-30 09:45:00 -07:00
Wez Furlong
348575854d Capture terminal errors and show them in a message box
This helps diagnose problems where stderr is not visible.
Let's also capture them to the `log` stream too, and clarify
toml parsing errors, and fix the underlying problem with
ssh_domains not being allowed to be left unspecified.
2019-07-30 08:45:39 -07:00
Wez Furlong
a7722beb0a add support for unix mux via ssh
This adds an ssh domain config type that allows us to ssh to a remote
host and then proxy the unix domain mux protocol over the ssh session.
2019-07-28 16:15:44 -07:00
Wez Furlong
9d46bd889f pty: fixup build when serde_support is not enabled 2019-07-23 13:31:01 -07:00
Wez Furlong
83e1f410e0 remove dead code attribute 2019-07-23 11:11:19 -07:00
Wez Furlong
23e174a324 fully bump filedescriptor dep 2019-07-23 09:50:48 -07:00
Wez Furlong
3d8e4f8b0e fix issue where focusing the window would clear the clipboard
This was particularly noticable on windows.
2019-07-17 08:58:45 -07:00
Wez Furlong
7e50c4db68 workaround conpty drop issue 2019-07-17 08:42:41 -07:00
Wez Furlong
25bb43262d unbreak the default windows pty
I was too focused on the wsl case and didn't test this.  We can't
redirect the process handles without causing some problems with
starting up cmd.exe.   Comment out that portion of the code for
the moment.
2019-07-16 23:04:38 -07:00
Wez Furlong
e2ac4ebb49 remove some stray debug prints 2019-07-16 20:57:43 -07:00
Wez Furlong
f3bbecbe9e document new way to start up wezterm+wsl 2019-07-16 15:11:14 -07:00
Wez Furlong
48a12da096 capture logs on startup on win32, fixup spawning wsl from gui 2019-07-16 14:14:40 -07:00
Wez Furlong
6ace6d4fcc avoid a panic when resizing a muxed tab as the first event 2019-07-16 09:34:51 -07:00
Wez Furlong
34ae350d88 allow spawning a server inside wsl 2019-07-16 09:05:35 -07:00
Wez Furlong
919c4d96e8 update filedescriptor crate
Pick up this fix to avoid hanging when closing out a mux'd tab:
bd4df51948
2019-07-16 00:30:53 -07:00
Wez Furlong
8cc5f33600 fix unix domain mux on windows
WSAPoll really doesn't like it if you pass in POLLERR, so don't do that.
2019-07-16 00:29:34 -07:00
Wez Furlong
9370a2d07b improve error logging when failing to daemonize 2019-07-09 09:12:15 -07:00
Wez Furlong
df20277d85 clippy 2019-07-06 08:18:59 -07:00
Wez Furlong
d18383416e termwiz: update version
This pulls in the new vtparse crate and publishes Mark's new
API in the termwiz parser.
2019-06-29 19:20:11 -07:00
Wez Furlong
ed5dcd71da vtparse: document things 2019-06-29 19:13:45 -07:00
Wez Furlong
d67d4aab57 avoid marking a tab as dead when we might reconnect it 2019-06-29 16:31:13 -07:00
Wez Furlong
4fc6914602 reduce the amount of RefCell is in server/tab.rs 2019-06-29 16:31:13 -07:00
Wez Furlong
5440cbe521 replace vte with our own vtparse crate
This enables using large OSC buffers in a form that we can publish
to crates.io without blocking on an external crate.  Large OSC
buffers are important both for some tunnelling use cases and for
eg: iTerm2 image protocol handling.
2019-06-29 16:28:39 -07:00
Wez Furlong
192eaeb3ff vtparse: Add utf-8 support 2019-06-29 16:15:15 -07:00