

$ sudo apt-get install imagemagick ttyrec gcc x11-apps make git
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make
$ sudo make install$ brew install ttygif$ ttyrec myrecording # 录制
$ ttygif myrecording # 转为GIFError: WINDOWID environment variable was empty. 解决办法
$ sudo apt-get install xdotool
$ export WINDOWID=$(xdotool getwindowfocus)祝你成功