.desktop file and removing it via the terminal or file manager.
Understanding the SteamOS Desktop Environment
SteamOS 3 is built on Arch Linux and utilizes KDE Plasma as its graphical interface. However, unlike standard Debian-based distributions where kquitapp5 might be used to manage sessions, SteamOS handles desktop entries differently. The favorites bar in the Steam Big Picture mode or the KDE taskbar reads directly from user-specific configuration directories. When an application like Discord is uninstalled via a package manager, the binary is removed, but the desktop entry often remains if it was pinned manually or created by a flatpak installation.
It is crucial to distinguish between system-wide applications located in /usr/share/applications and user-local applications stored in ~/.local/share/applications. Most third-party apps installed on SteamOS, including Discord when installed via Flatpak or manual download, create their shortcuts in the user-local directory. Modifying files in the system directory requires root access and can break system updates, so we focus exclusively on the user-level files.
Locating the Discord Desktop File
The first step is to identify the exact name of the desktop file that is causing the ghost icon to appear. These files typically end with the extension .desktop and contain metadata about the application, such as its name, icon path, and execution command. You can find these files using the terminal or a graphical file manager.
- Open the terminal on your Steam Deck or PC running SteamOS.
- Navigate to the local applications directory by typing:
cd ~/.local/share/applications - List all files containing "discord" in their name by executing:
ls -la *discord*
This command will return any files matching the pattern. Common names include com.discordapp.Discord.desktop for Flatpak installations or discord.desktop for native installs. If you do not see any results, check the system-wide directory by running ls /usr/share/applications | grep discord, though this is less common for user-pinned items.
Removing the Shortcut
Once you have identified the correct file, you can remove it. Since this file resides in your home directory, you do not need sudo permissions. Deleting the file immediately removes the shortcut from the favorites list because the launcher re-reads the directory upon the next refresh.
To delete the file, use the rm command followed by the filename you found in the previous step. For example, if the file is named com.discordapp.Discord.desktop, run:
rm com.discordapp.Discord.desktop
If you prefer using a graphical interface, you can open the Files application (Dolphin), enable viewing hidden files by pressing Ctrl+H, navigate to .local/share/applications, and delete the file manually. This method is often safer for users uncomfortable with the command line, as it provides visual confirmation of the file being removed.
Refreshing the Favorites List
In some cases, the SteamOS interface may cache the favorites list, meaning the icon might persist briefly after deletion. To force the UI to update, you can restart the shell or simply log out and log back in. On SteamOS, restarting the display server is generally not required for simple desktop file removal, but if the icon remains, try switching to Game Mode and back to Desktop Mode, or restarting the session.
For persistent issues where the icon returns after a reboot, ensure that no other processes are recreating the desktop file. If you previously installed Discord via Flatpak, uninstalling the app via the Discover software center should also clean up associated desktop entries. If the issue persists, consider checking for residual configuration files in ~/.config/flatpak.
Alternative Cleanup Methods
If you frequently install and uninstall applications, keeping your desktop clean is important. You can automate the cleanup of unused desktop files by periodically scanning the ~/.local/share/applications directory. Tools like freedesktop.org compliant managers can help, but manual removal is often the most reliable method for single-item cleanup.
Additionally, if you are managing multiple systems, syncing your desktop configurations can lead to inconsistencies. Always verify the target machine's OS version before applying scripts designed for other Linux distributions. For more information on managing Discord across different Linux environments, you might find Update Discord on Debian/Ubuntu with a Simple Command useful, although the desktop file management principles remain similar.
Frequently Asked Questions
Why does the Discord icon reappear after I delete it?
The icon likely reappears because another process, such as a Flatpak daemon or a startup script, is regenerating the desktop file. Ensure that Discord is fully uninstalled via your package manager before deleting the file. If it returns, check for residual Flatpak instances.
Can I edit the desktop file instead of deleting it?
You can edit the file to change its properties, but editing is risky if you are unfamiliar with the format. It is safer to delete the file entirely. Editing may cause the launcher to fail to find the icon or executable, leading to broken links rather than a clean removal.
Does this affect my ability to reinstall Discord later?
No, deleting the desktop file has no impact on your ability to reinstall Discord. The actual application data and settings are stored separately in ~/.var/app/com.discordapp.Discord for Flatpak or in ~/.config/discord for native installs. Reinstalling will recreate the necessary desktop entry automatically.
What if I cannot find the file in .local/share/applications?
If the file is not in the local directory, it may be in the system-wide /usr/share/applications folder. In this case, you will need sudo privileges to delete it. Use sudo rm /usr/share/applications/discord.desktop carefully, as modifying system files can affect other users on the same machine.
Is there a way to clear all unused desktop files at once?
There is no built-in one-click solution in SteamOS to clear all unused desktop files. You would need to write a custom script to compare installed binaries against existing desktop entries. For most users, manually removing specific unwanted icons is the most efficient approach.