iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🫶

Easy Digital Signage with AlmaLinux

に公開

Introduction

I had the opportunity to create a device that continuously displays a looping video in full screen, so I am documenting the steps here.
For the OS, I will be using "AlmaLinux," which is well-known as a successor to CentOS.

What You'll Need

  • A spare PC (the smaller, the better)
  • An empty USB flash drive (16GB or larger recommended)

Creating the USB Installation Media

Get the AlmaLinux Installation Media

Creating the Installation Media with Fedora Media Writer

Download

  1. Next, download the software for creating the USB installation media from the following URL.
    https://github.com/FedoraQt/MediaWriter/releases
  2. Since I am creating the installation media on Windows, download FedoraMediaWriter-win64-*.exe.

Installation

  1. Run the downloaded file to perform the installation.
  2. Follow the wizard to complete the installation.

Create the Installation Media

  1. Once Fedora Media Writer is installed, launch it.
  2. When the image source selection appears, select "Select .iso" and click "Next."
  3. Next, select the installation media you downloaded earlier and the USB flash drive you want to write to, then click "Write."
  4. Once writing is finished, click "Finished!" to exit.

Installing AlmaLinux on the PC

  1. Insert the USB into the PC where you want to install AlmaLinux, turn on the power, and change the boot drive priority in the BIOS settings to boot from the USB.

    [TIP]
    Since the method to enter BIOS and change the boot drive priority varies depending on the PC, search for instructions specific to your device.

  2. When the black screen appears, select "Install AlmaLinux".
  3. Configure the settings as shown below and proceed with the installation.
Setting Item Setting Content
Software Selection (S) Server with GUI (No additional software)
Installation Destination (D) Automatic configuration
Root Password (R) Any string of your choice
User Creation (U) Create a user with the username "singage"
  1. Once the installation is complete, click the "Reboot System" button to restart the PC.

Initial Settings

First, perform an update.

# sudo dnf update -y
# sudo dnf upgrade -y

Automatic Login Settings

  1. Click "Activities" in the top-left area, then find and click the Settings ⚙ icon on the bottom bar.
  2. Click "Users" from the left menu.
  3. Check the "Automatic Login (U)" option in the Authentication & Login section.

Configure to Shut Down When the Power Button is Pressed

  1. Create the /etc/dconf/db/local.d/01-power file.
# sudo vim /etc/dconf/db/local.d/01-power
  1. Edit the contents of the file as follows:
/etc/dconf/db/local.d/locks/01-power
[org/gnome/settings-daemon/plugins/power]
power-button-action='interactive'
  1. Update the system database.
# dconf update

Disable the 60-Second Shutdown Delay

  1. Click "Activities" in the top-left area, then find and click "Software" from the bottom bar.
  2. Click the magnifying glass icon in the top-left, search for "dconf", and install the app called "dconf Editor".
  3. Launch the dconf Editor, navigate to the org/gnome/gnome-session path, and uncheck logout-prompt.

Disable the Overview Display Immediately After Login

  1. Click "Activities" in the top-left area, then find and click "Software" from the bottom bar.
  2. Click the magnifying glass icon in the top-left, search for "extension", and install the app called "Extensions".
  3. Open the browser, access the "GNOME Shell Extensions" website, and search for the extension "no overview at start-up".
    https://extensions.gnome.org/extension/4099/no-overview/
  4. Click "install" -> "Open Link" -> "Install" in that order.
  5. Find and click "Extensions" from the bottom bar.
  6. Check if "no overview at start-up" is enabled.

Turn Off Notifications

  1. Click "Settings", then click "Notifications" from the left menu.
  2. Configure the settings as follows:
Setting Item Setting Content
Do Not Disturb (D) Off
Lock Screen Notifications (L) Off
All Applications Off
  1. Click "Applications" from the left menu.
  2. Turn off notifications for all apps.

Change Power Settings

  1. Click "Power" from the left menu.
  2. Configure the settings as follows:
Setting Item Setting Content
Power Mode Balanced
Screen Blank Never
Automatic Suspend (A) Off

Set the Number of Workspaces to 1

  1. Click "Multitasking" from the left menu.
  2. Select Workspaces -> "Fixed number of workspaces".
  3. Set the number of workspaces to 1.

Make the Video Auto-Loop on Startup

  • Save the video file you want to play in an infinite loop to "/home/singage/" from USB or FTP, etc.

Install VLC

  1. Open the terminal.

  2. Install EPEL.

# sudo dnf install epel-release -y
  1. Add the RPM Fusion repository.
# sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
  1. Install VLC media player.
# sudo dnf install vlc -y

Create a Shell Script

  1. Create a shell script to automatically play in full screen.
# sudo vim /usr/local/bin/singage.sh
  1. Edit the contents of the file as follows.
/usr/local/bin/singage.sh
#!/bin/bash
vlc --fullscreen --loop --no-osd  /home/singage/[your_video_file].mp4
  1. Grant permissions just in case.
# sudo chmod 755 /usr/local/bin/singage.sh
  1. Create a configuration file to automatically run the created shell script upon login.
# sudo vim /etc/xdg/autostart/singage.desktop
  1. Edit the contents of the file as follows.
/usr/local/bin/singage.sh
[Desktop Entry]
Type=Application
Name=Singage
Exec=/usr/local/bin/singage.sh
onlyshowIn=GNOME;
X-GNOME-Autostart-enable=true
  1. Grant permissions just in case.
# sudo chmod 755 /etc/xdg/autostart/singage.desktop
  1. Restart the PC and verify that the video is looping in full screen.

Security Measures

Disable SSH

  • Disable the SSH service just in case.
  • Keep it active if you want to operate the device remotely later.
# sudo systemctl disable --now sshd.service

Automatic Update Settings

  • Set up automatic updates for security purposes.
  • If you prioritize stability, it may be better to skip this.
  1. Install dnf-automatic.
# sudo dnf install dnf-automatic -y
  1. Edit the configuration file.
# sudo vim /etc/dnf/automatic.conf
/etc/dnf/automatic.conf
upgrade_type = default
apply_updates = yes
  1. Enable the service.
# sudo systemctl enable --now dnf-automatic.timer

Summary

  • If you want to use a vertical screen display, you can configure it by launching VLC and going to "Tools" > "Effects and Filters" > "Video Effects" > "Geometry".

I hope this article is helpful. Thank you for reading.

References

About Fedora Media Writer

About the Power Button

About VLC

About dnf-automatic

Discussion