Comments (8)
You're hitting on a piece of functionality that I'm not sure how to best handle. As you know, the idea of Cage (or any kiosk in general) is to limit user input and run only a single application at the same time.
The idea was that Cage would start a "primary client" (for lack of a better name), whose window it would maximize and whose dialogs it would manage. That would be it; any other toplevel windows would be ignored because they would represent other applications, indicating that the user has "broken out" of the kiosk[1]. Imagine, for example, a kiosk at a public location with a questionnaire. If you would be able to open the settings or a browser, you've broken out of the system. I can also imagine, however, use cases where the application would temporarily launch a new window that would not be a dialog.
Clearly, Cage in its current form falls in the middle of these two approaches and does not deal well with either. As you've found out, it is allowed to open new toplevel windows and they are managed properly. However, as you've also found out, as soon as a toplevel window is closed, Cage exits[2].
So ideally, we'd decide on one of these approaches and commit to that choice. Personally, I'm leaning towards the case where we would manage new toplevel windows in the way that you expect them to. That is: any new toplevel window takes over the Cage display, hiding any previous toplevels until it is closed. Only when the last toplevel is closed, does Cage exit as well. I think this is the way to go because not only does it seem to be the easy way forward, it also supports more use cases. And, locking the system down to prevent the user from doing unwanted things is as much the administrator's problem as it is Cage's. Cage cannot (realistically) do everything.
I'd appreciate any viewpoints or opinions, from anyone reading this issue.
[1] To be honest, I don't know if a compositor can ignore new surfaces and prevent them from spawning at all, since Cage is only involved once its surface handlers are called from wlroots. It could probably close them immediately, though.
[2] It shouldn't segfault though. When I run cage termite
and from termite launch another instance of termite which I close, Cage exits cleanly.
from cage.
The use-case I have in mind for Cage is to implement a desktop experience which is comparible to plan9's rio.
from cage.
The use-case I have in mind when I started to loosely follow cage is the following:
We have a box running Linux running a single application - the UI of the application is a huge bunch of react code running on top of chromium.
We want in some situations to launch another application that as long as it runs should take full control of display and input. All input is touch. When this application exits the former application should get focus again and take over input again.
This looks like a good match for the use case described.
Note:
Today we are running the application op top of QtWebEngine (which is Chromium based).
I really do not know what would be required to make this run in another environment - I would love to have Chromium running of top of wayland but being a bit ignorant I do not know if this is what I get if I run Chromium in a cage.
In other words - I am not really sure if Cage will help me here or I am just adding some extra layer to something that is not providing me anything extra.
from cage.
Seems like the both of you prefer the same approach as I do. I'll work towards making this happen.
The use-case I have in mind for Cage is to implement a desktop experience which is comparible to plan9's rio.
Just to be sure, you're referring to the feature where the spawned application "re-uses" the window of the terminal it was spawned from? I'm not entirely sure, but isn't Wayland's fullscreen-shell possibly a better approach here? Although I think that really only manages a single application, so you might not be able to spawn something to "replace" the terminal...
I would love to have Chromium running of top of wayland but being a bit ignorant I do not know if this is what I get if I run Chromium in a cage.
When you run Chromium in Cage, you run Chromium in Wayland. However, at the moment Chromium does not run inside Cage (#19), so we'll need to get that fixed first.
from cage.
Just to be sure, you're referring to the feature where the spawned application "re-uses" the window of the terminal it was spawned from?
Right. I want to open a cage session for each client application.
I'm not entirely sure, but isn't Wayland's fullscreen-shell possibly a better approach here?
I think the odds of getting a substantial subset of end-user applications to support fullscreen-shell is almost nil. Also, won't work for Xwayland. I think this is the better approach.
from cage.
I have some work ready in #26. I'd appreciate if you could take this for a spin and see if it works the way you expect it to.
from cage.
Yep, works great!
from cage.
Great! Curious to see what you come up with, keep me updated :)
from cage.
Related Issues (20)
- Crash on drag HOT 3
- feature: ability to change keyboard layout while running HOT 4
- Firefox/chrome kiosk allows restricted keyboard shortcuts HOT 4
- cage crashes with -r rotate the output 90 degrees clockwise HOT 6
- Failed to enable unit: Cannot alias [email protected] as display-manager.service HOT 6
- Does Cage not work with Tauri apps? HOT 3
- Matching touch input to rotated screen - how to find my output device name HOT 2
- DRM panel orientation not taken into account HOT 3
- Screen sharing via apps like TeamViewer and AnyDesk, is unattended mode possible in Wayland? HOT 4
- Support wlr-layer-shell as a Backend HOT 1
- Build Fails on wlroots 0.17.2-1 HOT 6
- Cage doesn't seem to auto-activate the client until the first input HOT 5
- Persisting Data HOT 3
- Unable to create wlroots backend HOT 6
- Add an IRC channel for communication
- Cannot launch in X11 session HOT 5
- XDG_RUNTIME_DIR is not set in the environment HOT 6
- Release new version HOT 2
- [QUESTION] Running a second app? HOT 2
- Segfault on SIGTERM leaving the display hanging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cage.