[Konsole-devel] Determining terminal dimensions in Konsole
Nikos Chantziaras
realnc at arcor.de
Mon Feb 8 09:00:51 UTC 2010
Hello.
I have a program that needs to get the terminal's dimensions it's
running in. AFAIK, the standard way to do this is with an TIOCGWINSZ
ioctl. However, TIOCGWINSZ only works in Konsole when not using its "-e
<cmd>" option. I did open a bug about it six months ago and posted a
small C example program that triggers it:
http://bugs.kde.org/show_bug.cgi?id=203185
but unfortunately it did not get any attention.
Now instead of hoping for the bug to get fixed (after six months you
tend to give up hope :P), I'm looking for an alternative way (that is,
without TIOCGWINSZ) of accurately (meaning that the COLUMNS and LINES
env variables won't cut it) getting the terminal dimensions in a Konsole
that has been started using the "-e my_program" option. Any ideas?
More information about the konsole-devel
mailing list