Linux Ubuntu Desktops

1. Install RDP

  1. Execute one of the following sets of instructions:

    Expand for Rock Linux v10 Using Gnome Remote Desktop Service
    Works with Rocky Linux v10 today
    1. Install Gnome

      sudo dnf -y groupinstall "Server with GUI"
      sudo systemctl set-default graphical.target
      Reboot
      sudo reboot
    2. Enable the Gnome Remote Desktop Service

      This is set per user
      systemctl --user enable --now gnome-remote-desktop.service
    3. If the above command results in a lingering error do these steps

      sudo loginctl enable-linger $USER
      systemctl --user start gnome-remote-desktop.service
    4. Enable RDP in GNOME settings (via gsettings)

      gsettings set org.gnome.desktop.remote-desktop.rdp enable true
      gsettings set org.gnome.desktop.remote-desktop.rdp view-only false
    5. Set the RDP password

      Format
      grdctl rdp set-credentials --user <your-username> --password "<your-password>" (1)
      1 Use your own username and password here!
      example
      grdctl rdp set-credentials --user martinezc --password "a-complex-password"
    6. Allow RDP through the firewall

      Add rule
      sudo firewall-cmd --add-port=3389/tcp --permanent
      Restart the deamon
      sudo firewall-cmd --reload
    Expand for Rocky Linux v10 compatible using VNC instead of RDP
    This version works with v10 via VNC with the LXQt Desktop and is the preferred installation until XRDP is made available.
    1. Install the LXQt Desktop Environment

      sudo dnf -y groupinstall "LXQt Desktop"
    2. Install TigerVNC Server

      sudo dnf -y install tigervnc
    3. Set VNC password

      Do this as the user who will log in remotely
      vncpasswd
    4. Create the VNC startup script

      Create the folder
      mkdir -p ~/.vnc
      Open the xtartup file for editing
      nano ~/.vnc/xstartup
      Paste these contents
      #!/bin/sh
      unset SESSION_MANAGER
      unset DBUS_SESSION_BUS_ADDRESS
      exec startxfce4
      Make it executable
      chmod +x ~/.vnc/xstartup
    5. Create a Systemd User Service for VNC

      Make folder
      mkdir -p ~/.config/systemd/user
      Edit service file
      nano ~/.config/systemd/user/vncserver@.service
      Paste these contents
      [Unit]
      Description=VNC Server for %u on display %i
      After=network.target
      
      [Service]
      Type=simple
      ExecStart=/usr/bin/vncserver :%i -geometry 1920x1080 -localhost no
      ExecStop=/usr/bin/vncserver -kill :%i
      Restart=on-failure
      
      [Install]
      WantedBy=default.target
      Reload systemd
      systemctl --user daemon-reload
      Enable VNC on display :1
      systemctl --user enable --now vncserver@1.service
    6. Open FW port for VNC

      Open VNC port 5901
      sudo firewall-cmd --add-port=5901/tcp --permanent
      Restart FW daemon
      sudo firewall-cmd --reload
    Expand for Rocky Linux v10
    Doesn’t work yet since v10 is still new
    1. Update system

      sudo dnf update -y
    2. XRDP is packaged in EPEL, so it must be enabled first

      sudo dnf install -y epel-release
    3. Install XRDP and TigerVNC backend

      sudo dnf install -y xrdp tigervnc-server
    4. Enable and start the XRDP service

      Start
      sudo systemctl enable --now xrdp
      Confirm
      systemctl status xrdp
    5. Allow RDP through the firewall

      Add rule
      sudo firewall-cmd --add-port=3389/tcp --permanent
      Restart the deamon
      sudo firewall-cmd --reload
    Expand for Ubuntu Install instructions
    • Via: xrdp

      1. Install

        sudo apt update && sudo apt install xrdp -y
      2. Confirm

        sudo systemctl status xrdp
      3. Configure

        sudo usermod -a -G ssl-cert xrdp
      4. Restart

        sudo systemctl restart xrdp
        A reboot might be required.
    Expand for Rhel Install instructions:
    • Via: xrdp.x86_64

      1. Install

        sudo dnf install -y xrdp.x86_64
      2. Enable xrdp

        sudo systemctl enable xrdp
      3. Open FW for port 3389

        1. Open port 3389

          sudo firewall-cmd --add-port=3389/tcp --permanent
        2. Restart FW service

          sudo firewall-cmd --reload
    Expand for Azure instructions

    Please reference the Azure doc

  2. Open firewall port 3389 via instructions contained elsewhere in this document.

2. Fedora Server

  • Reference document.

    1. Install the KDE desktop

      KDE Desktop
      sudo dnf group -y install kde-desktop-environment
      KDE Desktop apps
      sudo dnf group -y install kde-apps
    2. Install desktop switcher

      sudo dnf install -y switchdesk switchdesk-gui
    3. Enable boot into Desktop

      sudo systemctl set-default graphical.target
    4. If the nvdia driver was installed prior, then run this

      sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
    5. Enable windows minimize/maximize/close buttons

      gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
    6. Disable Suspend mode

      sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
    7. Reboot

      sudo reboot

3. Install one or more of the following desktops…​

RDP support will need to be installed in order to access the Desktop remotely via remote desktop.

3.1. LXDE

This is a low resource desktop environment suitable for X Windows or RDP.
  1. Install

    Ubuntu
    sudo apt update -y && sudo apt upgrade -y && sudo apt-get -y install lxde
    Fedora
    sudo dnf update -y && sudo dnf upgrade -y && sudo dnf -y group install lxde-desktop

3.2. XFce

This is a low resource desktop environment suitable for X Windows or RDP.
  1. Install

    Ubuntu
    sudo apt update -y && sudo apt upgrade -y && sudo apt install xfce4 xfce4-goodies -y
    Fedora
    sudo dnf update -y && sudo dnf install @xfce-desktop-environment -y

3.3. Cinnamon

This will take a while…​
  1. Install

    sudo apt update -y && sudo apt upgrade -y && sudo apt install cinnamon-desktop-environment -y
  2. Verify

    cinnamon --version
    Example
    Cinnamon 5.2.7

3.4. GNOME

GNOME is probably installed by default.
  1. Update the system first

    sudo apt update -y && sudo apt upgrade -y
  2. Then one of the folowing:

    1. Do this for a minimal install:

      800MB
      sudo apt -y install ubuntu-desktop-minimal
    2. Or this one for a full install:

      2GB
      sudo apt -y install ubuntu-gnome-desktop
  3. GNOME Tweaks

    sudo apt -y install gnome-tweaks

4. Select default desktop

  1. View available Desktops and Select a different one

    Ubuntu
    1. Run

      sudo update-alternatives --config x-session-manager
    2. Choose Desktop

      Example desktops
      There are 2 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).
      
        Selection    Path                       Priority   Status
      ------------------------------------------------------------
      * 0            /usr/bin/gnome-session      50        auto mode
        1            /usr/bin/cinnamon-session   50        manual mode
        2            /usr/bin/gnome-session      50        manual mode
      
      Press <enter> to keep the current choice[*], or type selection number:
    Fedora
    1. Install

      sudo dnf install -y switchdesk switchdesk-gui
    2. Switch

      switchdesk xfce