183 def launch_lomiri(self, mode="full-greeter", *args):
184 """
185 Launch the lomiri shell, return a proxy object for it.
186
187 :param str mode: The type of greeter/shell mode to use
188 :param args: A list of aguments to pass to lomiri
189
190 """
191 binary_path = get_binary_path()
192 lib_path = get_lib_path()
193
194 logger.info(
195 "Lib path is '%s', binary path is '%s'",
196 lib_path,
197 binary_path
198 )
199
200 self.patch_lightdm_mock()
201
202 if self._qml_mock_enabled:
203 self._environment['QML2_IMPORT_PATH'] = (
204 get_qml_import_path_with_mock()
205 )
206
207 if self._data_dirs_mock_enabled:
208 self._patch_data_dirs()
209
210 lomiri_cli_args_list = ["--mode={}".format(mode)]
211 if len(args) != 0:
212 lomiri_cli_args_list += args
213
214 app_proxy = self._launch_lomiri_with_upstart(
215 binary_path,
216 self.lomiri_geometry_args + lomiri_cli_args_list
217 )
218
219 self._set_proxy(app_proxy)
220
221
222 logger.debug("Lomiri started, waiting for it to be ready.")
223 self.wait_for_lomiri()
224 logger.debug("Lomiri loaded and ready.")
225
226 if model() == 'Desktop':
227
228
229 process_helpers.stop_job('lomiri-dash')
230
231 return app_proxy
232