this post was submitted on 09 Feb 2024
29 points (91.4% liked)

Linux

48323 readers
638 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm trying to write a simple bash script that opens up GQRX, sends it some TCP commands, then closes it down.

Unfortunately, I've found that when I close the program like this, the next time it opens, it will pop up a window saying "crash detected" and ask me to review the configuration file. This prevents the app from loading unless someone is present to click the dialog box.

This error only seems to happen when I try to close the program using the bash script. Closing it by just clicking the X doesn't cause this problem next time it's launched.

I think I'm closing the app too aggressively which terminates it before it can wrap up its affairs, and it interprets this as a crash. What's the best way to close the app to keep this from happening?

I've tried:

  • pkill -3 gqrx
  • pkill -13 gqrx

But the problem persists. Is there an even softer way to close an application?

you are viewing a single comment's thread
view the rest of the comments
[–] mozz@mbin.grits.dev 7 points 9 months ago (2 children)

My first thought would be to use xdotool. Does that work for you?

[–] palordrolap@kbin.social 2 points 9 months ago (1 children)

This, or wmctrl that has some overlap. OR if this is Wayland (and not Xorg), whatever alternatives for those the window manager provides.

Anyone know what those are?

[–] mozz@mbin.grits.dev 2 points 9 months ago

Yeah agreed. All the people in here talking about signals... you're not, like, wrong, but you missed the nature of the question i.e. "hey it seems like this GUI application doesn't deal well with Unix signals, so what else can I do"