Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    It might not be difficult to patch a terminal program to colourize the stderr stream. Somebody has suggested something like this at ubuntu brainstorm. Commented May 2, 2011 at 3:27
  • @intuited: that would require pathcing every terminal emulator you want this to work with. Using LD_PRELOAD trick to intercept write calls seems to be the most appropriate, IMO (but then again, there might be differences on certain *nix flavors.) Commented May 2, 2011 at 13:24
  • At least on Linux, intercepting write alone would not work as most applications do not call directly, but another function from some shared library (like printf) that would call the original write Commented Nov 1, 2012 at 23:02
  • @StephaneChazelas I was thinking of hooking around the write syscall wrapper. Is it inlined in other functions in Glibc? Commented Nov 1, 2012 at 23:13
  • 1
    The stderred project seems to be an implementation of hooking write via LD_PRELOAD as you describe. Commented Nov 10, 2013 at 14:41