Headless Ubuntu Server Installation with GeniCam cameras

To test GeniCam cameras, I installed headless Linux, Ubuntu Server 16.04.4 LTS, on a laptop, without graphics, to mimic our AWS servers, none of which have GUI. The whole process takes about one hour, excluding research time, of course. Some key notes are listed below.

  1. Download: https://www.ubuntu.com/download/server  over 800M, only half size of the Ubuntu desktop version.
  2. Bootable USB: created from the .iSO above, by rufus-2.18p.exe
  3. Boot from USB: Boot in UEFI mode. Booting from CD needs legacy mode.
  4. Boot manager: GRUB2 version 2.02
  5. Partitions: sda1: UEFI boot partition, sda5: Linux OS boot volume, I set it to 10G. The default AWS Root Device is only 8G
  6. Wireless: different from Desktop Network Manager. Some key commands are: (wlp6s0 is wireless interface name)
    1. sudo ifconfig wlp6s0 up
    2. sudo iwlist wlp6s0 scan
    3. sudo iwconfig wlp6s0 essid “RwAtt” key mypassword
    4. sudo dhclient -v wlp6s0
  7. GeniCam Camera driver installation(Smartek as example):
    1. install libnl-route-3-200
    2. build kernel module from source, which ends up as /lib/modules/4.4.0-116-generic/kernel/drivers/video/u3vdrv.ko
    3. add configuration to /etc/ld.so.conf.d
  8. Pitfalls: I always get boot failure with message “no bootable device found” whenever trying to if=/dev/sda5, or changing boot mode to Legacy then back to UEFI. I think it’s BIOS bug. Fix: tell BIOS the GRUB binary location by typing in \EFI\ubuntu\grubx64.efi in boot options in BIOS

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.


  1. http://www.straightrunning.com/xmingnotes/portable.php
  2. http://www.scrc.umanitoba.ca/doc/tutorial/T19_3a_xsrvputty.htm

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. http://maxv.maxxsports.cc:5575/bvsc/doc


  1. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md
  2. https://www.nginx.com/resources/admin-guide/configuration-files/
  3. https://linode.com/docs/development/version-control/install-gitlab-on-ubuntu-14-04-trusty-tahr/

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 Framos.com, 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.