Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rmview/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _initialize(self):
# ideally we would want to always load the system ones
# and have the local keys have precedence, but paramiko gives
# always precedence to system keys
# There is extremly slow in system with many known host entries... :/
# There is extremely slow in system with many known host entries... :/
# See https://github.com/paramiko/paramiko/issues/191
self.client.load_system_host_keys()
log.info("System default known host file loaded")
Expand Down
19 changes: 9 additions & 10 deletions src/rmview/rfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def _handleSecurityTypes(self, block):
else:
self.expect(self._handleVNCAuthResult, 4)
elif sec_type == RM_AUTH:
self.expect(self._handleRMAuth, 4)
self.expect(self._handleRMAuth, 4)
else:
self.expect(self._handleVNCAuth, 16)
else:
Expand Down Expand Up @@ -394,7 +394,7 @@ def _handleRectangle(self, block):
elif encoding == PSEUDO_CURSOR_ENCODING:
length = width * height * self.bypp
length += int(math.floor((width + 7.0) / 8)) * height
self.expect(self._handleDecodePsuedoCursor, length, x, y, width, height)
self.expect(self._handleDecodePseudoCursor, length, x, y, width, height)
elif encoding == PSEUDO_DESKTOP_SIZE_ENCODING:
self._handleDecodeDesktopSize(width, height)
else:
Expand Down Expand Up @@ -469,7 +469,7 @@ def _doNextHextileSubrect(self, bg, color, x, y, width, height, tx, ty):
#~ print "_doNextHextileSubrect %r" % ((color, x, y, width, height, tx, ty), )
#coords of next tile
#its line after line of tiles
#finished when the last line is completly received
#finished when the last line is completely received

#dont inc the first time
if tx is not None:
Expand Down Expand Up @@ -688,7 +688,7 @@ def do_rle(pixel):
self._doConnection()

# --- Pseudo Cursor Encoding
def _handleDecodePsuedoCursor(self, block, x, y, width, height):
def _handleDecodePseudoCursor(self, block, x, y, width, height):
split = width * height * self.bypp
image = block[:split]
mask = block[split:]
Expand Down Expand Up @@ -748,7 +748,7 @@ def expect(self, handler, size, *args, **kwargs):
def setPixelFormat(self, bpp=32, depth=24, bigendian=0, truecolor=1, redmax=255, greenmax=255, bluemax=255, redshift=0, greenshift=8, blueshift=16):
pixformat = pack("!BBBBHHHBBBxxx", bpp, depth, bigendian, truecolor, redmax, greenmax, bluemax, redshift, greenshift, blueshift)
self.transport.write(pack("!Bxxx16s", 0, pixformat))
#rember these settings
#remember these settings
self.bpp, self.depth, self.bigendian, self.truecolor = bpp, depth, bigendian, truecolor
self.redmax, self.greenmax, self.bluemax = redmax, greenmax, bluemax
self.redshift, self.greenshift, self.blueshift = redshift, greenshift, blueshift
Expand Down Expand Up @@ -789,7 +789,7 @@ def clientCutText(self, message):
#------------------------------------------------------
def vncConnectionMade(self):
"""connection is initialized and ready.
typicaly, the pixel format is set here."""
typically, the pixel format is set here."""

def vncRequestPassword(self):
"""a password is needed to log on, use sendPassword() to
Expand All @@ -812,7 +812,7 @@ def beginUpdate(self):
def commitUpdate(self, rectangles=None):
"""called after a series of updateRectangle(), copyRectangle()
or fillRectangle() are finished.
typicaly, here is the place to request the next screen
typically, here is the place to request the next screen
update with FramebufferUpdateRequest(incremental=1).
argument is a list of tuples (x,y,w,h) with the updated
rectangles."""
Expand Down Expand Up @@ -848,16 +848,15 @@ def copy_text(self, text):

def getRMChallenge(self):
raise Exception("should be implemented in the subclass")


class RFBFactory(protocol.ClientFactory):
"""A factory for remote frame buffer connections."""

# the class of the protocol to build
# should be overriden by application to use a derrived class
# should be overridden by application to use a derived class
protocol = RFBClient

def __init__(self, password = None, shared = 1):
self.password = password
self.shared = shared

4 changes: 2 additions & 2 deletions src/rmview/rmview.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def __init__(self, args):
self.viewer.setWindowTitle("rMview")
self.viewer.show()

# Display connecting image until we successfuly connect
# Display connecting image until we successfully connect
self.viewer.setImage(QImage(':/assets/connecting.png'))

self.orient = 0
Expand Down Expand Up @@ -593,7 +593,7 @@ def rmViewMain():
log.info("STARTING: %s", time.asctime())
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app = rMViewApp(sys.argv)
# We register custom signal handler so we can gracefuly stop app with CTRL+C when QT main loop is
# We register custom signal handler so we can gracefully stop app with CTRL+C when QT main loop is
# running
signal.signal(signal.SIGINT, lambda *args: app.quit())
ecode = app.exec_()
Expand Down