1. Prepare your Ubuntu server
You already have an EC2 instance with Ubuntu 26.04 LTS. The first step is to update your system and install a lightweight graphical environment (like **XFCE**). This transforms your server into a mini virtual desktop. Next, you add a remote access service (RDP or VNC) to access this desktop from your computer.
2. Install Chrome and configure access
Once the desktop is installed, you add **Google Chrome** with a simple command (`wget` + `apt install`). You open the connection port (3389 for RDP or 5900 for VNC) in the AWS security settings so your client can connect. You will then be able to launch Chrome as on a real PC, and Selenium will be able to run in non-headless mode.
3. Simpler Alternatives
If you want to avoid all this setup, you can use ready-made cloud services:
- **AWS WorkSpaces**: a complete Windows or Linux desktop, ready to use.
- **BrowserStack / Sauce Labs / TestingBot**: specialized platforms that give you direct access to real browsers for Selenium, without any installation required.
In short: either you transform your EC2 into a virtual desktop with XFCE + Chrome, or you choose a turnkey solution that already provides Chrome and Selenium.