Execute the command below in your terminal to update your system:
sudo apt update && sudo apt upgrade
Install Essential Packages for Microsoft Edge:
sudo apt install software-properties-common apt-transport-https curl ca-certificates -y
Import Microsoft Edge APT Repository
Begin by downloading the GPG key, which is necessary to verify the authenticity of the Microsoft Edge package. Execute this command in your terminal:
curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null
This command fetches the GPG key and securely stores it in the /usr/share/keyrings/ directory under the name microsoft-edge.gpg.
Next, integrate the Microsoft Edge repository into your system with this command:
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list
This command creates a new file named microsoft-edge.list in the /etc/apt/sources.list.d/ directory, effectively adding the Microsoft Edge repository.
Finally, update your system’s repository list to include the newly added Microsoft Edge repository:
sudo apt update
Running this command refreshes your repository list, making Microsoft Edge available for installation through the Ubuntu package manager.
Install the Stable Version of Microsoft Edge
For most users, the stable version is the recommended choice. To install it, use this command:
sudo apt install microsoft-edge-stable
This command installs the stable version of Microsoft Edge on your Ubuntu system. To confirm the version and build of Microsoft Edge, run:
microsoft-edge -version
Launching Microsoft Edge Using the Terminal
To open the stable version of Microsoft Edge through the terminal, enter:
microsoft-edge
Install a package to automatically hide the mouse from the screen after some inactivity.
sudo apt install unclutter
Creating a User to Run Your Kiosk on Ubuntu
Create a user called “kiosk
“. We will be using this user to run the Chromium kiosk.
sudo useradd -m kiosk
Enabling Automatic Login to Your New User
we must reconfigure Ubuntu to log in to our new user automatically and turn off Ubuntu’s usage of Wayland.
You can edit the custom configuration file using the nano text editor.
sudo nano /etc/gdm3/custom.conf
You will want to find the following lines within this file. These lines may already be uncommented if you have enabled automatic login previously.
Find the following lines:
# [daemon]
# AutomaticLoginEnable=true
# AutomaticLogin=<USERNAME>
Replace with:
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=kiosk
While in this configuration file, we will want to disable Wayland. Wayland makes things more tricky when setting up a Microsoft Edge web kiosk on Ubuntu.
Luckily, Ubuntu 22.04 still has the X window manager installed. To disable Wayland, first look for the following line within the file.
Find the following line:
#WaylandEnable=false
Replace with:
WaylandEnable=false
After making these changes, you can save and quit by pressing CTRL + X, Y, and then ENTER.
Getting your Kiosk to Start when Ubuntu Does
Next, we will be creating a service to launch the Microsoft Edge Kiosk on our Ubuntu operating system.
You can begin writing this service by running the command below.
sudo nano /usr/lib/systemd/system/kiosk.service
Copy the contents below and paste into the file you just created:
[Unit]
Description=Microsoft Edge Kiosk
Wants=graphical.target
After=graphical.target
[Service]
Environment=DISPLAY=:0
Type=simple
ExecStart=microsoft-edge --kiosk https://nwdigital.cloud
Restart=always
User=kiosk
Group=kiosk
[Install]
WantedBy=graphical.target
If you would like to make the service restart every X seconds, add the following line to the service file above in the [Sevice] section. I put mine above “Restart=always”.
RuntimeMaxSec=1800
After filling out the service file, save and quit by pressing CTRL + X, Y, and then ENTER.
Our next step is to enable our new kiosk service to start when Ubuntu starts.
All we need to do to enable the service is to use the following command.
sudo systemctl enable kiosk
Reboot and it should automatically login and launch Microsoft Edge in kiosk mode!