Automatically Reconfiguring SDDM Monitor: Getting Connected with Headless Setup in Kubuntu
In this article, we will discuss how to automatically reconfigure SDDM monitor to get connected in a headless setup in Kubuntu. This is particularly useful when you are using a Kubuntu system in a quasi-headless setup, where you normally don't have a monitor connected, but would like to temporarily connect an external monitor for specific tasks.
Prerequisites
Before we begin, make sure you have the following:
- A Kubuntu system with SDDM display manager installed
- A headless or quasi-headless setup, i.e., no monitor connected
- Access to the command line via SSH or a local terminal
Configuring SDDM for Headless Setup
To automatically reconfigure SDDM monitor in a headless setup, we need to modify the SDDM configuration file. Follow the steps below:
- Open the SDDM configuration file using a text editor of your choice. For example, you can use the
nanoeditor:sudo nano /etc/sddm.confIf the
/etc/sddm.conffile does not exist, create it using your favorite text editor. - Add the following lines to the configuration file:
[X11] ServerArguments=-listen 0.0.0.0This will allow the X11 server to listen to incoming connections from any IP address, making it possible to connect to the SDDM display manager remotely.
- Save and close the configuration file.
- Restart the SDDM display manager to apply the changes:
sudo systemctl restart sddmNow, the SDDM display manager should be configured to accept incoming connections from any IP address, allowing you to temporarily connect an external monitor for specific tasks.
Connecting an External Monitor
To connect an external monitor, follow these steps:
- Connect the monitor to the Kubuntu system using an HDMI, DVI, or VGA cable.
- Use the following command to list available X11 displays:
xrandr -qThis will display a list of available displays, including the newly connected monitor.
- Identify the name of the newly connected monitor from the list. For example, if the new monitor is named "HDMI-1", use the following command to set the new monitor as the primary display:
xrandr --output HDMI-1 --auto --primaryReplace "HDMI-1" with the actual name of the new monitor.
- Now, the external monitor should be connected and configured as the primary display. You can use the Kubuntu system as usual, with the added benefit of a larger display.
References
This article is based on Kubuntu 22.04 LTS and SDDM version 0.18.2. The steps and commands provided in this article may differ for other versions of Kubuntu and SDDM.