Bug 422394 - Spectacle not being finalized when ran in background mode
Summary: Spectacle not being finalized when ran in background mode
Status: RESOLVED WORKSFORME
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 20.04.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-02 21:13 UTC by Nathan
Modified: 2021-01-31 06:56 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan 2020-06-02 21:13:35 UTC
SUMMARY
The command does not finalizes when Spectacle is ran in background mode (-b cli argument). This makes difficulty the creation of custom scripts and automated tasks

STEPS TO REPRODUCE
1. Open the terminal
2. Run "spectacle -b"
3. Notice the command is never returning, unless you finalize it with ctrl + c or something

OBSERVED RESULT
Spectacle does not quit after the screenshot is taken

EXPECTED RESULT
Spectacle should quit after the screenshot is taken

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kernel 5.6.15-MANJARO
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
I reproduced with several different settings of the Configure window, but didn't tested in other distros. It may be just me being dumb, but in the man page it says "Take a screenshot **and exit** without showing the GUI"
Comment 1 David Redondo 2020-06-03 11:58:44 UTC
Does it even not return when the notification vanishes? The process has to stay alive to show  it. Try "spectacle -b -n"
Comment 2 Nathan 2020-06-03 14:18:10 UTC
(In reply to David Redondo from comment #1)
> Does it even not return when the notification vanishes? The process has to
> stay alive to show  it. Try "spectacle -b -n"

No, the process does not returns when the notification vanishes, tho it works just fine when along with the -n parameter (spectacle -b -n).

I don't have any special triggers for the Spectacle notification in my system, its just default.
Comment 3 Antonio Prcela 2020-06-07 20:57:55 UTC
Just tried it with v20.04.1 on Manjaro and it does close properly. Tho the notification has to disappear which takes 10 seconds.

Just to get this right: The notification appears & disappears, but spectacle keeps still running?
Comment 4 Nathan 2020-06-08 13:59:34 UTC
I identified the problem, it was kinda me being dumb. In the notifications triggers settings for Spectacle a had the "Run Command" checkbox checked, but the text field to put the command in was empty. If I uncheck the checkbox Spectacle just closes when the notification vanishes, otherwise it does not closes (even with no command in the text box).

I don't know if this was supposed to be that way, I'm really sorry if so. Should I mark it as resolved?
Comment 5 Antonio Prcela 2020-06-08 19:59:06 UTC
(In reply to Nathan from comment #4)
> I identified the problem, it was kinda me being dumb. In the notifications
> triggers settings for Spectacle a had the "Run Command" checkbox checked,
> but the text field to put the command in was empty. If I uncheck the
> checkbox Spectacle just closes when the notification vanishes, otherwise it
> does not closes (even with no command in the text box).
> 
> I don't know if this was supposed to be that way, I'm really sorry if so.
> Should I mark it as resolved?

Nice!
I'm not sure how that part of the notification settings (Run Command) should work, so I can't say if this is "works as designed". Might check with other programs..
Comment 6 Antonio Prcela 2020-11-22 17:09:26 UTC
(In reply to Nathan from comment #4)
> I identified the problem, it was kinda me being dumb. In the notifications
> triggers settings for Spectacle a had the "Run Command" checkbox checked,
> but the text field to put the command in was empty. If I uncheck the
> checkbox Spectacle just closes when the notification vanishes, otherwise it
> does not closes (even with no command in the text box).
> 
> I don't know if this was supposed to be that way, I'm really sorry if so.
> Should I mark it as resolved?

Ping. Set to resolve or not?