Skip to content

Instantly share code, notes, and snippets.

@eerohele
Last active March 3, 2024 04:20
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save eerohele/2349067 to your computer and use it in GitHub Desktop.
Save eerohele/2349067 to your computer and use it in GitHub Desktop.
Compiling Mosh (http://mosh.mit.edu/) under Cygwin

NOTE: You don't need to compile Mosh on Cygwin yourself anymore; just install the package with Cygwin's setup.exe.

  1. Download Cygwin.

  2. Run setup.exe and install the following packages in addition to the default ones:

    • make
    • boost
    • libncurses-devel
    • pkg-config
    • perl
  3. Download and compile Protocol Buffers (make sure there are no spaces in the working directory when compiling Protocol Buffers, make will fail if there are):

     $ tar zxvf protobuf-2.4.1.tar.gz
     $ cd protobuf-2.4.1
     $ ./configure
     $ make
     $ make install
    
  4. Download and compile Mosh:

     $ tar zxvf mosh-1.1.3.tar.gz
     $ cd mosh-1.1.3
     $ ./configure CPPFLAGS="-I/usr/include/ncurses" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
     $ make
     $ make install
    
  5. Install the IO::Pty Perl module:

     $ perl -MCPAN -e shell
     cpan> install IO::Pty
    
  6. Rock’n’roll.

@eerohele
Copy link
Author

Note to future visitors: you don't need to compile Mosh on Cygwin yourself any more; just install the package with Cygwin's setup.exe.

@CMCDragonkai
Copy link

Above instructions is outdated, and the mosh in Cygwin official packages is broken. Instructions to build are here: mobile-shell/mosh#850 (comment)

@alejandro-bello
Copy link

  1. Can't download a .gz. The "Protocol Buffers" link points to a git repository! Since you're supposedly inside cygwin (not a fancy GUI desktop with a full-fledged web browser), you can't access the "download ZIP" option, so you're left with cloning a git repository, so no ".gz", nor useful instructions after that.
    git clone https://github.com/protocolbuffers/protobuf.git --depth=1

./configure
$ make
$ make install

It's all Ancient Mesopotamian dialect for me. I just wanted to install mosh for Windows, not learn to compile (Python, maybe?) under a completely new interface (cygwin, a pseudo Linux that doesn't work exactly as a ny Linux distro) that demands a obnoxiuslt steep learning curve just to use once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment