tiiuae / ghaf

TII SSRC Secure Technologies: Ghaf Framework
https://tiiuae.github.io/ghaf/
Apache License 2.0
35 stars 56 forks source link

graphics: add ghaf-open command to launch applications #697

Closed humaidq-tii closed 1 month ago

humaidq-tii commented 1 month ago

This allows the user/tester to view and launch applications from the terminal, locally or remotely. It will also show the output of the launched application.

This works with applications inside or outside app VMs.

Description of changes

Checklist for things done

Testing

This can be used in ci-automations, the command will exit code 1 if application name is not available on the system.

barnabakos commented 1 month ago

2 commits up to: 7af1b39225894307752560638d9c82aebf097318 rebased to current tip of Ghaf main without conflicts: 9d1a8faa23b11d9cc2ef15da01d9e6d2938fcb07

platforms: Lenovo X1 Carbon & NVIDIA Jetson AGX Orin; cross-compile; flash script

works:

notes:

issues on Lenovo X1 Carbon:

humaidq-tii commented 1 month ago
  • running "ghaf-open" without arguments have exit code 1 possibly it should not be handled as an error

application is a mandatory argument, and typically if a mandatory argument is not provided it should exit with error. I have added a -l option to list applications that does not have exit code 1. It only lists available applications, so it should also be easier to be used as part of a script/automation.

issues on Lenovo X1 Carbon:

  • first start & close of the "VPN" app doesn't exit the ghaf-open command; same after every boot

This is behaviour of the VPN app, the first run seems to execute gpclient. This behaviour may change with #695 as gpclient will be setup as a separate service. We can consider this not a bug in this ghaf-open, as it simply runs the launcher entry.