Minimum requirement to display GUI on Windows for Linux

I manage multiple Linux servers in AWS, none of which has display server installed, neither x nor Wayland. Display servers run on my Windows machine. I prefer portable application over setup.exe. By portable, I mean no changes to registry, and all change are limited to the local folder that holds the download. There are some portable packages on Windows that can do this well, listed in reference section.

I wanted to go one step further: not only portable, but getting rid of terminal emulator, e.g. PuTTY. The solution on Windows includes two parts: x server and ssh.exe. Here are the key points.

  1. x server: downloaded as zip file. Both Xming and VcXsrv are tested well.
  2. sh.exe: can be copied, instead of installed, over from either git or installed Cygwin.
  3. It’s very important to set DISPLAY variable on both Linux and Windows. On windows it’s like this: set DISPLAY=

X11 forwarding can be removed too: (only tested on the same LAN)

  1. take out -X option when starting ssh.exe
  2. run “DISPLAY=MyWindowHost:0” on Linux.
  3. explicitly tell x server who is allowed to connect. e.g. edit X0.hosts for Xming.



GitLab Community Edition setup was not straightforward

We run Gitlab on premise because, as more partners get involved in the projects,  our boss doesn’t like our IP taken care of by github.

The official set up guide for Ubuntu 14 is not so friendly and here are some points which made the installation not straightforward.

  1. Omnibus package is easy, but we cannot use it. It’s good only “if the server is dedicated only to managing git repositories”. I turned to manual installation, because 40 core server is too big to just do gitlab and I already have nginx running.
  2. The guide is for NGINX Plus, the paid version and therefore does’t apply here well. I am using the free version.
  3. Nginx has to proxy to workhorse socket. If proxied to unicorn, the website works, but git client cannot push.
  4. I really wished my existing MySql to work, but I could not make it. Eventually I had to use PostgreSQL. The document says PostgreSQL is recommended but Mysql still works for installation from source with some limitation.

Even though the installation was painful, gitlab works pretty well once up and running.



AWS fails to Redirect emails, and there is no cure

I asked SES (Amazon Simple Email Service) to Redirect(instead of forward) my emails to Gmail.

It works most of the time, but fails redirecting emails from, who makes GeniCam cameras for us.

Here is the error message:”This message was not eligible for redirection because the sender was not authorized according to the published SPF record”

When I googled this message, two items showed up, but both unanswered.

This failure is a result of fighting email spoofing. Here is my explanation, in an intuitive way.

Framos tells the world (by SPF) who is allowed to send email for him.

(decent servers respect his request, such as SES)

Since Framos doesn’t list SES on his list, SES doesn’t send (same as redirect) his email to me.

Redirection failed by design, and nothing can be done to fix this.

I expect when more domains publish SPF, more emails will fail to redirect.

Extra notes:

Redirecting is different from forwarding.

When SES “forward” Framos’s email to me, and I hit Reply button, I am replying to my SES address, instead of Framos.

With “redirect”, I reply to Framos, which is what I wanted.

How to keep a process running after logout with bash without help from disown and nohup

Necessary and Sufficient Conditions based on my test: (AWS Ubuntu EC2)
1. redirect input and output
2. put it to background by & sign

By doing the two above, with neither disown nor nohup, my process keeps running even after logout from ssh.
However, I am not very clear why.
Example: for(( i = 0; i < 5; i++)); do sleep 2; echo $i; done t.txt 2>&1 &