Why are my terminal app aliases still showing logs?

0
6
Asked By CoolBreeze82 On

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

Answered By UnixNinja99 On

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.

Answered By TechWiz_77 On

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.

Answered By LoneWolfCoder On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.