1

I've installed an Xfce desktop for WSL2 Ubuntu-18.04-LTS through xrdp with relative ease, but am having difficulty with CentOS 7.

I have used the workaround here for systemctl. Afterwards, I've tried following this to get xrpd and xfce up and running.

I get to the login screen for Xvnc, but when I enter my username and credentials, it hangs for a few seconds and does nothing. Can someone help me get this working? Thanks!

UPDATE:

Currently, I run

sudo systemctl start graphical.target
sudo systemctl start xrdp

I use port 3390 and when I run localhost:3390 in Windows Remote Desktop Connection, I get the login screen:

Login

When I enter my credentials and try to log in, then I notice my cursor changes and the remote desktop header bar changes to localhost, but there are no desktop items:

localhost-3390

The steps I have executed are as follows:

  1. Install CentOS 7.9 from zip asset on GitHub
  2. Perform a sudo yum update && sudo yum upgrade -y
  3. Install the following packages
sudo yum install -y epel-release xrdp
sudo yum gropuinstall -y "Xfce"
sudo reboot
  1. Configure ~/.Xclients
#!/bin/bsh
XFCE="$(which xfce4-session 2>/dev/null)"
exec "$XFCE"
  1. Perform the systemctl workaround
sudo dnf install python2 -y
sudo ln -s /usr/bin/python2 /usr/bin/python
sudo mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py >temp
sudo mv temp /usr/bin/systemctl
sudo chmod +x /usr/bin/systemctl
  1. Configure /etc/xrdp/xrdp.ini to use port=3390

  2. Copy and paste startwm.sh to /etc/xrdp, replace last line with startxfce4 (commenting out xfce), and chmod +x on it (see here for script).

  3. Add username and password

useradd my-username
passwd my-passwd
  1. Start graphical.target and xrdp
sudo systemctl enable xrdp
sudo systemctl enable graphical.target
sudo systemctl start graphical.target
sudo systemctl start xrdp
  1. Log into Windows Remote Desktop Connection at localhost:3390

0 Answers0