6

I opened terminal windows and I got a message

your screen size %d%d is bogus. Expect trouble

I closed the terminal and the next time I opened terminal, the message didn't show up.

What is this message and why did I receive it?

5

This message comes from (perhaps other places) procps, which does a quick check to determine the screen width for ps command's notion of width.

procps makes this check in set_screen_size, e.g., if the screen size is too small to print anything useful:

  if((screen_cols<9) || (screen_rows<2))
    fprintf(stderr,"Your %dx%d screen size is bogus. Expect trouble.\n",
      screen_cols, screen_rows
    );

You might see the same code (via cut/paste) in other programs, but this is the most likely one.

As to why the problem occurred: when starting a terminal emulator, it can be multiple processes which communicate, sharing the information about the pseudo-terminal connection. Sometimes, the information is not shared rapidly enough, causing (usually) minor errors in the terminal settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.