Column widths FROM / WHAT in w(1)

@lbutlr kremels at
Sat Apr 6 20:58:32 UTC 2019

On 6 Apr 2019, at 07:33, Polytropon <freebsd at> wrote:
> System: FreeBSD 12.0-p3 i386.
> I recently discovered that the WHAT column in the output
> of the "w" command has become unusable, and "man w" does
> not seem to indicate any user control for the formatting
> of the columns.
> The column WHAT now can only show up to 3 (in words: three)
> characters on a standard 80-column terminal. I will put a

How long has it been since an 80 column terminal was standard? Even back as far as the late 80s the majority of terminals I used were 132 columns and if you were stuck on an ADM-3a you got off it as quickly as possible, and now I don't even know where you would find an 80 column terminal.

> ruler on top for illustration:
> ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
> USER       TTY      FROM                                      LOGIN@  IDLE WHAT
> Things like "xinit" become "xin", and any longer command
> cannot be easily identified anymore. Columns 79 and 80
> aren't used at all.
> For comparison: On an older system, I get this layout:
> ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
> USER             TTY      FROM              LOGIN@  IDLE WHAT
> This is more than 20 characters for the WHAT field.

Does it depend on the contents of "From"? Hmm, no, it doesn't seem too. however, I will say that getting the from field cut-off in `w` is a lot more of an issue than the WHAT column, I think.

Have you looked at xo_parse_args?

You could always output as json or xml and do your own thing.

> Any idea on how to get the old layout of w back, instead
> of increasing the terminal width?

"Oh damn", said Maladict.

More information about the freebsd-questions mailing list