Skip to content

Allow -clean command line option with -app and -resource options #3828

Description

@rjwills28

We have a use case where we would want to launch a BOB screen in its own window from the terminal, e.g.

phoebus.sh -resource "file:/path/to/file/example.bob@target=window"

The only problem with this is that by default this will bring up the persisted Phoebus state, which might contain other open windows or screen editor tabs etc. At that point, the only way to ensure only the 'example.bob' screen appears is to make sure you close all the other windows/tabs before shutting phoebus down (not ideal!) or you first run with -clean:

phoebus.sh -clean
phoebus.sh -resource "file:/path/to/file/example.bob@target=window"

I feel like it would be much cleaner to be able to run something like:

phoebus.sh -clean -resource "file:/path/to/file/example.bob@target=window"

which is basically saying I want a clean start (no persisted state) and to open the following resource.

However the current design of Phoebus is such that -clean overrides any other option (e.g -resource xx, -app xx). Does anyone know the original reasoning behind this and whether we could change this behavior to something like that described above?

The desired behavior would be as such:

  • If Phoebus isn't open then clean (i.e. do not load previous state) and open the resource/app.
  • If Phoebus is already open, then the -clean is automatically ignored and the resource/app will just be opened as normal (and everything already open remains).

I am happy to put in a PR to make this change but wanted to get some feedback first to make sure I haven't missed anything about the behavior?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions