On Debian with the GNOME desktop environment, the command equivalent to clicking the "Quit" button in a program window (which typically closes the window but does not forcefully kill the program) is:
xdotool getactivewindow windowkill
However, this requires xdotool to be installed. If you want a more native approach, you can use:
This sends a "close window" request to the active window, allowing the program to handle the shutdown gracefully (e.g., prompting to save files if needed).
Steps to Use:
- Install
wmctrl (if not already installed):
- Run the command above to close the active window.
This mimics the behavior of clicking the "X" button or selecting "Quit" from the menu, rather than forcefully terminating the process.