The gear icon is your default
You log in to Fedora and expect KDE Plasma, but the system drops you into GNOME. You click the gear icon at the bottom right of the login screen, but the menu is empty or the wrong session keeps loading. You want to lock in a specific desktop environment so you never have to click through the selector again. Fedora does not enforce a global default desktop environment. The system delegates that choice to the display manager and stores it per user. You control the default by understanding how GDM reads session files and where it caches your preference.
How GDM actually handles sessions
GDM (GNOME Display Manager) does not hardcode a fallback desktop. It scans two directories for valid session definitions: /usr/share/wayland-sessions/ and /usr/share/xsessions/. Every .desktop file in those directories represents an available environment. When you select a session at the login screen, GDM writes a small configuration file to your home directory. The next time you log in, GDM reads that file and launches the corresponding session automatically. This design keeps multi-user systems flexible. One user can run XFCE while another runs GNOME on the same machine. The tradeoff is that the default lives in user space, not in a system-wide configuration file.
Files in /usr/share/ ship with packages and are read-only by design. Never edit them directly. Package updates will overwrite manual changes. User preferences live in ~/.config/ or ~/.local/. That separation is intentional. GDM expects a specific structure in the session definition files. Each .desktop file contains a DesktopNames key, an Exec key pointing to the session wrapper, and a Type=Application declaration. If any of those keys are malformed, GDM silently ignores the file. The gear icon will not list broken sessions.
Run journalctl -xe after a failed login attempt. The x flag adds explanatory annotations and the e flag jumps to the end of the log. Most session loading failures show up as a missing executable path or a permission denial on the session wrapper script.
Install and verify desktop environments
If the gear icon shows nothing, the desktop environment is either not installed or its session file is missing. Install the environment using the official group package. Fedora groups bundle the desktop shell, default applications, and the required session definitions. Group installations are more reliable than picking individual packages because they guarantee the display manager integration files land in the correct directories.
sudo dnf groupinstall "KDE Plasma Workspaces"
# --setopt=group_package_types=mandatory,default prevents optional extras from bloating the install
# The group package pulls in the display manager integration and session files automatically
sudo dnf upgrade --refresh
# Refreshes metadata and applies any pending dependency fixes from the transaction
After the transaction completes, verify that the session definition actually landed in the expected directory. Wayland is the default session type on modern Fedora releases. X11 fallbacks still exist for legacy hardware or specific applications. Check both directories to confirm the package placed the files correctly.
ls /usr/share/wayland-sessions/
# Check for the .desktop file matching your installed environment
ls /usr/share/xsessions/
# X11 sessions appear here if the package provides a legacy backend
cat /usr/share/wayland-sessions/plasma.desktop
# Inspect the Exec and DesktopNames keys to verify the file is well-formed
If the file exists, the login screen will list it. Log out completely and watch the gear icon populate. Select your preferred environment once. GDM saves the choice and applies it on subsequent logins.
Log out completely before testing. Switching users or locking the screen does not trigger GDM to re-read the session cache.
Force a session when the selector fails
Sometimes the gear icon disappears due to a broken theme, a corrupted cache, or a misconfigured display manager. You can bypass the GUI selector by writing the session preference directly to the user configuration directory. GDM expects a sessions file inside ~/.config/gdm3/. The file contains a single line pointing to the session identifier. This method is useful when you manage multiple workstations and need consistent defaults without manual clicking.
mkdir -p ~/.config/gdm3
# Create the directory if it does not exist yet
echo "plasma.desktop" > ~/.config/gdm3/sessions
# Write the exact filename of the session definition to the config file
chmod 600 ~/.config/gdm3/sessions
# Restrict permissions so other users cannot read or modify your session preference
This method forces GDM to load the specified session without prompting. It works reliably across GNOME, KDE, XFCE, and other standard desktop environments. The identifier must match the .desktop filename exactly. Case sensitivity matters. If you type Plasma.desktop instead of plasma.desktop, GDM will ignore the file and fall back to the last known working session.
You can also verify the active session worker process to confirm GDM accepted your configuration. The worker process runs under your user namespace and handles the actual desktop launch sequence.
systemctl --user status gdm-session-worker
# Shows the active session worker process for your user
ps aux | grep gdm-session-worker
# Confirms the process is running and not stuck in a restart loop
Check the environment variables before restarting the display manager. A mismatch here means the session never actually launched.
Verify the session loads correctly
Confirm the system actually loads the correct environment. Check the running session type and verify GDM is not falling back to a default shell. Environment variables are the most reliable indicator of what the desktop actually thinks it is running.
echo $XDG_CURRENT_DESKTOP
# Prints the active desktop environment identifier
echo $XDG_SESSION_TYPE
# Returns wayland or x11 depending on the loaded session
loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type
# Queries the systemd logind database for the authoritative session type
If the output matches your installed environment, the configuration is working. If it returns GNOME or unknown despite your changes, the session file path is incorrect or SELinux is blocking access. Fedora's release cadence is six months. The N-2 release goes EOL when N+1 ships. Plan your desktop environment upgrades on that cycle to avoid broken session wrappers after major version jumps.
Run loginctl first. Read the actual session state before guessing.
Common pitfalls and missing session files
Missing session files are the most common cause of an empty gear menu. Package managers sometimes fail to place the .desktop file if the installation was interrupted or if a third-party repository provided a broken package. SELinux denials also block GDM from reading session definitions. You will see a generic authentication failure or a black screen instead of the login prompt.
audit: type=1400 audit(1715432100.000:123): avc: denied { read } for pid=1234 comm="gdm-session-wor" name="plasma.desktop" dev="sda2" ino=567890 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file permissive=0
That audit log line means SELinux labeled the session file incorrectly. Restore the default context and reload the policy. Never disable SELinux to fix a desktop environment issue. A missing label is a ten-second fix. Turning off mandatory access controls breaks the entire security model.
sudo restorecon -Rv /usr/share/wayland-sessions/
# Recursively fix SELinux labels on Wayland session files
sudo restorecon -Rv /usr/share/xsessions/
# Recursively fix SELinux labels on X11 session files
sudo systemctl restart gdm
# Restart the display manager to pick up the corrected labels
Another common trap is mixing session types. You might select a Wayland session in the gear menu, but your hardware or driver stack only supports X11. The login screen will accept the selection, then drop you back to the password prompt. Check your graphics driver compatibility before forcing a session type. Fedora defaults to Wayland for Intel and AMD GPUs. NVIDIA users sometimes need to stick with X11 depending on the driver version. The gdm package includes a configuration file at /etc/gdm/custom.conf where you can uncomment WaylandEnable=false to force X11 globally. Edit /etc/. Never edit /usr/lib/.
Read the audit log before disabling SELinux. A missing label is a ten-second fix. Turning off mandatory access controls breaks the entire security model.
Choose your session management approach
Use the gear icon selector when you want per-user flexibility and occasional environment switching. Use the ~/.config/gdm3/sessions file when you need a locked-in default that bypasses the login screen menu. Use restorecon and systemctl restart gdm when the session list disappears after a package update or security patch. Use journalctl -xe when the login screen loops back to the password prompt without error messages. Stay on the default GNOME session if you only need standard desktop functionality and want maximum compatibility with Fedora updates.
Trust the package manager. Manual file edits drift, snapshots stay.