Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supress welcome tab - clean option with resource #2159

Closed
mgotz opened this issue Mar 7, 2022 · 7 comments
Closed

Supress welcome tab - clean option with resource #2159

mgotz opened this issue Mar 7, 2022 · 7 comments

Comments

@mgotz
Copy link
Contributor

mgotz commented Mar 7, 2022

I would like to pass a resource to phoebus and open just that. Not the welcome tab, not whatever was in the memento.
If I pass an empty layout (to override the memento) and a resource, I still get the welcome tab.
The -clean option, in addtion to ignoring the memento and supressing the welcome tab, also ignores any resources.
Is there a workaround I haven't found yet?

To me the -clean option would be much more useful, if it would not ignore resources, apps etc. Afterall, I am in direct control of what I pass on the command line. So, if don't want it to open a resource I don't pass it.
I am happy to make a PR, but since this behavior is explicitly described, I assume there is some reason behind it.

@georgweiss
Copy link
Collaborator

My users pointed out that in some cases startup could take a very long time if the application was shut down with a large number of OPIs open. Hence the -clean option was added to just start the application and nothing else.

One could argue that using -clean with -resource (or any other option) is a bit confusing. So I would maybe suggest that -nomemento would be a more fitting name for an option that only ignores the memento file.

@kasemir
Copy link
Collaborator

kasemir commented Mar 7, 2022

Instead of all these negative options like no memento, delete memento, no welcome, ... and then adding a -resource to open what you want, why not start that way with the already existing options?
If you want the app to start out in a predefined state, for example just with the top-level start display open, simply save that as a layout and load it with the -layout option.

@mgotz
Copy link
Contributor Author

mgotz commented Mar 7, 2022

One could argue that using -clean with -resource (or any other option) is a bit confusing. So I would maybe suggest that -nomemento would be a more fitting name for an option that only ignores the memento file.

Sure, phoebus.sh -clean -resource my_screen.opi might be a somewhat contradictory request. However, it would give the caller of the application the freedom to make such a request. My thinking was it might be better to tweak an existing option, than add another one. However, this obviously only works if the change doesn't impact people using the existing option. I would be happy with a -nomemento option.

If you want the app to start out in a predefined state, for example just with the top-level start display open, simply save that as a layout and load it with the -layout option.

Sorry, I may have created a bit of an x-y problem here. I'll explain what I want in the end:
This is more for collegues that create opi screen, then having one defined way the application comes up in the control room. Some of my users would really appreciate the option to open a file directly from the command line. Ideally with shell globs, like

phoebus *.opi

I can make that work by creating our own launcher. But launching the GUI application invariably brings back the Welcome tab. So saving a specific layout doesn't really work for me, because it will always be different. Unless Phoebus would identify an explicitly loaded empty layout as such and not add the welcome tab.

@kasemir
Copy link
Collaborator

kasemir commented Mar 7, 2022

In the interest of minimizing the need for new options, how about this:

  1. Create an empty layout which sets the size/location of the window but is otherwise empty
  2. Load that with -layout /path/to/empty.memento. The logic should be fixed such that the "Welcome" screen is suppressed when we loaded a layout, even if that's empty.
  3. Then add -resource /path/to/... to open what you need.

That's all already in place except for suppressing the Welcome for an empty layout. Doing that would be a change in behavior, but I think it'll be universally accepted.

@mgotz
Copy link
Contributor Author

mgotz commented Mar 7, 2022

That would work fine for me. I could also take a look at implementing it.

@kasemir
Copy link
Collaborator

kasemir commented Mar 29, 2022

Can this be closed?
The 'welcome' should now be suppressed when you load an empty layout.

@mgotz
Copy link
Contributor Author

mgotz commented Mar 30, 2022

Yes, closed with #2184

@mgotz mgotz closed this as completed Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants