How to Set Up Startup Commands to Close Windows on Linux Mint?
Asked by
marsh restoration
I'm using Linux Mint and I've got a tablet driver and a VPN that automatically open their respective windows when they start up. This is a bit annoying because I prefer them to run in the background without popping up. I can handle commands to run on startup, but I need some help figuring out the right commands to use for closing these windows, so I don't have to take the time to close them manually each time.
Answers
One approach is to add a delay and use the `wmctrl` command. You can try something like `sleep 5 && wmctrl -c "window_name"` to close the specific windows after theyโve had a moment to open.
Reply to this answer
Before going down that path, check if the VPN and tablet driver have options to run without opening a window. That could save you the hassle altogether! They might not need to display any interface at startup.
Reply to this answer
You can also try launching the commands with an `&` so they run in the background, which might stop them from displaying the windows right away.
Reply to this answer
You can customize the startup command for your applications. Look in the Startup Applications settings, click on your VPN or driver, and use a command that includes options to not show the window. If none are available, you could create a script that closes the window after a brief pause. Begin your script with `#!/bin/bash` to ensure it runs correctly.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions