So, Im probably not in the right place but im getting kind of desperate here.
When I resize my putty window by simply dragging the window border,
it closes whatever ssh session I am currently in. Some details: I
am using the latest version from the website. Lets say I do a
./start Network/tunnelConnect.py -p 22 into a remote linux machine.
On 2019-03-26, xjasoneganx@gmail.com <xjasoneganx@gmail.com> wrote:
So, Im probably not in the right place but im getting kind of desperate here.
When I resize my putty window by simply dragging the window border,
it closes whatever ssh session I am currently in. Some details: I
am using the latest version from the website. Lets say I do a
./start Network/tunnelConnect.py -p 22 into a remote linux machine.
Does it reproduce if you just use "ssh" to connect to the remote machine
like a normal person, instead relying on the above Python wrapper?
It smells like something might be getting a SIGWINCH signal from the
terminal resize and is not prepared to handle it.
Normally programs don't have know about the existence of SIGWINCH
because its default action is for it to be ignored. That's why in
everyday experience, programs don't terminate when the terminal
window is resized, even though they don't make any arrangements
regarding SIGWINCH.
--
TXR Programming Lanuage: http://nongnu.org/txr
Music DIY Mailing List: http://www.kylheku.com/diy
ADA MP-1 Mailing List: http://www.kylheku.com/mp1
On Tuesday, March 26, 2019 at 3:53:33 PM UTC-5, Kaz Kylheku wrote:connect to the customers machine.
On 2019-03-26, xjasoneganx@gmail.com <xjasoneganx@gmail.com> wrote:
So, Im probably not in the right place but im getting kind of desperate here.
When I resize my putty window by simply dragging the window border,
it closes whatever ssh session I am currently in. Some details: I
am using the latest version from the website. Lets say I do a
./start Network/tunnelConnect.py -p 22 into a remote linux machine.
Does it reproduce if you just use "ssh" to connect to the remote machine like a normal person, instead relying on the above Python wrapper?
It smells like something might be getting a SIGWINCH signal from the terminal resize and is not prepared to handle it.
Normally programs don't have know about the existence of SIGWINCH
because its default action is for it to be ignored. That's why in
everyday experience, programs don't terminate when the terminal
window is resized, even though they don't make any arrangements
regarding SIGWINCH.
--
TXR Programming Lanuage: http://nongnu.org/txr
Music DIY Mailing List: http://www.kylheku.com/diy
ADA MP-1 Mailing List: http://www.kylheku.com/mp1
I wouldnt know how to just use ssh in our environment once im puttied into my linux box. ...our hostnames arent recognized unless you use the python command. I am on a windows box using putty to ssh into my linux box behind me...and from there I
On Tuesday, March 26, 2019 at 3:57:45 PM UTC-5, xjaso...@gmail.com wrote:connect to the customers machine.
On Tuesday, March 26, 2019 at 3:53:33 PM UTC-5, Kaz Kylheku wrote:
On 2019-03-26, xjasoneganx@gmail.com <xjasoneganx@gmail.com> wrote:
So, Im probably not in the right place but im getting kind of desperate here.
When I resize my putty window by simply dragging the window border,
it closes whatever ssh session I am currently in. Some details: I
am using the latest version from the website. Lets say I do a
./start Network/tunnelConnect.py -p 22 into a remote linux machine.
Does it reproduce if you just use "ssh" to connect to the remote machine like a normal person, instead relying on the above Python wrapper?
It smells like something might be getting a SIGWINCH signal from the terminal resize and is not prepared to handle it.
Normally programs don't have know about the existence of SIGWINCH
because its default action is for it to be ignored. That's why in everyday experience, programs don't terminate when the terminal
window is resized, even though they don't make any arrangements
regarding SIGWINCH.
--
TXR Programming Lanuage: http://nongnu.org/txr
Music DIY Mailing List: http://www.kylheku.com/diy
ADA MP-1 Mailing List: http://www.kylheku.com/mp1
I wouldnt know how to just use ssh in our environment once im puttied into my linux box. ...our hostnames arent recognized unless you use the python command. I am on a windows box using putty to ssh into my linux box behind me...and from there I
Im gonna cat the tunnelconnect.py file and see what its doing real quick
On Tuesday, March 26, 2019 at 3:53:33 PM UTC-5, Kaz Kylheku wrote:
On 2019-03-26, xjasoneganx@gmail.com <xjasoneganx@gmail.com> wrote:
So, Im probably not in the right place but im getting kind of desperate here.
When I resize my putty window by simply dragging the window border,
it closes whatever ssh session I am currently in. Some details: I
am using the latest version from the website. Lets say I do a
./start Network/tunnelConnect.py -p 22 into a remote linux machine.
Does it reproduce if you just use "ssh" to connect to the remote machine
like a normal person, instead relying on the above Python wrapper?
It smells like something might be getting a SIGWINCH signal from the
terminal resize and is not prepared to handle it.
Normally programs don't have know about the existence of SIGWINCH
because its default action is for it to be ignored. That's why in
everyday experience, programs don't terminate when the terminal
window is resized, even though they don't make any arrangements
regarding SIGWINCH.
--
TXR Programming Lanuage: http://nongnu.org/txr
Music DIY Mailing List: http://www.kylheku.com/diy
ADA MP-1 Mailing List: http://www.kylheku.com/mp1
I wouldnt know how to just use ssh in our environment once im puttied
into my linux box. ...our hostnames arent recognized unless you use
the python command. I am on a windows box using putty to ssh into my
linux box behind me...and from there I connect to the customers
machine.
That tunnelconnect wrapper is like 500 lines of code...so yeah i am
not sure how to get around connecting to a machine without using it.
Problem is, there is no reason to believe that the problem is anywhere
else but that Pythonology that you have there; so you either have to
debug into that yourself, or report this crippling issue to its maintainers/purveyors.
I found a nice script (below) which resizes the terminal session to match that of the putty window.
It would be sweet if putty provided a trigger event which will launch the script in my terminal session when the window has been re-sized. Ideally, the script would be launched after a slight delay following mouse up after the re-size action.
Of course, the script can't launch if a user is not at a command prompt. Not certain how putty might make this distinction.
Which is probably why the feature has not been implemented?
from: https://raw.githubusercontent.com/akkana/scripts/master/termsize
#!/usr/bin/env python
# Get the current size of the terminal window, and set stty size accordingly. # A replacement for xterm's resize program, with no X dependency.
# Useful when logged in over a serial line.
# Copyright 2013 by Akkana Peck -- share and enjoy under the GPL v2 or later.
import os, sys
import fcntl
import posix
import struct
import time
import re
import termios
import select
tty = open('/dev/tty', 'r+')
tty.write('\033[7\033[r\033[999;999H\033[6n')
tty.flush()
fd = sys.stdin.fileno()
oldterm = termios.tcgetattr(fd)
newattr = oldterm[:]
newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO termios.tcsetattr(fd, termios.TCSANOW, newattr)
oldflags = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, oldflags | os.O_NONBLOCK)
try:
while True:
r, w, e = select.select([fd], [], [])
if r:
output = sys.stdin.read()
break
finally:
termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm)
fcntl.fcntl(fd, fcntl.F_SETFL, oldflags)
rows, cols = map(int, re.findall(r'\d+', output))
fcntl.ioctl(fd, termios.TIOCSWINSZ,
struct.pack("HHHH", rows, cols, 0, 0))
print "\nReset the terminal to", rows, "rows", cols, "cols"
That tunnelconnect wrapper is like 500 lines of code...so yeah i am not
sure how to get around connecting to a machine without using it.
why I didnt contact the developers and instead came here. Once you
helped me realize it was a python code issue, I contacted them and
they fixed it.
Here is a shell implementation of resize:
http://www.kylheku.com/cgit/unix-cruft/tree/resize
On Thursday, 28 March 2019 at 4:32:47 pm UTC+10:30, Kaz Kylheku wrote:
Here is a shell implementation of resize:
http://www.kylheku.com/cgit/unix-cruft/tree/resize
Unfortunately, the domain for kylheku.com has expired and the Internet Archive has never archived the domain. Maybe someone can host this
elsewhere?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 24:05:56 |
Calls: | 6,646 |
Calls today: | 1 |
Files: | 12,193 |
Messages: | 5,327,713 |