This document explains why custom service menus (desktop files) cannot be added to the KDE Plasma desktop background context menu (right-click on wallpaper) and provides alternative solutions.
KDE Plasma desktop background context menus are not handled by the same system as Dolphin file manager context menus:
- Dolphin Context Menus: Use
ServiceTypes=KonqPopupMenu/Pluginand are processed by Dolphin - Desktop Background Context: Handled directly by the Plasma shell, not Dolphin
- No Bridge: There is no mechanism to connect ServiceMenus to the desktop background context
Dolphin File Manager Context:
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────┐
│ Right-click │───▶│ Dolphin ServiceMenu │───▶│ Your Script │
│ on file/folder │ │ System │ │ Execution │
└─────────────────┘ └─────────────────────┘ └─────────────────┘
Desktop Background Context:
┌─────────────────┐ ┌─────────────────────┐
│ Right-click │───▶│ Plasma Shell │
│ on wallpaper │ │ (No ServiceMenu) │
└─────────────────┘ └─────────────────────┘
This limitation has existed since KDE 4 and continues through Plasma 5 and 6:
- KDE Bug 179678: Longstanding request for desktop context ServiceMenus
- KDE Forums: Multiple discussions about this limitation
- No Official Solution: KDE developers have not implemented this feature
| Location | ServiceMenu Works? | ServiceTypes | Notes |
|---|---|---|---|
| Dolphin file/folder | ✅ Yes | KonqPopupMenu/Plugin,all/allfiles |
Standard support |
| Dolphin empty area | ✅ Sometimes | KonqPopupMenu/Plugin,all/allfiles |
If configured correctly |
| Folder View desktop | KonqPopupMenu/Plugin,all/allfiles |
Only if using Folder View mode | |
| Dolphin directory | ✅ Yes | KonqPopupMenu/Plugin,inode/directory |
Directory-specific actions |
| Location | Reason |
|---|---|
| Desktop background (wallpaper) | Plasma shell limitation |
| Plasma panel context | Different system |
| Desktop icons context | Limited customization |
Pros:
- Works from anywhere
- Fast access
- No context menu needed
Implementation:
# Create custom shortcuts in KDE Settings
# System Settings → Shortcuts → Custom Shortcuts
# Add new shortcut for each clipboard action:
# Command: ydmenu-py-env ClipboardPublish
# Trigger: Ctrl+Alt+P (or your preferred key)Example Shortcuts:
Ctrl+Alt+P- Publish clipboard (.ru)Ctrl+Alt+Shift+P- Publish clipboard (.com)Ctrl+Alt+S- Save clipboard to stream
Pros:
- Visual interface
- Always visible
- Customizable
Implementation:
- Create a QML-based Plasma widget
- Add buttons for clipboard actions
- Install as a custom plasmoid
Basic QML Structure:
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
PlasmaCore.ToolTipArea {
mainText: "Yandex Disk Clipboard"
subText: "Click to access clipboard actions"
MouseArea {
onClicked: {
// Call your script
Qt.openUrlExternally("ydmenu-py-env ClipboardPublish")
}
}
}Pros:
- Search-based access
- Fast execution
- Integrates with KDE workflow
Implementation:
- Create a KRunner plugin
- Register commands like "yandisk publish"
- Execute clipboard actions via search
Pros:
- Standard KDE integration
- Easy to find
- Consistent with other apps
Implementation:
- Add your script to Applications menu
- Create desktop files for each action
- Place in
~/.local/share/applications/
Example Desktop File:
[Desktop Entry]
Type=Application
Name=Yandex Disk - Publish Clipboard
Exec=ydmenu-py-env ClipboardPublish
Icon=yandex-disk
Categories=Utility;Pros:
- Available in file manager
- Quick access during file operations
- Context-aware
Implementation:
- Create Dolphin service menu actions
- Add toolbar buttons
- Integrate with file operations
Pros:
- Always accessible
- System tray integration
- Non-intrusive
Implementation:
- Create a system tray applet
- Add context menu to tray icon
- Execute clipboard actions
Primary Solution: Global Shortcuts
# Recommended keyboard shortcuts:
Ctrl+Alt+P # Publish clipboard (.ru)
Ctrl+Alt+Shift+P # Publish clipboard (.com)
Ctrl+Alt+S # Save clipboard to streamSecondary Solution: Application Menu
- Add to Applications → Utilities
- Create desktop files for each action
- Easy to find and use
-
Set up Global Shortcuts:
# Open KDE System Settings # Navigate to: Shortcuts → Custom Shortcuts # Add new shortcut group: "Yandex Disk Clipboard" # Add commands for each action
-
Create Application Menu Entries:
# Create desktop files in ~/.local/share/applications/ # Name them: yandisk-clipboard-publish.desktop # Add to Utilities category
-
Test and Document:
- Test each shortcut
- Document for users
- Add to project README
- Plasma Architecture: Desktop shell is separate from file manager
- Security: Desktop context is highly restricted
- Performance: Desktop context needs to be fast
- Design Philosophy: KDE focuses on file manager integration
- Bug 179678: "Allow ServiceMenus on desktop background"
- Status: WONTFIX (by design)
- Reason: Architectural limitation, not a bug
- KDE Forums: Multiple threads about this limitation
- Reddit: r/kde discussions about desktop context menus
- GitHub: Various workarounds and solutions
While KDE Plasma does not support custom service menus on the desktop background, there are several effective alternatives:
- Global Shortcuts - Most practical solution
- Application Menu - Standard KDE integration
- Plasma Widgets - Advanced customization
- KRunner Integration - Search-based access
For the Yandex Disk clipboard functionality, global shortcuts provide the best user experience and are the most reliable solution.