Jump to content

mrjpaxton

Members
  • Posts

    16
  • Joined

  • Last visited

Community Answers

  1. mrjpaxton's post in Helios64 - Setting Serial TTY Size with Picocom was marked as the answer   
    Sure thing.
     
    Luckily, it didn't take much time to figure it out. Thanks to the person who answered here: https://unix.stackexchange.com/questions/16578/resizable-serial-console-window/283206
     
    I was able to use something POSIX standard like the "res()" shell function he described to get it working.
     
    I just put it in as a bash function in my .bashrc file and had it only call when "TERM=linux" which seems reasonable to me for now, since picocom (and the regular Linux pTTY) always seems to set the TERM variable to that.
     
    resize-term() { OLDSTTY=$(stty -g) stty raw -echo min 0 time 5 printf '\0337\033[r\033[999;999H\033[6n\0338' > /dev/tty IFS='[;R' read -r _ rows cols _ < /dev/tty stty "$OLDSTTY" echo "Set cols = $cols"; echo "Set rows = $rows" stty cols "$cols" rows "$rows" } [ "$TERM" == "linux" ] && resize-term  
×
×
  • Create New...