Bug 525413 - Sharing a screenshot via "Export -> Share" (KDE Purpose) not working.
Summary: Sharing a screenshot via "Export -> Share" (KDE Purpose) not working.
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 6.7.4
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-09-08 23:24 UTC by zsdvasc
Modified: 2026-10-02 20:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.8.0
Sentry Crash Report:


Attachments
How it looks before and after fix (2.35 MB, video/mp4)
2026-09-08 23:24 UTC, zsdvasc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zsdvasc 2026-09-08 23:24:14 UTC
Created attachment 195894 [details]
How it looks before and after fix

DESCRIPTION
I wrote purpose plugin for myself, when I try to use it with spectacle I see it's not working with "file doesn't exist" error. After this I try to use default telegram plugin, same. This isn't specific to any one Purpose provider; it reproduces with any configured Share target.

STEPS TO REPRODUCE
1. Open Spectacle.
2. Choose "Rectangular Region" capture mode.
3. Drag out a selection that covers only part of one screen.
4. In the toolbar that appears, open "Export" > "Share", then click any listed provider.

OBSERVED RESULT
The file that gets shared/uploaded is the full raw screenshot (all monitors), not the rectangular region that was selected.

EXPECTED RESULT
The shared file should match the selected rectangular region

SOFTWARE/OS VERSIONS
 - system: `"x86_64-linux"`
 - host os: `Linux 6.18.47, NixOS, 26.05 (Yarara)`

 - KDE Plasma Version: `"6.6.6"`
 - KDE Frameworks Version: `"6.26.0"`
 - Qt Version: `"6.11.1"`
 - Kernel Version: `"6.18.47 (64-bit)"`
 - Graphics Platform: `"Wayland"`
 - Processors: `"16 × AMD Ryzen 7 7800X3D 8-Core Processor"`
 - Memory: `"64 GiB of RAM (62.0 GiB usable)"`
 - Graphics Processor 1: `"NVIDIA GeForce RTX 4070 SUPER"`
 - Graphics Processor 2: `"AMD Ryzen 7 7800X3D 8-Core Processor"`

ADDITIONAL INFORMATION
I try to create patch and it's working now

purposeFix.patch
diff --git a/src/SpectacleCore.cpp b/src/SpectacleCore.cpp
index 85994141..6c5601f8 100644
--- a/src/SpectacleCore.cpp
+++ b/src/SpectacleCore.cpp
@@ -134,6 +134,14 @@ SpectacleCore::SpectacleCore(QObject *parent)
     m_annotationDocument = std::make_unique<AnnotationDocument>();

     // essential connections
+    connect(SelectionEditor::instance(), &SelectionEditor::accepted,
+            this, [this](const QRectF &rect, const ExportManager::Actions &){
+        if (!m_videoMode) {
+            m_annotationDocument->cropCanvas(rect);
+            syncExportImage();
+        }
+    }, Qt::DirectConnection);
+
     connect(SelectionEditor::instance(), &SelectionEditor::accepted,
             this, [this](const QRectF &rect, const ExportManager::Actions &actions){
         m_returnToViewer = m_startMode == StartMode::Gui;
@@ -170,8 +178,6 @@ SpectacleCore::SpectacleCore(QObject *parent)
         } else {
             SpectacleWindow::setVisibilityForAll(QWindow::Hidden);
             deleteWindows();
-            m_annotationDocument->cropCanvas(rect);
-            syncExportImage();
             auto exportActions = actions & ExportManager::AnyAction ? actions : autoExportActions();
             if (m_ocrExportInProgress) {
                 if (Settings::closeAfterOcr()) {
Comment 1 Bug Janitor Service 2026-09-09 10:08:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/spectacle/-/merge_requests/587
Comment 2 zsdvasc 2026-09-09 20:56:12 UTC
https://invent.kde.org/plasma/spectacle/-/merge_requests/587#note_1607083
>> This doesn't fix sharing via email for me; is that a separate issue?

Yes this is separate issue of kde purpose email plugin itself, you can try to use share via email from dolphin or any other app with purpose integration to check this

https://files.catbox.moe/q0edv2.mp4

most of purpose plugins outdated and not working at all, imgui pastebin email
Comment 3 Noah Davis 2026-09-10 08:23:40 UTC
This is similar to https://bugs.kde.org/show_bug.cgi?id=524850, but I think the cause is not the same since an updated image is definitely available by this time. It seems like the issue has to do with the timing of the file's availability. Based on that, it seems like it should have been possible to reproduce this bug for some time, but I haven't been aware of it until now.
Comment 4 Tobias Fella 2026-09-30 11:39:31 UTC
Git commit bec4456db51d5c4fe14004adc8208fe9980b3145 by Tobias Fella.
Committed on 30/09/2026 at 09:20.
Pushed by ndavis into branch 'master'.

Fix sharing images

Without this patch, the temp file is deleted immediately after being saved.

M  +2    -3    src/SpectacleCore.cpp

https://invent.kde.org/plasma/spectacle/-/commit/bec4456db51d5c4fe14004adc8208fe9980b3145
Comment 5 Noah Davis 2026-09-30 11:46:41 UTC
Git commit 1957103da5aec6ee7051f86415a579ae222ff55d by Noah Davis.
Committed on 30/09/2026 at 11:41.
Pushed by ndavis into branch 'Plasma/6.8'.

Fix sharing images

Without this patch, the temp file is deleted immediately after being saved.

Based on the patch sent in the bug report


(cherry picked from commit f187aa8ec207d0e5c5df7587a597f5e83ff7374d)

Co-authored-by: Tobias Fella <tobias.fella@kde.org>

M  +6    -2    src/SpectacleCore.cpp

https://invent.kde.org/plasma/spectacle/-/commit/1957103da5aec6ee7051f86415a579ae222ff55d