Steps to install desktop environment, desktop manager and and Amazon DCV high performance remote display protocol server on Amazon Linux 2023 (AL2023)
Overview
This article suggests how you can install GUI (Graphical User Interface) on Amazon EC2 instances running Amazon Linux 2023, and access it using Amazon DCV remote display protocol.
Notice
Your use of DCV is subject to DCV end user license agreement
Other options
To quickly get up and running with DCV for internal testing, you can use CloudFormation template at DCV CloudFormation page.
AMIs preconfigured with graphical desktop environment are available from AWS Marketplace.
You can also consider using amazon-ec2-nice-dcv-samples CloudFormation templates to provision your own EC2 instances with graphical desktop environment, DCV server and other features such as custom resolution, multi-monitor support and GPU driver installation.
Requirements
Supported OS versions
The following versions are supported by Amazon DCV server
- Amazon Linux 2023 (x86_64)
- Amazon Linux 2023 (arm64)
AL2023 release 2023.7 or higher is required. To verify release version
$ rpm -q system-release
Output should be a release number equal or higher than 2023.7
system-release-2023.7.20250331-0.amzn2023.noarch
Refer to documentation for upgrade instructions.
EC2 instance prerequisites
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::dcv-license.region/*"
}
]
}
Installing DCV
Install desktop environment and desktop manager
Install GNOME desktop and disable Wayland protocol
sudo dnf groupinstall "Desktop" -y
sudo sed -i '/^\[daemon\]/a WaylandEnable=false' /etc/gdm/custom.conf
sudo systemctl set-default graphical.target
Install DCV server
Install DCV server, web client and virtual session support, and enable server daemon
cd /tmp
sudo rpm --import https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY
curl -L -O https://d1uj6qtbmh3dt5.cloudfront.net/nice-dcv-amzn2023-$(arch).tgz
tar -xvzf nice-dcv-amzn2023-$(arch).tgz && cd nice-dcv-*-amzn2023-$(arch)
sudo dnf install -y ./nice-dcv-server-*.rpm
sudo dnf install -y ./nice-dcv-web-viewer-*.rpm
sudo dnf install -y ./nice-xdcv-*.rpm
sudo systemctl enable dcvserver
Console session XDummy driver
Install and configure XDummy driver
sudo dnf install -y xorg-x11-drv-dummy
sudo tee /etc/X11/xorg.conf > /dev/null << EOF
Section "Device"
Identifier "DummyDevice"
Driver "dummy"
Option "UseEDID" "false"
VideoRam 512000
EndSection
Section "Monitor"
Identifier "DummyMonitor"
HorizSync 5.0 - 1000.0
VertRefresh 5.0 - 200.0
Option "ReducedBlanking"
EndSection
Section "Screen"
Identifier "DummyScreen"
Device "DummyDevice"
Monitor "DummyMonitor"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 4096 2160
EndSubSection
EndSection
EOF
Configure DCV server
Configure console session and enable session storage
sudo sed -i "/^\[session-management\/automatic-console-session/a owner=\"ec2-user\"\nstorage-root=\"%home%\"" /etc/dcv/dcv.conf
sudo sed -i "s/^#create-session/create-session/g" /etc/dcv/dcv.conf
Restart EC2 instance
sudo reboot
Set user password
Specify a strong password for login user
sudo passwd ec2-user
Access graphical desktop environment
Clients
DCV offers Windows, Linux, macOS and web browser clients.
You can connect to DCV server using web browser client at https://<EC2-IP>
:8443 (where <EC2-IP>
is your EC2 instance IP address).
Native clients support additional features and can be downloaded from Amazon DCV site.
Do ensure that EC2 instance security group allow inbound TCP and UDP 8443 from your IP
Login with your configured password
Web browser client

Install on EC2 launch
To automate install when launching a new EC2 instance, you can use the below user data script.
#!/bin/bash
sudo dnf groupinstall "Desktop" -y
sudo sed -i '/^\[daemon\]/a WaylandEnable=false' /etc/gdm/custom.conf
sudo systemctl set-default graphical.target
cd /tmp
sudo rpm --import https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY
curl -L -O https://d1uj6qtbmh3dt5.cloudfront.net/nice-dcv-amzn2023-$(arch).tgz
tar -xvzf nice-dcv-amzn2023-$(arch).tgz && cd nice-dcv-*-amzn2023-$(arch)
sudo dnf install -y ./nice-dcv-server-*.rpm
sudo dnf install -y ./nice-dcv-web-viewer-*.rpm
sudo dnf install -y ./nice-xdcv-*.rpm
sudo systemctl enable dcvserver
sudo sed -i "/^\[session-management\/automatic-console-session/a owner=\"ec2-user\"\nstorage-root=\"%home%\"" /etc/dcv/dcv.conf
sudo sed -i "s/^#create-session/create-session/g" /etc/dcv/dcv.conf
sudo dnf install -y xorg-x11-drv-dummy
sudo tee /etc/X11/xorg.conf > /dev/null << EOF
Section "Device"
Identifier "DummyDevice"
Driver "dummy"
Option "UseEDID" "false"
VideoRam 512000
EndSection
Section "Monitor"
Identifier "DummyMonitor"
HorizSync 5.0 - 1000.0
VertRefresh 5.0 - 200.0
Option "ReducedBlanking"
EndSection
Section "Screen"
Identifier "DummyScreen"
Device "DummyDevice"
Monitor "DummyMonitor"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 4096 2160
EndSubSection
EndSection
EOF
sudo reboot
Do set ec2-user
user password
Additional information
Refer to DCV documentation