Questo contenuto non è disponibile nella lingua selezionata.

10.3. Plymouth


Plymouth is a graphical boot system and logger for Red Hat Enterprise Linux 7, which makes use of the kernel-based mode setting (KMS) and Direct Rendering Manager (DRM). Plymouth also handles user interaction during boot.
You can customize the boot screen appearance by choosing from various static or animated graphical themes. New themes can be created based on the existing ones.

10.3.1. Branding the Theme

Each theme for Plymouth is composed of a theme data file and a compiled splash plugin module. The data file has a .plymouth extension, and is installed in the /usr/share/plymouth/themes/ directory.
The configuration data is specified under the [Plymouth Theme] section, in the key-value format. Valid keys for this group are Name, Description, and ModuleName. While the first two keys are self-explanatory, the third specifies the name of a Plymouth splash plugin module. Different plugins provide different animations at boot time and the underlying implementation of the various themes:

Example 10.2. A .plymouth File Specimen

[Plymouth Theme]
Name=Charge
Description=A theme that features the shadowy hull of my logo charge up and finally burst into full form.
ModuleName=two-step

Procedure 10.3. Changing the Plymouth Theme

  1. Search for the existing Plymouth themes and choose the most preferable one. Run the following command:
    # yum search plymouth-theme
    Or run the plymouth-set-default-theme --list command to view the installed themes.
    You can also install all the themes when installing all the plymouth packages. However, you will install a number of unnecessary packages as well.
    # yum install plymouth\*
  2. Set the new theme as default with the plymouth-set-default-theme theme_name command.

    Example 10.3. Set "spinfinity" as the Default Theme

    You have chosen the spinfinity theme, so you run:
    # plymouth-set-default-theme spinfinity
  3. Rebuild the initrd daemon after editing otherwise your theme will not show in the boot screen. Do so by running:
    # dracut -f

10.3.2. Creating a New Plymouth Theme

If you do not want to choose from the given list of themes, you can create your own. The easiest way is to copy an existing theme and modify it.

Procedure 10.4. Creating Your Own Theme from an Existing Theme

  1. Copy an entire content of a plymouth/ directory. As a template directory, use, for example, the default theme for Red Hat Enterprise Linux 7, /usr/share/plymouth/themes/charge/charge.plymouth, which uses a two-step splash plugin (two-step is a popular boot load feature of a two phased boot process that starts with a progressing animation synced to boot time and finishes with a short, fast one-shot animation):
    [Plymouth Theme]
    Name=Charge
    Description=A theme that features the shadowy hull of my logo charge up and finally burst into full form.
    ModuleName=two-step
    
    [two-step]
    ImageDir=/usr/share/plymouth/themes/charge
    HorizontalAlignment=.5
    VerticalAlignment=.5
    Transition=none
    TransitionDuration=0.0
    BackgroundStartColor=0x202020
    BackgroundEndColor=0x202020
    
  2. Save the charge.plymouth file with a new name in the /usr/share/plymouth/themes/newtheme/ directory, in the following format:
    newtheme.plymouth
  3. Update the settings in your /usr/share/plymouth/themes/newtheme/newtheme.plymouth file according to your preferences, changing color, alignment, or transition.
  4. Set your newtheme as default by running the following command:
    # plymouth-set-default-theme newtheme
  5. Rebuild the initrd daemon after changing the theme by running the command below:
    # dracut -f

10.3.2.1. Using Branded Logo

Some of the plugins show a branded logo as part of the splash animation. If you wish to add your own logo into your theme, follow the short procedure below.

Important

Keep in mind that the image format of your branded logo must be of the .png format.

Procedure 10.5. Add Your Logo to the Theme

  1. Create an image file named logo.png with your logo.
  2. Edit the /usr/share/plymouth/themes/newtheme.plymouth file by updating the ImageDir key to point to the directory with the logo.png image file you created in step 1:
    ImageDir=/usr/share/plymouth/themes/newtheme
For more information on Plymouth, see the plymouth(8) man page.
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.