diff --git a/src/base/messaging/messenger.py b/src/base/messaging/messenger.py index f3a3bf7..be49d52 100644 --- a/src/base/messaging/messenger.py +++ b/src/base/messaging/messenger.py @@ -46,6 +46,7 @@ class Messenger(ClientXMPP): if self.receiver_resource: self.receiver += '/' + self.receiver_resource + self.port = self.configuration_manager.get('CONNECTION', 'port') self.logger.debug('XMPP Messager parameters were set') self.register_extensions() @@ -73,8 +74,7 @@ class Messenger(ClientXMPP): def connect_to_server(self): # Connect to the XMPP server and start processing XMPP stanzas. try: self['feature_mechanisms'].unencrypted_plain = True - - self.connect((self.hostname, 5222), use_tls=self.use_tls) + self.connect((self.hostname, self.port), use_tls=self.use_tls) self.process(block=False) self.logger.debug('Connection were established successfully') return True diff --git a/src/plugins/remote-access/setup-vnc-server.py b/src/plugins/remote-access/setup-vnc-server.py index db43d0b..efd066f 100644 --- a/src/plugins/remote-access/setup-vnc-server.py +++ b/src/plugins/remote-access/setup-vnc-server.py @@ -66,7 +66,7 @@ class SetupVnc(AbstractPlugin): display_number = self.Sessions.display(user_name) desktop_env = self.get_desktop_env() if desktop_env == "gnome": - self.get_username_display_gnome(user_name) + display_number = self.get_username_display_gnome(user_name) self.logger.info("Get display of {0} is {1}".format(user_name, display_number)) homedir = self.get_homedir(user_name) self.logger.info("Get home directory of {0} is {1}".format(user_name, homedir))