"; */ ?>

To Yammer through Corkscrew and Cygwin

The whole thing started when I wanted to use Yammer from behind a corporate firewall. The only laptop I had handy at that moment had Windows on it, so I thought, well.. I’ll

  • install Cygwin ( a Linux-like environment for Windows )
  • download and compile corkscrew ( enables SSH connections over HTTP/HTTPS proxies )
  • set up my proxy server in “$HOME/.ssh/config”:
  • Host *
      ProxyCommand corkscrew myproxy.com 8080 %h %p
  • forward X11 with ssh:
  • export DISPLAY=localhost:0.0
    ssh -2 -4 -C -X -v USER@SERVER
  • start firefox, and login to Yammer
  • DONE

But… Cygwin is not Ubuntu :)

First error I got after a fresh cygwin install was

mkdir: cannot create directory `/cygdrive/h': Permission denied

So here I had to make sure that my “H:” drive is unmapped, and I needed to add:

set HOMEDRIVE=
set HOMEPATH=
set HOMESHARE=

to “C:\cygwin\cygwin.bat” before “bash –login -i” line

The next error was slightly different, but also resembled the first one a lot:

mkdir: cannot create directory `/cygdrive/h': No such file or directory

Here I had to just cruelly delete “C:\cygwin\etc\passwd”

Now moving forward, I downloaded the Corkscrew, configured it ( ./configure ), and was about to compile it when I got:

$ make
gcc -DHAVE_CONFIG_H -I. -I. -I. -I.    -g -O2 -c corkscrew.c
In file included from /usr/include/cygwin/in.h:21,
                 from /usr/include/netinet/in.h:14,
                 from /usr/include/arpa/inet.h:14,
                 from corkscrew.c:2:
/usr/include/cygwin/types.h:120: parse error before "int16_t"
/usr/include/cygwin/types.h:124: parse error before "int32_t"
/usr/include/cygwin/types.h:128: parse error before "int64_t"
/usr/include/cygwin/types.h:137: parse error before "uint16_t"
/usr/include/cygwin/types.h:141: parse error before "uint32_t"
/usr/include/cygwin/types.h:145: parse error before "uint64_t"
/usr/include/cygwin/types.h:154: parse error before "u_int16_t"
/usr/include/cygwin/types.h:158: parse error before "u_int32_t"
/usr/include/cygwin/types.h:162: parse error before "u_int64_t"
/usr/include/cygwin/types.h:177: parse error before "register_t"
In file included from /usr/include/netinet/in.h:14,
                 from /usr/include/arpa/inet.h:14,
                 from corkscrew.c:2:
/usr/include/cygwin/in.h:40: parse error before "in_port_t"
/usr/include/cygwin/in.h:81: parse error before "in_addr_t"
In file included from corkscrew.c:2:
/usr/include/arpa/inet.h:22: parse error before "inet_addr"
/usr/include/arpa/inet.h:24: parse error before "inet_lnaof"
/usr/include/arpa/inet.h:26: parse error before "inet_netof"
/usr/include/arpa/inet.h:27: parse error before "inet_network"
make: *** [corkscrew.o] Error 1

The fix is obvious, right? :) Just needed to add “#include <sys/types.h>” to “C:\cygwin\usr\include\cygwin\types.h”:

#ifndef _CYGWIN_TYPES_H
#define _CYGWIN_TYPES_H
 
#include <sys/types.h>			/* <<<<< add this line */
#include <sys/sysmacros.h>

Now when forwarding X11 traffic over SSH, depending on firewall settings, the port 6000 ( XDMCP ) is most likely blocked:

connect localhost port 6000: Connection refused

Once the port is open, a beautiful window with Firefox and unlimited opportunities shows up making you ready to concur the world!

Tags: