在Linux上录制终端的操作
在Linux上录制终端的操作
来源 http://blog.51cto.com/stuart/1831570
一、安装基础软件包
|
1
|
[root@test software]# yum install libMagickCore libMagickWand libjpeg-turbo-devel libjpeg-turbo libpng-devel compat-glibc-headers libbsd-devel xdotool -y |
二、安装ttyrec
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
[root@test software]# tar xf ttyrec-1.0.8.tar.gz[root@test software]# unzip -q ttyrec-1.0.8.RHEL5.patch.zip[root@test software]# cd ttyrec-1.0.8[root@test ttyrec-1.0.8]# patch -i ttyrec-1.0.8.RHEL5.patch //打补丁patching file Makefilepatching file ttyrec.c[root@test 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[root@test 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[root@jrgc ttyrec-1.0.8]# cp ttyplay ttyrec ttytime /usr/local/bin[root@jrgc ttyrec-1.0.8]# ttyrec //进行录制[root@jrgc ttyrec-1.0.8]# echo "hello,word"hello,word[root@jrgc ttyrec-1.0.8]# exit //结束录制[root@test ttyrec-1.0.8]# ttyplay ttyrecord //本地播放,ttyrecord录制后默认文件,可以自定义文件[root@test ttyrec-1.0.8]# ttyrec test //自定义录制文件[root@test ttyrec-1.0.8]# ll test-rw-r--r--. 1 root root 466 Jul 23 19:28 test |
三、将录制文件转换成GIF
|
1
2
3
4
5
6
7
8
9
10
11
|
[root@test software]# unzip -q seq2gif-master.zip[root@test seq2gif-master]# ./configure[root@test seq2gif-master]# make[root@test seq2gif-master]# make install[root@test ttyrec-1.0.8]# seq2gif -i ttyrecord -o tty.gif[root@test ttyrec-1.0.8]# ll tty.gif-rw-r--r--. 1 root root 28068 Jul 23 19:31 tty.gif附录: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 |
四、结果

在Linux上录制终端的操作的更多相关文章
- 如何在 Linux 上录制你的终端操作
导读 录制一个终端操作可能是一个帮助他人学习 Linux .展示一系列正确命令行操作的和分享知识的通俗易懂方法.不管是出于什么目的,从终端复制粘贴文本需要重复很多次,而录制视频的过程也是相当麻烦,有时 ...
- linux之shell终端使用操作快捷键
所谓的shell终端就是桌面右键里面的打开终端那个终端 敲命令是一件很有趣的事,可是有时候我们会遇到一些很麻烦的事 例如,命令太长导致敲完后一大串字符可读性低,想把vi filename 快速改为ca ...
- linux文件或文件夹常见操作,排查部署在linux上程序问题常用操作
创建文件夹 mkdir [-p] DirName [ 在工作目录下,建立一个名为 A 新的子目录 : mkdir A 在工作目录下的 B目录中,建立一个名为 T 的子目录: 若 B 目录不存在,则 ...
- 如何在linux下录制terminal操作?
相关包: ttyrec: ttyrec is a tty recorder. Recorded data can be played back with the included ttyplay co ...
- 在Windows上使用终端模拟程序连接操作Linux以及上传下载文件
在Windows上使用终端模拟程序连接操作Linux以及上传下载文件 [很简单,就是一个工具的使用而已,放这里是做个笔记.] 刚买的云主机,或者是虚拟机里安装的Linux系统,可能会涉及到在windo ...
- 提升效率的Linux终端快捷操作汇总
很多普通 Linux 桌面用户都对使用终端感到排斥和恐惧,其实它没大家想的那么复杂,很多常见操作都可以直接在终端中进行,如:安装软件.升级系统等. 无论你是新手还是 Linux 终端使用的老鸟,系统极 ...
- Linux终端快捷操作汇总
定位单词 在长段的命令中,使用 Ctrl + ← 和 Ctrl + → 可快速将光标定位到命令中单词的首字母或末尾,实现在各单词之间的快速跳动定位. 你可以试着在终端中输入 apt-get insta ...
- jmeter操作数据库,分布式,在Linux上运行
jmeter操作数据库: 1.在测试计划中导入数据库jar包 2.添加链接数据库信息 3.mysql:jdc:mysql://192.168.1.116:3307/bugfree?allowMulti ...
- C++的标准库函数默认都是操作字节,而不是字符,非常痛苦,所以引入了u16string和u32string(Linux上的wchar_t是32位的原因,utf16对unicode的支持是有缺陷的)good
时至今日,字符串使用unicode已经是不需要理由的常识,但对一些有着悠久历史的编程语言来说,这仍然是个头痛的问题.如果抛开第三方库的支持,C++其实并不能实际有效地支持unicode,即使是utf8 ...
随机推荐
- XCode快捷键使用
:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdow ...
- Dijkstra&&Floyd
文章来源:(http://www.cnblogs.com/biyeymyhjob/archive/2012/07/31/2615833.html) (以下内容皆为转载) Dijkstra算法 1.定义 ...
- datatable行内内容太长,有时不自动换行解决方法
加一个css属性即可 style = "word-wrap:break-word;" js代码: "render": function (data, type, ...
- linux命令讲解
1.vi命令 1.光标移动到文件的最后一行 G :$ ]] 2.光标移动到文件的第一行 :0 gg [[ 3.从光标所在位置将光标移动到当前行的开头 0 ^ ...
- python json.dumps raise TypeError(repr(o) + " is not JSON serializable") TypeError: 0 is not JSON serializable
出错如题. 这个问题有可能是因为python的json.dumps没法识别dump内容里的某些数据类型导致的.我的问题是因为dict中含有numpy.int64,numpy.float等类型导致的,需 ...
- 微信网页授权access_token与基础支持的access_token
问题1:网页授权access_token与分享的jssdk中的access_token一样吗? 答:不一样.网页授权access_token 是一次性的,而基础支持的access_token的是有时间 ...
- PHP关于 []
在一个表格里,提交时,名字部分加一个[],表示数组,这样,存在多个同样名字的name.前面的value不会替代后面value,如下面 <td><input name="so ...
- Dropping Balls(小球下落)
紫书P148,例题6-6 Sample Input 4 2 3 4 10 1 2 2 8 128 Sample Output 12 7 512 3 255 这应该不仅仅是一棵完全二叉树,题目中说保证所 ...
- CERC2017 F: Faulty Factorial 简单数论题
#include <iostream> using namespace std; #define ll long long ; ll n,p,r; ll poww(ll a,ll b){ ...
- Atlantis HDU - 1542
Problem Description There are several ancient Greek texts that contain descriptions of the fabled is ...