Customizing Calculate Linux

Updated 6 March 2019

Introduction

Начиная с 17-й версии, Calculate Linux получил инструменты для настройки тем оформления системы. Вы можете как внести изменения после установки системы, так и модифицировать Live USB - образ дистрибутива. 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. Для удобства можно копировать файл с примером:

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

  • Используйте максимально возможное разрешение - в этом случае оформление будет выглядеть максимально чётко на любом экране.
  • The image format can be either jpg or png. It will anyway be converted to the required format and to the effective screen resolution.

Для удобства в качестве отправной точки вы можете воспользоваться темой "Mylène Farmer", загрузив изображения с зеркала 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. Если и в этом случае изображение не изменилось, перезайдите в сеанс.

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

Для изменения фонового изображения экрана загрузки и завершения работы системы выполните следующие действия.

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

Чтобы посмотреть результат, отображаемый при загрузке, выполните, не перезагружая компьютер:

plymouthd; plymouth show-splash; sleep 5; plymouth quit

На экране должна отобразиться заставка загрузки системы:

Change boot-up image

To check the shutdown screen, run:

plymouthd --mode=shutdown; plymouth show-splash; sleep 5; plymouth quit

На экране должна отобразиться заставка завершения работы:

Change shutdown image

Changing the Grub image

Для изменения фонового изображения загрузчика Grub выполните следующие действия.

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

Для изменения оформления загрузчика загрузитесь в Calculate Linux с жесткого диска либо с Live USB, записанного при помощи утилиты cl-install-flash. In the example above, Calculate Linux Desktop MATE is used. При использовании другого дистрибутива поправьте соответственно пути.

To modify the bootloader image, do as follows:

1) Prepare the system for assembly. В случае работы в системе, загруженной с Live USB, параметр '--source' можно опустить. Тогда изменения будут формироваться для текущего образа системы на флешке. 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.

Мы будем признательны вам за помощь в улучшении качества перевода файла /etc/calculate/ini.env.example на английский язык, а также в переводе его на другие языки.