A Python command-line tool for listing and filtering desktop entry files (.desktop files) on Linux systems. This tool helps you discover installed applications and autostart entries by scanning standard XDG directories.
- List Applications: Scan and display all installed desktop applications
- Autostart Entries: View applications configured to start automatically
- Regular Expression Filtering: Filter results using powerful regex patterns in application name, filename, or command
- Multiple Sources: Supports system, user, Snap, and Flatpak applications
- Path Export: Output file paths for scripting purposes
- Python 3.6 or higher
pyxdglibrary for XDG directory handling
pip install pyxdg
or
sudo apt install python3-pyxdg
or
sudo dnf install python3-pyxdg# Install to system
wget https://raw.githubusercontent.com/yamixst/desktop-entry/main/desktop-entry-list
chmod +x desktop-entry-list
sudo cp desktop-entry-list /usr/local/bin/
# or install only for user
curl -fL https://raw.githubusercontent.com/yamixst/desktop-entry/main/desktop-entry-list -o ~/.local/bin/desktop-entry-list
chmod +x ~/.local/bin/desktop-entry-listdesktop-entry-list [-h] [-a] [-p] [-t] [-d] [-u] [-s] [REGEX]
positional arguments:
REGEX Filter by regular expression match in filename, name, or exec command
options:
-h, --help show this help message and exit
-a, --autostart Show autostart entries instead of applications
-p, --path-only Show only full paths to desktop files
-t, --short Show entries in short format (filename, name, exec on one line)
-d, --directories Show directories being searched
-u, --user Show only user directories
-s, --system Show only system directories
# List all desktop applications
./desktop-entry-list
# List autostart entries
./desktop-entry-list -a
# Show only file paths (useful for scripts)
./desktop-entry-list -p
# Show which directories are being searched
./desktop-entry-list -d# Filter by application name (case-insensitive)
./desktop-entry-list browser
# Find applications starting with "fire"
./desktop-entry-list "^fire"
# Find Firefox or Chrome
./desktop-entry-list "firefox|chrome"
# Find text editors
./desktop-entry-list "text.*editor"
# Filter autostart entries
./desktop-entry-list -a mail
# Find applications with Python or shell scripts
./desktop-entry-list "\.(py|sh)$"
# Get paths for filtered results
./desktop-entry-list -p "code|vim|emacs"# Get all Snap applications
./desktop-entry-list -p | grep snapd
# Count installed applications
./desktop-entry-list -p | wc -lThe tool automatically searches these XDG-compliant directories:
- System:
/usr/share/applications/,/usr/local/share/applications/ - User:
~/.local/share/applications/ - Snap:
/var/lib/snapd/desktop/applications/ - Flatpak:
/var/lib/flatpak/exports/share/applications/,~/.local/share/flatpak/exports/share/applications/
- System:
/etc/xdg/autostart/ - User:
~/.config/autostart/
This project is licensed under the GNU General Public License v3.0 or later. See LICENSE for details.
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Mikhail Yatsenko mikhail.yatsenko@gmail.com