Bug 425573 - Spectacle does not save file in background mode
Summary: Spectacle does not save file in background mode
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 20.08.1
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
: 428113 429618 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-20 01:28 UTC by Billy McCann
Modified: 2020-12-01 01:32 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.12
Sentry Crash Report:


Attachments
screenshot of configuration (779.42 KB, image/png)
2020-08-20 01:28 UTC, Billy McCann
Details
output of 'strace spectacle -abno test.png' (476.59 KB, text/plain)
2020-09-13 23:15 UTC, Calvin Hoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Billy McCann 2020-08-20 01:28:08 UTC
Created attachment 131030 [details]
screenshot of configuration

SUMMARY
Spectacle is configured to 
a) Capture a Rectangular Selection upon hotkey press.
b) auto-save the rectangular selection to a predefined location.
c) copy the image to the clipboard.
The previous version of Spectacle worked as expected.

STEPS TO REPRODUCE
1. Configure Spectacle as described above.
2. Press hotkey.
3. Browse autosave location and witness no new file has been saved.

OBSERVED RESULT
Rectangular Selection is copied to the clipboard, but the image is not saved to the default location.

EXPECTED RESULT
Rectangular Selection is copied to the clipboard AND the Rectangular Selection is saved to default location.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Linux 5.8.1 / Plasma 5.19.4
(available in About System)
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
I love KDE! 😊
Comment 1 MichalW 2020-08-23 14:01:31 UTC
Same here. Steps to reproduce:

spectacle -n -b -r --output /dev/shm/screenshot.png

Thre should be screenshot in clipboard and on disk. There is only in clipboard.
Comment 2 Emre 2020-08-31 13:21:01 UTC
I confirm this bug as well. It was working properly in earlier versions. Now, when I do this, only clipboard is saved, file on disk does not exist.

But if I launch spectacle manually after clicking the shortcut button, then a file is automatically created but which spans all my monitors.
Comment 3 Calvin Hoy 2020-09-13 23:15:33 UTC
Created attachment 131619 [details]
output of 'strace spectacle -abno test.png'

Can confirm, The '-o' / '--output' option appears to do nothing in the current version of Spectacle (20.08.1).

In case it helps, I've attached the output of 'strace spectacle -abno test.png'.
Comment 4 Calvin Hoy 2020-10-01 23:48:37 UTC
Still occurs in the most current version of Spectacle (20.11.70), compiled using kdesrc-build.
Comment 5 Antonio Prcela 2020-10-04 20:56:28 UTC
Fixed with MR 24:

https://invent.kde.org/graphics/spectacle/-/merge_requests/24
Comment 6 Antonio Prcela 2020-10-06 19:04:27 UTC
Git commit 1e7b22b8c60575d4a12c267db818f8a15f17d500 by Antonio Prcela.
Committed on 06/10/2020 at 18:30.
Pushed by ngraham into branch 'master'.

Respect settings and cli parameters

Separate 'if' for doCopyToClipboard() and doSave(), since one can have both active. Adjusted the corresponding notifications.
Related: bug 422148

M  +14   -6    src/SpectacleCore.cpp
M  +1    -0    src/SpectacleCore.h

https://invent.kde.org/graphics/spectacle/commit/1e7b22b8c60575d4a12c267db818f8a15f17d500
Comment 7 Méven Car 2020-10-25 06:58:44 UTC
*** Bug 428113 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2020-12-01 01:32:09 UTC
*** Bug 429618 has been marked as a duplicate of this bug. ***