On Ubuntu 14.04, MATE desktop. I have just installed Tilda terminal, and so I added it to Startup Applications, just as /usr/bin/tilda. Rebooted, saw Tilda startup, and then noticed this:Your 131072x1 screen size is bogus. expect troubleThen I tried killall tilda, started tilda again, same message.Anyone know how can I fix this bogus screen size issue?
Tilda complains of bogus screen size at startup?
tilda
What is generating this messageThis is not produced by the Bourne Again shell.  This is not produced by Tilda.This is produced by the ps command from the procps toolset performing this check in its set_screen_size() function.  The ps command demands that your terminal device be a minimum of 9 columns by 2 rows in order for it to be able to display things reasonably.  Somewhere, possibly unbeknownst to you, you are invoking ps.The ps command obtains your terminal size directly from (the line discipline of) the terminal device attached to its standard I/O file descriptors, and allows that to be overridden by COLUMNS and LINES environment variables if their values are properly numeric.  You can see what your ps command is seeing in order to make its determination by running:stty size ; printenv COLUMNS LINES  You can experiment with pulling ps's leg by running things such as:COLUMNS=65535 LINES=1 psIf you have set the COLUMNS and LINES environment variables to the daft 131072×1 values, as shown by the output of printenv, then simply do not do that.  ☺  It is more probable however that the terminal device itself is reporting this size, which you will see from the output of stty.  (Note that all that the Bourne Again shell does with checkwinsize is set the values of these shell variables, which if not exported are not even passed to the ps command in its environment, to whatever the terminal device reports the size to be.  So checkwinsize is a red herring in that if the environment variables are nonsense, the terminal device is itself reporting nonsense, and the latter is the underlying problem to be addressed.)Which is why whilst it isn't producing the message Tilda could be at fault.  The terminal device size is a shared resource that anything that has an open file descriptor to the terminal device can change arbitrarily with an ioctl() system call.  But it is conventionally set, in the scenario that one is using a software terminal emulator program like Tilda, by the terminal emulator program when the size of the GUI window in which the emulation is being displayed changes.  The terminal emulator program gets a GUI resize event, converts it into columns and lines, and sets the device size with ioctl().This is not to say that something else hasn't set the size to this nonsense.  After all, you can set it yourself to an arbitrary nonsense size by just running, for example, the command:stty columns 1 rows 65535Which brings us to …How to reset the terminal device sizeIf you find yourself in the position that the terminal device is reporting a nonsense size:If you are using a GUI terminal emulator, resize the GUI by a column/line or so.  This should trigger the ioctl() and set the terminal size to something reasonable.Set the size to something more reasonable with (for example):stty columns 80 rows 25Use the reset command.  Note that reset sets a lot of other stuff in addition to just the terminal device size.If your terminal emulator is DEC VT340/VT420 compatible, emit the appropriate DECSCPP amd DECSLPP/DECSNLS control sequences directly, or use the nosh toolset's console-resize (a.k.a. resizecons) command to emit them:resizecons 80x25