First, install the basic package
[email protected] software]# Yum install libmagickcore libmagickwand libjpeg-turbo-devel Libjpeg-turbo libpng-devel Compat-glibc-headers Libbsd-devel xdotool-y
Second, installation Ttyrec
[[email protected] software]# tar xf ttyrec-1.0.8.tar.gz[[email protected] Software]# unzip -q ttyrec-1.0.8.rhel5.patch.zip[[email protected] software]# cd ttyrec-1.0.8[[email protected] ttyrec-1.0.8]# patch -i ttyrec-1.0.8.rhel5.patch //hit Patch patching file makefilepatching file ttyrec.c[[email protected] ttyrec-1.0.8]# makegcc -o2 -dhave_openpty -c -o ttyrec.o ttyrec.cgcc -o2 -dhave_openpty -c -o io.o io.cgcc -O2 -DHAVE_openpty -o ttyrec ttyrec.o io.o -lutilgcc -o2 -dhave_openpty -c -o ttyplay.o ttyplay.cgcc -o2 -DHAVE_openpty -o ttyplay ttyplay.o io.ogcc -O2 -DHAVE_openpty -c -o ttytime.o ttytime.cgcc -o2 -dhave_openpty -o ttytime ttytime.o io.o[[ email protected] ttyrec-1.0.8]# lltotal 188-rw-r--r-- 1 root root 4193 Jun 11 2006 io.c-rw-r--r-- 1 root root 371 jun 11 2006 io.h-rw-r--r-- 1 root root 4256 jul 23 04:32 io.o-rw-r--r-- 1 root root 654 Jul 23 04:32 makefile-rw-r--r-- 1 root root 429 jun 11 2006 README-rw-r--r-- 1 root root 1588 Mar 13 2015 Tty2gif.py-rwxr-xr-x 1 root root 20327 jul 23 09:57 ttygif-rwxr-xr-x 1 root root 15447 jul 23 04:32 ttyplay-rw-r--r-- 1 root root 1128 juN 11 2006 ttyplay.1-rw-r--r-- 1 root root 7687 jun 11 2006 ttyplay.c-rw-r--r-- 1 root root 8648 Jul 23 04:32 ttyplay.o-rwxr-xr-x 1 root root 24505 jul 23 04:32 ttyrec-rw-r--r-- 1 root root 1454 jun 11 2006 ttyrec.1-rw-r--r-- 1 root root 935 jul 23 04:31 Ttyrec-1.0.8.rhel5.patch-rw-r--r-- 1 root root 9789 jul 23 04:32 ttyrec.c-rw-r--r-- 1 root root 145 jun 11 2006 ttyrec.h-rw-r--r-- 1 root root 18168 Jul 23 04:32 ttyrec.o-rw-r--r-- 1 root root 441 jul 23 09:21 ttyrecord-rwxr-xr-x 1 root root 9995 jul 23 04:32 ttytime-rw-r--r-- 1 root root 432 jun 11 2006 ttytime.1-rw-r--r-- 1 root root 2459 Jun 11 2006 ttytime.c-rw-r--r-- 1 root root 2152 jul 23 04:32 ttytime.o[[email protected] ttyrec-1.0.8]# cp ttyplay ttyrec ttytime /usr/ local/bin[[email protected] ttyrec-1.0.8]# ttyrec // Make a recording [[email protected] ttyrec-1.0.8]# echo "Hello,word" hello,word[[email protected] ttyrec-1.0.8]# exit //end recording [[Email protected] ttyrec-1.0.8]# ttyplay ttyrecord //Local playback, Ttyrecord after recording the default file, you can customize the file [[email protected] ttyrec-1.0.8]# ttyrec test //custom recording files [[email protected] ttyrec-1.0.8]# ll test-rw-r--r--. 1 root root 466 jul 23 19:28 test
Convert the recording file to GIF
[Email protected] software]# unzip-q seq2gif-master.zip[[email protected] seq2gif-master]#./configure[[email Protected] seq2gif-master]# Make[[email protected] seq2gif-master]# make Install[[email protected] ttyrec-1.0.8]# Seq2gif-i ttyrecord-o Tty.gif[[email protected] ttyrec-1.0.8]# ll tty.gif-rw-r--r--. 1 root root 28068 Jul 19:31 tty.gif Appendix: Git Clone https://github.com/saitoha/seq2gifwget http://0xcc.net/ttyrec/ Ttyrec-1.0.8.tar.gzwget https://codeload.github.com/gist/08c41b8b16ca3b969df4/zip/ 62767e5f3564346394f5a21bd4fe377d2e05c51c
Iv. Results
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/85/21/wKioL1eauDbSIRNyAABtpnOpnWA461.gif-wh_500x0-wm_3 -wmp_4-s_2435403079.gif "title=" Tty.gif "alt=" Wkiol1eaudbsirnyaabtpnopnwa461.gif-wh_50 "/>
Recording terminal operations on Linux