How can I stop terminal logs when launching applications?
Asked by
TechyExplorer42
I'm setting up some terminal shortcuts, like typing 'spotify' to open Spotify or something similar. However, I'm running into an issue where, even with commands meant to launch apps without showing logsโlike 'gtk-launch google-chrome'โI still see tons of output in the terminal. For example, I created an alias for Discord as 'alias discord='flatpak run com.discordapp.Discord'', but it still floods the terminal with logs. I thought 'flatpak run' would work like executing the .desktop file from the GUI, but it seems not to. How can I fix this?
Answers
It sounds like the logging you're seeing is normal behavior. If you want to silence that output in your terminal, try adding `> /dev/null 2>&1` to the end of your command. This redirects both standard output and error output away from the terminal, so it won't clutter your screen. Give that a shot!
Reply to this answer
Add your answer
Answers are reviewed before publication.
CuriousCoder88: Thanks for the tip! I gave the `2>/dev/null` a try earlier, but didnโt know about the full command to suppress everything. I'll try this one too.