create a weston config file that creates a session on a headless ubuntu server 25.04 and shares it over rdp with audio support. force the resolution to 720p
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
To create a Weston configuration file for a headless Ubuntu Server 25.04 that shares via RDP with a forced 720p resolution, you'll need to set up a proper weston.ini file. This configuration will use the RDP backend which allows Weston to run without specific graphic hardware or input devices.
Here's a complete weston.ini configuration file:
ini
# Weston configuration for headless RDP server
# Save this to /etc/xdg/weston/weston.ini or ~/.config/weston.ini
[core]
# Use RDP backend for headless operation
backend=rdp-backend.so
# Load necessary modules
modules=screen-share.so,systemd-notify.so
# No idle timeout for server operation
idle-time=0
# Set to false if you don't have input devices on the server
require-input=false
[rdp]
# Listen on all interfaces
address=0.0.0.0
# Standard RDP port
port=3389
# Refresh rate in Hz - adjust if needed
refresh-rate=60
# To enable TLS security (recommended for production)
# Generate these files using openssl (see instructions below)
#tls-cert=/etc/weston/tls.crt
#tls-key=/etc/weston/tls.key
# Allow HDCP content protection if supported
allow_hdcp=true
[output]
# Name your virtual output
name=VIRTUAL1
# Force 720p resolution
mode=1280x720
# Normal orientation
transform=normal
# Standard scale factor
scale=1
[shell]
# Desktop shell is the standard UI
client=/usr/bin/weston-desktop-shell
# Set a background color (optional)
background-color=0xFF222222
# Panel location
panel-location=top
# Clock format (24h)
clock-format=24h
Create the configuration directory if it doesn't exist:
bash
mkdir -p ~/.config
Save the above configuration as ~/.config/weston.ini
To enable TLS security (recommended for production):
bash
# Generate a key and certificate
openssl genrsa -out tls.key 2048
openssl req -new -key tls.key -out tls.csr
openssl x509 -req -days 365 -signkey tls.key -in tls.csr -out tls.crt
# Create a directory for the certificates
sudo mkdir -p /etc/weston
sudo cp tls.key tls.crt /etc/weston/
sudo chmod 600 /etc/weston/tls.key
Start Weston with the RDP backend:
bash
# Set the XDG_RUNTIME_DIR if not already set
export XDG_RUNTIME_DIR=/run/user/$(id -u)
mkdir -p $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
# Start Weston
weston --backend=rdp-backend.so
Connecting to the RDP Server
From another computer, use an RDP client like FreeRDP:
bash
xfreerdp /v:YOUR_SERVER_IP /size:1280x720
Or on Windows, use the built-in Remote Desktop Connection app.
Notes about Audio Support
While Weston's RDP backend doesn't explicitly mention audio configuration in the documentation available, the standard RDP protocol does support audio. The actual audio functionality depends on:
The RDP client capabilities
FreeRDP's implementation which Weston uses for its RDP backend
Audio should work with standard RDP clients, but if you encounter issues, you might need additional setup on the client side to properly redirect audio.
Additional Tips
You may need to adjust firewall settings to allow connections on port 3389:
bash
sudo ufw allow 3389/tcp
For production environments, always use TLS security by uncommenting the tls-cert and tls-key lines in the configuration file.
If you want to run Weston as a systemd service, refer to the documentation about creating proper systemd service files for persistent operation[4].