Learning Linux has quite a curve to it and sometimes taking a break and planting a digital tree might do some good. In this article, I am going to guide you on how to plant a cool digital bonsai tree that you can even set as a wallpaper for your Ubuntu box.
For those who lacks a little bit of general information about agriculture, a bonsai tree is an art form originated from the land of the rising sun, Japan. It is to mimic the shape and scale of full sized trees through special cultivation techniques and these miniature trees are grown in small containers.
Guide on how to plant a cool digital bonsai tree: Getting your Ubuntu environment ready to compile C++ code
First, you need to install the build-essential package which includes all the tools for building Ubuntu packages from c or c++.
But before that as always update and upgrade your Ubuntu installation first by running the below command.
sudo apt update && sudo apt upgrade -y
Next install the build-essential package by running the command below into the terminal.
sudo apt install build-essential
Since the code is hosted at gitlab run the command enable pulling packages from there.
sudo apt install build-essential git pkgconf
Ensure that ncurses library is installed to avoid the fatal error: ncurses.h: no such file or directory. Run the command as below.
sudo apt install libncurses6 libncurses-dev ncurses-base ncurses-bin
Now you can start to compile and install the program. Run the commands below to encomplish it.
git clone https://gitlab.com/jallbrit/cbonsai cd cbonsai make install PREFIX=~/.local
You will get the results below if compilation finishes successfully.
cc -Wall -pedantic cbonsai.c -lncurses -ltinfo -lpanel -o cbonsai install -TDm 0755 cbonsai /home/tech201/.local/bin/cbonsai
Guide on how to plant a cool digital bonsai tree: Getting started with the bonsai tree generator
Head over to the location where cbonsai was installed. Type in the command below to run the program as well.
If you would like to view the bonsai tree grow as live, please use the below command.
To set the digital bonsai tree as a screensaver, enter the command below.
If you want to add a custom message to your bonsai, use the command below.
~/.local/bin/cbonsai -l -m "Welcome to tech201"
Conclusion on the topic of how to plant a cool digital bonsai tree
You can achieve a lot of things running Linux and having a digital bonsai tree growing on your screen is one of them.
Sometimes doing things off the path makes learning a little more fun and imaginative. You get to explore more and pick up something new along the way.