Table of Contents#
- Prerequisites
- Understanding SDDM Configuration Files
- Customizing SDDM Themes
- 3.1 Finding SDDM Themes
- 3.2 Installing Themes (System-Wide vs. User-Specific)
- 3.3 Selecting a Theme
- 3.4 Editing Themes (Advanced)
- Changing the Background/Wallpaper
- Adjusting Fonts and Colors
- Configuring Session Options
- Advanced Tweaks
- 7.1 Enabling Autologin
- 7.2 HiDPI Support
- 7.3 Adding a Custom Welcome Message or Logo
- Troubleshooting Common Issues
- Conclusion
- References
Prerequisites#
Before diving into customization, ensure you have the following:
- A Linux system with SDDM installed: SDDM is preinstalled on KDE Plasma, but you can install it on other DEs (e.g.,
sudo apt install sddmon Debian/Ubuntu,sudo pacman -S sddmon Arch,sudo dnf install sddmon Fedora). - Basic command-line familiarity: You’ll need to edit configuration files and run terminal commands.
- A text editor: Use your preferred editor (e.g.,
nano,vim,kate, orgedit). - Backup your config files: Always back up
/etc/sddm.conf(or/etc/sddm.conf.d/) before making changes to avoid breaking SDDM.
Understanding SDDM Configuration Files#
SDDM’s behavior is controlled by configuration files, which define themes, autologin, display settings, and more. Here’s where to find and how to edit them:
Key Configuration Paths#
| Path | Purpose |
|---|---|
/etc/sddm.conf | Main SDDM configuration file (user overrides). |
/etc/sddm.conf.d/ | Directory for split configuration files (e.g., 10-theme.conf, 20-autologin.conf). Preferred for organization. |
/usr/lib/sddm/sddm.conf.d/ | System default configuration files (do not edit directly—override in /etc/sddm.conf.d/ instead). |
/usr/share/sddm/themes/ | System-wide theme directory (themes here are available to all users). |
~/.local/share/sddm/themes/ | User-specific theme directory (themes here only apply to your user). |
Generating a Default Config File#
If /etc/sddm.conf or /etc/sddm.conf.d/ don’t exist (common on fresh installs), generate a default configuration with:
sudo sddm --example-config > /etc/sddm.conf This creates a template with all available options (commented out by default).
Configuration File Structure#
SDDM config files use an INI-style format with sections (e.g., [Theme], [Autologin]) and key-value pairs. For example:
[Theme]
Current=breeze # Name of the active theme
CursorTheme=breeze_cursors # Mouse cursor theme
[X11]
EnableHiDPI=true # Enable HiDPI scaling Customizing SDDM Themes#
Themes are the cornerstone of SDDM customization. They control the login screen’s layout, widgets, colors, and animations.
3.1 Finding SDDM Themes#
SDDM themes are community-driven and widely available. Popular sources include:
- KDE Store: SDDM Themes on KDE Store (filter by "SDDM Theme").
- GitHub: Search for "sddm theme" (e.g., Nordic SDDM, Sweet SDDM).
- AUR (Arch Linux): Many themes are packaged (e.g.,
sddm-theme-nordic,sddm-theme-sweet).
3.2 Installing Themes#
Themes can be installed system-wide (for all users) or user-specifically (only for your account).
System-Wide Installation (Recommended)#
-
Download the theme (usually a
.tar.gzor.zipfile). -
Extract it to
/usr/share/sddm/themes/(requiressudo):sudo tar -xzf your-theme.tar.gz -C /usr/share/sddm/themes/ -
Verify the theme folder exists:
ls /usr/share/sddm/themes/ # Should show your theme’s folder name
User-Specific Installation (Testing)#
For testing themes without affecting other users, install to ~/.local/share/sddm/themes/:
mkdir -p ~/.local/share/sddm/themes/
tar -xzf your-theme.tar.gz -C ~/.local/share/sddm/themes/ 3.3 Selecting a Theme#
To activate a theme, edit the [Theme] section in your SDDM config.
-
Open your config file (e.g.,
/etc/sddm.confor a file in/etc/sddm.conf.d/):sudo nano /etc/sddm.conf.d/10-theme.conf -
Add/modify the
Currentkey to match your theme’s folder name:[Theme] Current=Nordic # Replace "Nordic" with your theme’s folder name -
Save and exit. Restart SDDM to apply changes:
sudo systemctl restart sddm # Logs you out—save work first!
3.4 Editing Themes (Advanced)#
For full control, edit the theme’s files directly. Most themes include:
metadata.desktop: Defines theme name, author, and compatibility.theme.conf: Controls basic settings (background, fonts, cursor theme).qml/: Directory with QML (Qt Meta Language) files, which define the visual layout (buttons, text, animations).
Example: Modifying a Theme’s Background#
-
Open the theme’s
theme.conf(e.g., for Nordic):sudo nano /usr/share/sddm/themes/Nordic/theme.conf -
Look for a
Backgroundkey. Replace the path with your image:[General] Background=/home/your-user/Pictures/custom-bg.jpg # Absolute path required -
If the theme hardcodes the background in QML (common in complex themes), edit the QML file (e.g.,
qml/Main.qml):// Search for an Image element like this: Image { source: "/usr/share/sddm/themes/Nordic/background.jpg" # Replace this path fillMode: Image.Stretch }
Changing the Background/Wallpaper#
Even without editing themes, you can set a custom background via SDDM’s config.
-
Edit your SDDM config:
sudo nano /etc/sddm.conf.d/20-background.conf -
Add a
Backgroundkey under[Theme]:[Theme] Background=/home/your-user/Pictures/login-bg.png # Use an absolute path -
Restart SDDM:
sudo systemctl restart sddm
Note: Some themes ignore the global Background setting and use their own. In that case, edit the theme’s theme.conf or QML files (see Section 3.4).
Adjusting Fonts and Colors#
Tweak fonts and colors to match your desktop theme.
Fonts#
Fonts are often defined in the theme’s theme.conf under a [Fonts] section:
[Fonts]
Font=Noto Sans # Font family
Size=12 # Font size
BoldFont=Noto Sans Bold If the theme uses QML, fonts may be set directly in QML files (e.g., Text { font.family: "Noto Sans"; font.pointSize: 12 }).
Colors#
Colors are typically controlled via QML. For example, to change the login button color:
-
Open the theme’s QML file (e.g.,
qml/LoginButton.qml). -
Look for a
colorproperty:Button { id: loginButton text: "Log In" color: "#5E81AC" # Replace with your hex color (e.g., #FF5555 for red) }
Use tools like GIMP or ColorHexa to pick hex color codes.
Configuring Session Options#
SDDM lists available desktop environments (e.g., Plasma, GNOME, Xfce) and Wayland/X11 sessions. Customize which sessions appear and set defaults.
Hiding Unwanted Sessions#
Sessions are defined by .desktop files in /usr/share/xsessions/ (X11) and /usr/share/wayland-sessions/ (Wayland). To hide a session:
-
Open the session’s
.desktopfile (e.g.,gnome.desktop):sudo nano /usr/share/xsessions/gnome.desktop -
Add
Hidden=trueto the[Desktop Entry]section:[Desktop Entry] Name=GNOME Exec=gnome-session Hidden=true # Add this line
Setting a Default Session#
To auto-select a session (e.g., Plasma) when logging in, add a DefaultSession key to [Sessions] in your SDDM config:
[Sessions]
DefaultSession=plasma.desktop # Use the filename of your desired session Advanced Tweaks#
7.1 Enabling Autologin#
Bypass the login screen by auto-logging in as a specific user:
-
Edit your SDDM config:
sudo nano /etc/sddm.conf.d/30-autologin.conf -
Add the
[Autologin]section:[Autologin] User=your-username # Your Linux username Session=plasma.desktop # Session to launch (e.g., plasma.desktop, gnome.desktop) Delay=0 # Seconds to wait before autologin (0 = instant) -
Restart SDDM:
sudo systemctl restart sddm
7.2 HiDPI Support#
For high-resolution displays, enable HiDPI scaling:
[X11]
EnableHiDPI=true # Auto-detects scaling
# Or force scaling:
# HiDPI scaling factor (e.g., 2 for 4K displays)
# ScaleFactor=2 7.3 Adding a Custom Welcome Message or Logo#
To add text or a logo, edit the theme’s QML files. For example, to add a welcome message:
-
Open the theme’s main QML file (e.g.,
qml/Main.qml). -
Add a
Textelement:Text { text: "Welcome Back!" font.family: "Noto Sans" font.pointSize: 16 color: "#FFFFFF" # White text anchors.centerX: parent.centerX anchors.top: parent.top anchors.topMargin: 50 # Distance from top }
To add a logo, use an Image element:
Image {
source: "/home/your-user/Pictures/logo.png" # Path to your logo
width: 100 # Logo width
height: 100 # Logo height
anchors.centerX: parent.centerX
anchors.top: welcomeText.bottom # Position below welcome text
anchors.topMargin: 20
} Troubleshooting Common Issues#
SDDM Fails to Start#
Check logs for errors:
journalctl -u sddm # View SDDM service logs Common fixes:
- Restore your backed-up config file.
- Reinstall SDDM:
sudo apt reinstall sddm(Debian/Ubuntu).
Theme Not Showing Up#
- Ensure the theme folder name matches the
Currentvalue in[Theme]. - Check permissions: System-wide themes need
root:rootownership (fix withsudo chown -R root:root /usr/share/sddm/themes/your-theme).
Black Screen or Broken Layout#
-
Test the theme in preview mode without restarting SDDM:
sddm-greeter --test-mode --theme /usr/share/sddm/themes/your-theme -
Fix QML errors (shown in the preview window) by correcting typos in the QML files.
Conclusion#
SDDM is more than just a login screen—it’s a canvas for personalization. With themes, background tweaks, and QML edits, you can align your login experience with your desktop’s aesthetic. Start with simple changes (e.g., switching themes or backgrounds), then dive into advanced QML modifications to make it truly unique.
References#
- SDDM Official Documentation
- Arch Wiki: SDDM
- KDE Store: SDDM Themes
- Qt Quick Documentation (for QML editing)
- Nordic SDDM Theme (example theme)