Brandon Black
6c04291419
Fix ncurses detection at configure time
...
There appears to be a typo/thinko in the ncurses detection
stuff in configure.ac. The fallout was that on a Linux host
without ncurses-devel installed, "./configure" failed to find
curses.h but claimed overall success, then the build failed
later during make. This patch removes an extraneous comma, which
seems to make it both fail and succeed correctly when it should.
2012-04-16 17:13:59 -04:00
Keith Winstein
bfa0999089
Final tab-related bugfix (of the morning). Now matches xterm more closely.
2012-04-16 11:31:37 -04:00
Keith Winstein
0293e579d2
Properly reset tab stops on resize
2012-04-16 09:55:59 -04:00
Keegan McAllister
c390ee9b80
Hardcode the terminals which accept "set window title"
...
terminfo does not have reliable information on this, so we hardcode a whitelist
of terminal type prefixes. This is the list from Debian's default screenrc,
plus "screen" itself (which also covers tmux).
Closes #172 .
Closes #191 .
2012-04-16 09:23:30 -04:00
Keith Winstein
feb352c809
Optional verifier for round-trippability, and fix wrapping and tab bugs.
2012-04-16 09:09:20 -04:00
Keith Winstein
18dc967c09
Small fixups to pty reversal to make work on Linux.
2012-04-16 07:27:24 -04:00
Jay Freeman (saurik)
fe8e50de2b
Reverse the direction of the IO::Pty used for ssh.
...
May address #114 .
May address #164 .
2012-04-16 07:16:54 -04:00
Keith Winstein
bcb96d9337
Change some asserts flagging runtime errors to fatal_asserts (Anders Kaseorg)
2012-04-16 06:27:14 -04:00
Keith Winstein
a8c3df9c80
More robust shutdown sequence with warning on unclean shutdown.
2012-04-16 06:22:35 -04:00
Keith Winstein
79542106c1
Make still_connecting() false if network not initialized, to fix confusing error msg.
2012-04-16 03:51:30 -04:00
Keegan McAllister
c8fe5a3999
mosh-client: Return true for still_connecting if !network
...
Fixes:
$ MOSH_KEY=foo ./mosh-client 127.0.0.1 60010
Crypto exception: Key must be 22 letters long.
Segmentation fault
Closes #189 .
2012-04-16 03:46:09 -04:00
Keith Winstein
c15d3d0c48
Use "ANSI-mode" cursor keys only on actual cursor keys (A through D).
...
Fixes #161 .
2012-04-16 03:44:07 -04:00
Keith Winstein
cca925e020
Reset prediction engine after size has changed (i.e. after Resize is applied)
2012-04-16 03:06:11 -04:00
Keith Winstein
679b819216
Display original command line (including hostname) in mosh-client argv.
...
Closes #180 .
Closes #117 .
2012-04-16 02:55:17 -04:00
Keith Winstein
119bbcaced
Add nicer message and 15s timeout if server can't be reached on UDP.
...
(Closes #152 )
2012-04-16 02:31:27 -04:00
Ed Schouten
033953dcd2
Don't leak utmpx entries on shutdown.
...
As far as I know, for all implementations of libutempter, the
utempter_remove_added_record() function depends on the file descriptor
passed to utempter_add_record() to still be valid. The reason for this,
is that this file descriptor is propagated to the setuid utility that is
responsible for modifying utmpx.
Modify the code to remove the utmpx entry before closing the
pseudo-terminal master device. While there, simply use
utempter_remove_record(), which takes the file descriptor explicitly.
The advantage is that this prevents potential foot-shooting in the
future. Visual inspection of the source code will make it more obvious
that utempter depends on the file descriptor.
Closes #179 .
2012-04-16 01:37:48 -04:00
Joshua Pollack
59e8364178
Add support for Cygwin, which has curses headers in /usr/include/ncurses
...
[keithw -- applied style change from kmcallister]
Closes #181 .
2012-04-16 00:54:27 -04:00
Keith Winstein
25b0e0e8ab
Make new pipe2() test work properly when pipe2() undefined (e.g. on OS X).
2012-04-16 00:47:55 -04:00
Keith Winstein
c57ded1790
Clarify usage statement.
2012-04-16 00:46:01 -04:00
Keith Winstein
c1c102ff07
Document --ssh option in mosh(1) man page.
...
Closes #173 .
2012-04-16 00:03:35 -04:00
Alexander Rapp
86113b5f7a
scripts/mosh: Add --ssh flag
...
Let users specify an ssh outside their PATH, or extra flags like -p or -i.
Modify the usage message to describe this feature and hint at the
semantic difference viz. --client=path\ to\ client vs --ssh="path\ to\
ssh".
Closes #53
[keithw@mit.edu -- applied fixes per Anders Kaseorg]
2012-04-15 23:48:12 -04:00
Keegan McAllister
c2a5941f88
Fall back to naive built-in byte-swap routines
...
EL5 lacks htobe64 and friends. Using its byteswap.h requires an endianness
check in our headers, which is fragile and compiler-dependent. It's a fair
amount of code [1], and is only useful on EL5.
So instead, let's include a fallback implementation of these functions, and use
it whenever we can't find the (now-)standard Linux or OS X routines. The
fallback is endianness-independent and should work on any platform.
[1] https://github.com/rurban/mosh/commit/da1a5abd1e09f0c1e9295357bb480a643d9dc8e3
2012-04-15 23:42:15 -04:00
Keegan McAllister
85d197346a
configure.ac: Check that we can use O_CLOEXEC with pipe2().
...
Needed for EL5.
Based on:
https://github.com/rurban/mosh/commit/c70c3707e65b42ac9b9da937e9c255211330805e
2012-04-15 23:42:15 -04:00
Keith Winstein
99e8626a01
Tidy check for exception in Network::Connection::send().
2012-04-15 23:29:05 -04:00
Keith Winstein
7103c5f48b
Using fclose() instead of close() means future fprintf() doesn't kill us on Mac.
2012-04-15 23:25:21 -04:00
Keith Winstein
f376b80018
Fix protobuf -I lines to build with non-system protobuf
2012-04-15 23:20:10 -04:00
Keith Winstein
aca69ef684
Server does not need to raise exception on failed sendto(). Fixes #183 .
2012-04-15 23:13:58 -04:00
Keith Winstein
6b6747cda7
Fix valgrind error with 1-col char then 2-col char in a 1x1 terminal
2012-04-15 17:11:40 -04:00
Keegan McAllister
cd2d482484
Don't use *_t for our own typedefs
...
It's reserved by POSIX.
(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister
937882caff
Remove Boost dep for Fedora too
2012-04-15 13:49:15 -04:00
Keegan McAllister
280400152d
Replace one find_if with a loop
...
g++/libstdc++ 4.1.2 is unhappy with this use of bind2nd, possibly because the
argument is a reference. This is a problem for EL5.
2012-04-15 13:49:15 -04:00
Keegan McAllister
8bcc001b52
Remove Boost entirely
2012-04-15 13:49:15 -04:00
Keegan McAllister
2675f13676
Remove boost::lambda remaining instances from terminaloverlay.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
06fa8eaedb
Remove boost::lambda from PredictionEngine::get_or_make_row
2012-04-15 13:49:15 -04:00
Keegan McAllister
5f1bc88ed8
Remove boost::lambda with for_each in terminaloverlay.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
8f099cafbb
Remove boost::lambda from ConditionalOverlayCell::get_validity
2012-04-15 13:49:15 -04:00
Keegan McAllister
83694977a7
Remove boost::lambda from transportsender.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
8bc9aa33bf
Remove boost::lambda from completeterminal.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
4152af9c8e
Remove BOOST_AUTO from terminaloverlay.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
5320fbd346
Remove BOOST_AUTO from completeterminal.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
6e56fd2157
Remove BOOST_AUTO from terminaldisplay.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
87a5f86794
Remove BOOST_AUTO from terminalframebuffer.cc
2012-04-15 13:49:15 -04:00
Keegan McAllister
5904d4f5e6
Remove BOOST_AUTO from transportsender.cc
2012-04-15 13:49:15 -04:00
Keith Winstein
cc8b1f293a
Forcibly detach earlier in blind effort to fix #114 (needs testing)
2012-04-15 12:38:48 -04:00
Keith Winstein
8f60f7ab05
Convey locale-related environment variables as backup, and nicer error.
...
Fixes #74 .
2012-04-14 16:56:48 -04:00
Keith Winstein
597756b846
Document new -v (verbose) server switch.
2012-04-14 13:56:46 -04:00
Keith Winstein
a4221d17a4
Disable posterization and rely solely on TERM to tell remote end about colors
...
(should help #155 github issue)
2012-04-14 13:46:38 -04:00
Keith Winstein
0e9be1b471
Close terminal fd's to properly detach on old sshd (e.g. RHEL/CentOS 5.0).
...
May help some sufferers of #114 github issue.
2012-04-14 12:37:28 -04:00
Keith Winstein
1823f7e860
Provide more helpful error message on lack of -t argument.
2012-04-14 12:29:05 -04:00
Keith Winstein
5c20c8d4be
Keep using OSC 0 when possible to preserve compability with older clients.
...
Re: #137
2012-04-14 02:11:31 -04:00