Customizing Calculate Linux

Introduction

Starting with version 17, Calculate Linux has had tools for theme customization. You can make changes both to the installed system and to a LiveUSB, that is, to a distributed system image. All you need is to find or produce suitable images in good resolution.

Feel free to edit the /etc/calculate/ini.env file to customize the Calculate theme. To make it easier, you can copy the sample file first:

cp /etc/calculate/ini.env.example /etc/calculate/ini.env

Three sections are predefined in the file: "system" for configuring system parameters, "theme" for theme configuration and "profile" for user account configuration. Edit the necessary parameters in the theme section. Do not forget to delete the comment character ";". Once satisfied with your modifications, use cl-setup-themes to update the system settings.

Image requirements

  • If possible, use the highest possible resolution. In this case, the background image will look clear on any screen.
  • The image format can be either jpg or png. It will anyway be converted to the required format and to the effective screen resolution.

As a starting point, you can use the theme "Mylène Farmer" if you wish so. It is downloadable from ftp://ftp.lautre.ru/pub/themes/mf.

Change desktop background

To replace the default wallpaper for a user account, do as explained below:

1) Download a wallpaper sample (the save path may be different)

wget ftp://ftp.lautre.ru/pub/themes/mf/wallpaper.jpg -P /usr/share/themes/MF

2) Edit the path to the image:

/etc/calculate/ini.env

[theme]
profile-background = /usr/share/themes/MF/wallpaper.jpg

3) Update the theme settings:

cl-setup-themes

The wallpaper will change only if the background picture has not been changed by the user. Otherwise, you can go to the desktop settings and select a new image. If the image has not changed, re-login.

Change wallpaper

Note

You can also look for "appearance-wallpaper" in the "profile" section of "ini.env" to specify the path that templates will use to reference the image during the profile setup. The difference between these two parameters is that "profile-background" replaces the default image for all users, while "appearance-wallpaper" changes the path to the image at user configuration time.

Changing the boot-up and the shutdown images

To modify the boot-up and the shutdown background images, do as described below:

1) Download a sample boot-up and shutdown themes:

wget ftp://ftp.lautre.ru/pub/themes/mf/splash-*.jpg -P /usr/share/themes/MF

2) Edit the paths:

/etc/calculate/ini.env

[theme]
splash-silent-background = /usr/share/themes/MF/splash-silent.jpg
splash-verbose-background = /usr/share/themes/MF/splash-verbose.jpg
splash-shutdown-background = /usr/share/themes/MF/splash-shutdown.jpg

3) Update the theme settings:

cl-setup-themes

To check the result immediately, run:

splash_manager -c demo --steps=20 -t calculate

A boot-up progress bar will appear:

Change boot-up image

To check the shutdown screen, run:

splash_manager -c demo --steps=20 -t calculate_shutdown

A shutdown progress bar will appear:

Change shutdown image

To check the command line background image, switch to the command line by hitting Ctrl+Alt+F1. To switch back to graphic mode hit Alt+F7.

Change command line background image

Changing the Grub image

To modify the Grub bootloader background image, do as described below:

1) Download a theme sample:

wget ftp://ftp.lautre.ru/pub/themes/mf/grub.jpg -P /usr/share/themes/MF

2) Edit the path to the image:

/etc/calculate/ini.env

[theme]  
grub-background = /usr/share/themes/MF/grub.jpg

3) Update the theme settings:

cl-setup-themes

Restart the computer to see the result:

Change Grub image

Changing the Grub image on a Live USB

To change the Grub image, boot either an existing Calculate Linux system or a Live USB that was created with the cl-install-flash tool. In the example above, Calculate Linux Desktop MATE is used. If your choice goes to another Calculate flavor, replace the path accordingly.

To modify the bootloader image, do as follows:

1) Prepare the system for assembly. You can omit the '--source' option on a system booted from a Live USB. All changes will then be saved for the current USB system image. At the end, the deployment path for the prepared system image will be displayed:

cl-builder-prepare --source /var/calculate/linux/cldm-20180122-x86_64.iso

2) Download an image file:

wget ftp://ftp.lautre.ru/pub/themes/mf/gfxboot.jpg -P /run/calculate/mount/distros_CLDM_amd64/usr/share/themes/MF

3) Create the ini.env file, containing the path to the image:

/run/calculate/mount/distros_CLDM_amd64/etc/calculate/ini.env

[theme]
gfxboot-background = /usr/share/themes/MF/gfxboot.jpg

4) Create the system image with the updated themes:

cl-builder-image --update-themes

5) Delete the temporary files:

cl-builder-break

To apply, restart the computer to boot from the USB drive:

Modifying Grub image on Live USB

Remove themes

You can not only modify themes, but also remove them: all settings will be handled automatically.

To delete a Grub theme, run:

emerge -C media-gfx/grub-splashes-calculate

To delete a boot-up and shutdown themes, run:

emerge -C media-gfx/splash-themes-calculate

To delete the authentication and login background image, run:

emerge -C media-gfx/dm-themes-calculate

To delete a wallpaper, run:

emerge -C media-gfx/calculate-wallpapers

Many packages have USE flags that allow to disable themes selectively.

Even after removing the themes, you still have some choice of appearance options. For instance, you can always reset the color for the bootloader text. To do so, apply the following:

/etc/calculate/ini.env

[theme]
grub-text-color = light-cyan/black
grub-text-highlight-color = white/cyan

To apply the modifications, run the theme setup command:

cl-setup-themes

Changing Grub font color

Conclusion

As you can see, theme management is as simple as can be in Calculate. Calculate Utilities scale your pictures without distorting them, adjust the size and cut the edges in good proportions. The configuration files are associated with the installed packages: media-gfx/splashutils, sys-boot/grub, etc., so that images and configuration files are deleted after removing the packages. For optimization reasons, checks are performed that exclude repeated image transformation. The only thing you need for installing new themes is the media-gfx/imagemagick package. This is why themes are not provided with Calculate Linux Scratch, that does not feature Imagemagick.

Feel free to contribute by improving the translation of the /etc/calculate/ini.env.example file, as well as by joining our localization team.