Linux system uses cmatrix to realize digital rain effect

1. Introduction to cmatrix

  • cmatrix is ​​an application that displays a "hacked screen" like effect in the terminal. It can display on-screen characters in a matrix code in a terminal window, with configurable options and colors. It is mostly used to showcase screensavers or ASCII artwork. cmatrix has versions for both Linux and Unix systems, and can be started by entering the "cmatrix" command in a terminal.

2. Introduction to the local environment

2.1 Local Environment Planning

This practice is a personal test environment, and the operating system version is centos7.6.

hostname local P address operating system version kernel version python version
jeven 192.168.3.166 hundred 7.6 3.10.0-957.el7.x86_64 v16.17.0 3.6.8

2.2 Introduction to this practice

1. The deployment environment for this practice is a personal test environment;
2. Realize the digital rain effect on the screen in the centos7.6 environment.

3. Environmental preparation

3.1 Install the development environment

Package group for installing development tools

yum -y groupinstall "Development tools"

insert image description here

3.2 Install basic software

Install basic software

yum install -y gcc gcc-c++ zlib zlib-devel libffi-devel openssl openssl-devel pcre pcre-devel yum-utils vim wget tree htop sqlite-devel

insert image description here

3.3 Install ImageMagick and other tools

Install tools such as ImageMagick

yum install ImageMagick ncurses-devel  gcc -y 

insert image description here

Fourth, install the aalib tool

4.1 Create a new directory

Create a new directory

mkdir -p /data/cmatrix && cd /data/cmatrix/

4.2 Download the aalib installation package

Download the aalib installation package

wget https://nchc.dl.sourceforge.net/project/aa-project/aa-lib/1.4rc5/aalib-1.4rc5.tar.gz

insert image description here

4.3 Decompress the package

Unzip the package

tar -xzf aalib-1.4rc5.tar.gz

insert image description here

4.4 Compile and install aalib

Compile and install aalib

cd aalib-1.4.0/  && ./configure
make && make install

insert image description here

insert image description here

Five, install cmatrix software

5.1 Download cmatrix

Download the cmatrix package

wget https://jaist.dl.sourceforge.net/project/cmatrix/cmatrix/1.2a/cmatrix-1.2a.tar.gz

insert image description here

5.2 Unzip the cmatrix software package

Unzip the cmatrix package

tar -xzf cmatrix-1.2a.tar.gz

5.3 Compile and install cmatrix

Compile and install cmatrix

cd cmatrix-1.2a
./configure && make && make install

insert image description here

5.4 Check cmatrix version

[root@jeven cmatrix-1.2a]# cmatrix -V
 CMatrix version 1.2a by Chris Allegretta (compiled 18:14:42, Aug 10 2023)
 Email: [email protected]  Web: http://www.asty.org/cmatrix

Six, the use effect of cmatrix

6.1 View cmatrix command help

View cmatrix command help

cmatrix --help
-a: 异步滚动
-b: 启用粗体字符
-B: 所有粗体字符(替代-B)
-f: 强制打开linux$TERM类型
-l: Linux模式(使用矩阵控制台字体)
-o: 使用旧式滚动
-h: 打印使用和退出
-n: 没有粗体字符(替代-b和-b,默认值)
-s: “屏幕保护程序”模式,第一次按键时退出
-x: x窗口模式,如果xterm使用mtx.pcf,则使用
-V: 打印版本信息并退出
-u延迟(0-10,默认为4):屏幕更新延迟
-C[color]:将此颜色用于矩阵(默认为绿色)

6.2 Display digital rain effect

Enter cmatrix directly in the command line to display the digital rain effect.

cmatrix

insert image description here

-Combined use example

cmatrix -b -u 3 -C blue

insert image description here

Guess you like

Origin blog.csdn.net/jks212454/article/details/132214900