Reference: Prerequisites for Linux Amazon DCV servers - Amazon DCV
Pre-requisites:
Open the file /etc/gdm/custom.conf in the preferred text editor and uncomment the line so it looks like below
[daemon]
WaylandEnable=false
After which restart GDM using systemctl restart gdm
Run sudo systemctl get-default, if it returns multi-user.target run systemctl set-default graphical.target
Open the file /etc/X11/xorg.conf and paste the following contents:
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
Save and exit the file.
Installation:
Run the command
sudo rpm --import [https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY](https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY)to import the GPG keyRun the following command
wget https://d1uj6qtbmh3dt5.cloudfront.net/2024.0/Servers/nice-dcv-2024.0-19030-amzn2-x86_64.tgz
and extract the file using tar -xvf <filename> to extract it.
cd into the directory and run
rpm -i ./*to install all the rpm filesStart and Enable the services using
systemctl enable --now dcvsimpleextauth dcvserver
Configuration:
Below are the config file names and its contents, ensure they exist else paste them
/etc/dcv/dcv.conf
[session-management]
create-session = false
enable-console-session = false
virtual-session-xdcv-args = "-listen tcp"
[security]
authentication="system"
pam-service-name="dcv-custom"
Create /etc/pam.d/dcv-custom and paste the following lines
#%PAM-1.0
auth substack password-auth
auth include postlogin
account required pam_sepermit.so
account required pam_nologin.so
account include password-auth
password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open env_params
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session optional pam_motd.so
session include password-auth
session include postlogin
Open /etc/sssd/conf.d/sssd.conf** and ensure if this line exists **adgpo_access_control = disabled
Restart the services using systemctl restart dcvsimpleextauth dcvserver
Usage:
Create MATE sessions for particular user using:
dcv create-session --owner <user_name> --init /usr/bin/mate-session <session_name>
replace the <user_name> with the linux username and <session_name> with name that you’d want to give the session (recommended to have same as the username
For example:
dcv create-session --owner thamjeed --init /usr/bin/mate-session thamjeed
Install the dcvclient for windows from this link: https://www.amazondcv.com/ , enter the hostname or IP of the dcv server, after which you’ll be prompted to enter your credentials. Successful Authentication will give you MATE session.