I'm trying to set up some shortcuts in my terminal so I can quickly launch applications like Spotify and Discord without them spamming logs in the terminal. I know that GUI apps usually run with less visible output, and I've found commands like 'gtk-launch google-chrome' that seem to work without cluttering the terminal. However, even with my alias for Discord set up as 'alias discord='flatpak run com.discordapp.Discord'', I'm still getting a ton of logs. I've checked with some tools and sources but can't seem to figure out how to avoid this with my current setup. Any suggestions?
3 Answers
If you prefer, you can redirect your command's output to a file to keep it from showing up in the terminal. Use something like `your_command > /some/file/with/logs` or just redirect it to `/dev/null` to discard it entirely. Also, adding an `&` at the end can run it in the background so your terminal won't wait for it to finish.
It sounds like you're facing the expected behavior here. To prevent output from cluttering your terminal when running commands, you can append `> /dev/null 2>&1` to your command. This will send all output to the null device.
Just remember, when you open an app by clicking its icon, it still runs while outputting to a terminal that you're not seeing. If you attach outputs through your command line, that logging behavior can still happen.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures