CentOS 7にscreenFetchをインストールしてみました。
4 Best Tools To Display Linux Distribution Logo Art In Terminal
https://fossbytes.com/linux-distribution-logo-ascii-art-terminal/
GitHub KittyKatt/screenFetch
https://github.com/KittyKatt/screenFetch
- インストール
- 実行
- bcインストール
- ログイン時に表示するように設定
Fedoraでは”dnf install screenfetch“とあるのですがdnfって何?と調べたらyumに変わるパッケージ管理システムなんですね。知らなかった(^^;
yumからDNFへの移行 – Qiita
http://qiita.com/yunano/items/eedd3da40d67394881a2
今回はGitHubからそのまま持ってきました。
1 2 3 4 5 6 7 8 9 10 |
# git clone https://github.com/KittyKatt/screenFetch.git Cloning into 'screenFetch'... remote: Counting objects: 3659, done. remote: Total 3659 (delta 0), reused 0 (delta 0), pack-reused 3659 Receiving objects: 100% (3659/3659), 3.60 MiB | 1.73 MiB/s, done. Resolving deltas: 100% (2111/2111), done. # cp screenFetch/screenfetch-dev /usr/local/bin/screenfetch # ls -l /usr/local/bin/screenfetch -rwxr-xr-x 1 root root 226687 Aug 22 18:59 /usr/local/bin/screenfetch |
実行すると”/usr/local/bin/screenfetch: line 1286: bc: command not found”とエラーが表示されました。bcコマンドが必要なようです。
bcは計算するコマンドのようです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# yum info bc Available Packages Name : bc Arch : x86_64 Version : 1.06.95 Release : 13.el7 Size : 115 k Repo : base/7/x86_64 Summary : GNU's bc (a numeric processing language) and dc (a calculator) URL : http://www.gnu.org/software/bc/ License : GPLv2+ Description : The bc package includes bc and dc. Bc is an arbitrary precision : numeric processing arithmetic language. Dc is an interactive : arbitrary precision stack based calculator, which can be used as a : text mode calculator. : : Install the bc package if you need its number handling capabilities or : if you would like to use its text mode calculator. # yum -y install bc |
ターミナルにログインした時に表示するように設定しました。シェルはbashなので.bashrcに記述します。
1 2 3 |
if [ -f /usr/local/bin/screenfetch ]; then /usr/local/bin/screenfetch -d -pkgs -D "$(cat /etc/redhat-release)" -A "CentOS" fi |
Distributionに/etc/redhat-releaseの内容を表示するように変更しています。
これにより不明なDistributionになってしまいロゴがペンギンになります。
-Aでロゴを指定しています。またPackagesもUnknownになるので非表示にしています。
CPUが100.0°Cになっていますが検証用仮想マシンなので情報が取得できないためと思います。
これでログインすると表示されるようになりました。
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# screenfetch -h Usage: /usr/local/bin/screenfetch [OPTIONAL FLAGS] screenFetch - a CLI Bash script to show system/theme info in screenshots. Supported GNU/Linux Distributions: Alpine Linux, Amazon Linux, Antergos, Arch Linux (Old and Current Logos), Artix Linux, blackPanther OS, BLAG, BunsenLabs, CentOS, Chakra, Chapeau, Chrome OS, Chromium OS, CrunchBang, CRUX, Debian, Deepin, DesaOS,Devuan, Dragora, elementary OS, Evolve OS, Exherbo, Fedora, Frugalware, Fuduntu, Funtoo, Fux, Gentoo, gNewSense, GuixSD, Jiyuu Linux, Kali Linux, KaOS, KDE neon, Kogaion, Korora, LinuxDeepin, Linux Mint, LMDE, Logos, Mageia, Mandriva/Mandrake, Manjaro, Mer, Netrunner, NixOS, OBRevenge, openSUSE, Oracle Linux, Parabola GNU/Linux-libre, Pardus, Parrot Security, PCLinuxOS, PeppermintOS, Qubes OS, Raspbian, Red Hat Enterprise Linux, ROSA, Sabayon, SailfishOS, Scientific Linux, Siduction, Slackware, Solus, Source Mage GNU/Linux, SparkyLinux, SteamOS, SUSE Linux Enterprise, SwagArch, TinyCore, Trisquel, Ubuntu, Viperr, Void and Zorin OS. Other Supported Systems: Dragonfly/Free/Open/Net BSD, Haiku, Mac OS X, Windows+Cygwin and Windows+MSYS2. Supported Desktop Managers: KDE, GNOME, Unity, Xfce, LXDE, Cinnamon, MATE, Deepin, CDE, RazorQt and Trinity. Supported Window Managers: 2bwm, 9wm, Awesome, Beryl, Blackbox, Cinnamon, chromeos-wm, Compiz, deepin-wm, dminiwm, dwm, dtwm, E16, E17, echinus, Emerald, FluxBox, FLWM, FVWM, herbstluftwm, howm, IceWM, KWin, Metacity, monsterwm, Musca, Gala, Mutter, Muffin, Notion, OpenBox, PekWM, Ratpoison, Sawfish, ScrotWM, SpectrWM, StumpWM, subtle, sway, TWin, WindowMaker, WMFS, wmii, Xfwm4, XMonad and i3. Options: -v Verbose output. -o 'OPTIONS' Allows for setting script variables on the command line. Must be in the following format... 'OPTION1="OPTIONARG1";OPTION2="OPTIONARG2"' -d '+var;-var;var' Allows for setting what information is displayed on the command line. You can add displays with +var,var. You can delete displays with -var,var. Setting without + or - will set display to that explicit combination. Add and delete statements may be used in conjunction by placing a ; between them as so: +var,var,var;-var,var. -n Do not display ASCII distribution logo. -L Display ASCII distribution logo only. -N Strip all color from output. -w Wrap long lines. -t Truncate output based on terminal width (Experimental!). -p Portrait output. -s [-u IMGHOST] Using this flag tells the script that you want it to take a screenshot. Use the -u flag if you would like to upload the screenshots to one of the pre-configured locations. These include: teknik, imgur, mediacrush and hmp. -c string You may change the outputted colors with -c. The format is as follows: [0-9][0-9],[0-9][0-9]. The first argument controls the ASCII logo colors and the label colors. The second argument controls the colors of the information found. One argument may be used without the other. -a 'PATH' You can specify a custom ASCII art by passing the path to a Bash script, defining `startline` and `fulloutput` variables, and optionally `labelcolor` and `textcolor`. See the `asciiText` function in the source code for more informations on the variables format. -S 'COMMAND' Here you can specify a custom screenshot command for the script to execute. Surrounding quotes are required. -D 'DISTRO' Here you can specify your distribution for the script to use. Surrounding quotes are required. -A 'DISTRO' Here you can specify the distribution art that you want displayed. This is for when you want your distro detected but want to display a different logo. -E Suppress output of errors. -V, --version Display current script version. -h, --help Display this help. |