Customizing Calculate Linux
Updated 6 March 2019
Introduction
Since version 17, Calculate Linux is provided with tools allowing you to customize the system appearance. You can either make post-installation changes or modify the Live USB 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. For convenience, you can copy the sample file:
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
- Use the maximum resolution available to get a better feel 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.
Feel free to use our "Mylène Farmer" theme as a starting point. Your can fetch all the files you want to from this mirror: 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 nothing happens, log out and log in again.
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 use custom boot-up and shutdown 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-picture = /usr/share/themes/MF/splash-silent.jpg splash-silent-type = background splash-shutdown-picture = /usr/share/themes/MF/splash-shutdown.jpg splash-shutdown-type = background
3) Update the theme settings:
cl-setup-themes
To view the result without restarting the computer, run the following:
plymouthd; plymouth show-splash; sleep 5; plymouth quit
The new boot-up image will be displayed.
To check the shutdown screen, run:
plymouthd --mode=shutdown; plymouth show-splash; sleep 5; plymouth quit
The new shutdown image will be displayed.
Changing the Grub image
To use a custom Grub 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:
Changing the Grub image on a Live USB
To change the bootloader appearance, boot into Calculate Linux from your hard drive or from a Live USB written with the cl-install-flash
tool. In the example above, Calculate Linux Desktop MATE is used. Edit the path if you are not a CLDM user.
To modify the bootloader image, do as follows:
1) Prepare the system for assembly. You can skip the '--source' option if you are working on a system loaded from a Live USB. Any changes you make will then be applied to the current system image on your USB flash drive. 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:
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
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.
You can help improving the English version of the /etc/calculate/ini.env.example file, or translating it to other languages.