fortrace.utility.desktop_environments.Linux package

Submodules

fortrace.utility.desktop_environments.Linux.gnome module

class fortrace.utility.desktop_environments.Linux.gnome.GNOME(qemu_monitor_session: QEMUMonitorSession)[source]

Bases: DesktopEnvironment

Explicit class to interact with GNOME desktop environments.

focus_application(application: GenericApplication)[source]

Bring the given application into focus so that it can receive input commands.

Parameters:

application – application object to focus

Returns:

login(username: str, password: str)[source]

Perform a login for the given user.

Parameters:
  • username – name of the user to login

  • password – password of the given user or None if there is none

Note

This call blocks until the desktop environment is ready to receive input.

open_application(application_type: ApplicationType, application_name: str, **kwargs) GenericApplication[source]

Open and focus a new application on the GUI with the possibility to pass down further arguments.

Parameters:
  • application_type – type of application (needed for application factory)

  • application_name – the name of the application to open (capitalization matters!)

  • *args – pass further arguments to the opening process, if necessary

Returns:

an application object for further interaction

run_a_command(command: str)[source]

Opens GNOME’s ‘Run a Command’ dialogue and enters the provided command.

Notes

Please do not use this method to open applications, as the dialogue is unreliable with names

Parameters:

command – command to be entered

system_power_down()[source]

Power down the system via GUI functionality.

Send a power-down request via QEMU to the guest (domain is not available and qemu controls direct key inputs), and confirms the power-down message. This is by far the most graceful and fastest way to shut down a domain.

Notes

Works in lock screen as well.

fortrace.utility.desktop_environments.Linux.kde_plasma module

class fortrace.utility.desktop_environments.Linux.kde_plasma.Plasma(qemu_monitor_session: QEMUMonitorSession)[source]

Bases: DesktopEnvironment

Implementation of KDE Plasma desktop environment

command_krunner(command: str)[source]

Send a command to KRunner.

Parameters:

command – the command to send

Notes

This method does only send a command to KRunner and does not take care of newly opened windows or other focus shifts that might happen.

focus_application(application: GenericApplication)[source]

Bring the given application into focus so that it can receive input commands.

Parameters:

application – application object to focus

Returns:

login(username: str, password: str | None)[source]

Perform a login for the given user.

Parameters:
  • username – name of the user to login

  • password – password of the given user or None if there is none

Note

This call blocks until the desktop environment is ready to receive input.

open_application(application_type: ApplicationType, application_name: str, **kwargs) GenericApplication[source]

Opens a specified application with Plasma’s Application Launcher.

Parameters:
  • application_type

  • application_name

  • **kwargs

Returns:

Module contents