Comments (9)
The notion of a "session" not defined by the lifetime of the compositor itself seems like a nebulous concept. This works for X11 window managers because the session is defined by the lifetime of the X server, and the window manager will die automatically when its server terminates.
An argument could be made that, when launching labwc with a single client (as in your qterminal
example), the compositor should die when the client dies. That's certainly how cage behaves. However, cage is generally built on a "single instance" interaction model, while labwc is designed around simultaneous interactions with many clients and even provides a means to start more that aren't children of the "key" client. Nominating one as special because it was started at launch would be a bit kludgey and would probably feel unintuitive.
Defining an external "session" concept and making labwc tie its fate to that session seems like it would make labwc particularly opinionated in undesirable ways. Unless there's a Wayland protocol for sending session events that we can implement, this starts to wade into the same kind of territory occupied by things like nonstandard IPC; this project expressly avoids that realm.
My view is that this is beyond the scope of labwc. LXQt should implement a helper, launchable via the autostart script, that can monitor whatever defines a session and send SIGTERM to $LABWC_PID
at the appropriate time.
from labwc.
I had a quick look at kwin
, but don't follow the logic. Could you help us understand the mechanism you're trying to achieve.
Let me describe how I understand it, so that you can educate me and help the jigsaw pieces fall into place.
If we take the simplest case (according to my understanding) a session is a script that sets up an environment and then launches labwc
(sometimes using exec so that it is not a separate PID). So if the session closes, in my mind labwc
goes with it.
Could you describe what starts what - and then how you wish it to close.
from labwc.
Under X11 startlxqt
is a script that sets mainly env vars and launches lxqt-session
which isn't a script.
Under wayland I'm using a similar script _startlxqtlabwc_
which at the end starts labwc -s lxqt-session
.
So we have 2 "sessions": labwc and lxqt in some way. LXQt sends sigterms to all open apps and exits and you end up at the labwc root window and it would be nice to exit also there without action.
We have found no way to exit labwc or another compositor by a detached script or similar from inside lxqt-session, only my fork of wlogout works, otherwise you need always twice to logout, first lxqt, then exit labwc. That is basically the same with all my start scripts, except kwin which has this option mentioned. I've no idea how it works there but I think it was needed for the plasma-wayland session for the same reason.
The name --exit-with-session
is not quite appropriate because it can be any GUI application -once closed kwin exits.
I tested shortly without success a loop script in /labwc/autostart
#!/bin/bash
while true; do
if pgrep -f "lxqt-session" >/dev/null; then
else
labwc --exit
fi
sleep 4
done
but it looks like it won't be killed if labwc exits and at next login there are 2 processes, have to test more.
from labwc.
I see. So labwc
starts lxqt-session
. I didn't realize that.
I just want to try to understand a bit more about it:
- On X, does
openbox
startlxqt-session
also? - I assume there is a good reason - but out of curiosity what is the logic behind not using
lxqt-session
startlabwc
? - Don't worry if you don't know, but any idea what projects like Xfce and Raspbian do?
I don't know enough about this topic to offer much of an opinion, but if it provides a neat solution for Desktop Environments then let's do it. Making this work with projects such as LXQt, Xfce, Raspbian is quite important to us (as long as it doesn't paint us into corner or mortgages technical debt - which I can't see this doing).
Would the cage
approach work? https://github.com/cage-kiosk/cage/blob/e7d8780f46277af87881e0be91cb2092541bb1d5/cage.c#L103-L143
I can draft a PR based on the cage approach to test/evaluate/etc if helpful.
from labwc.
I assume lxqt-session
is an X11 and Wayland client. This works in X11 because xinit
starts the server and keeps it alive as long as lxqt-session
runs. Either lxqt-session
starts Openbox, or Openbox can be launched independently first. (I doubt Openbox can launch the session client.)
This doesn't work with Wayland because the compositor needs to be up before the client can function. So the alternatives are:
- Rework
lxqt-session
as a two-part application, where one process starts and manages labwc and then makes sure that a client also launches after that (by some means); the supervisor and client can communicate by some mechanism, so that the supervisor can kill labwc when the client dies. - Allow labwc to launch a "preferred" client that will cause labwc to die when the client dies.
I think an approach like cage would work, and is probably the only reasonable (and most general) way for labwc to accommodate this.
from labwc.
- On X, does
openbox
startlxqt-session
also?
The other way round: in "Session Settings" a WM is set, which can be any, and lxqt-session
starts it.
- I assume there is a good reason - but out of curiosity what is the logic behind not using
lxqt-session
startlabwc
?
Being a Qt application it can't.
- Don't worry if you don't know, but any idea what projects like Xfce and Raspbian do?
No idea, raspian uses wayfire afaik and didn't check out how xfce's wayland session works.
The point is about closing gently all opened applications, which is done be lxqt-leave
. If an application is launched by a shortcut in rx.xml
it get's killed, and things like "last opened files" and or settings changed at closing will be lost. I didn't investigate if sway exit
or hyprctl dispatch exit
do that.
- Allow labwc to launch a "preferred" client that will cause labwc to die when the client dies.
I think an approach like cage would work, and is probably the only reasonable (and most general) way for labwc to accommodate this.
Sorry for my ignorance: what is cage (it's hard to search for I guess)?
from labwc.
If an application is launched by a shortcut in rx.xml it get's killed, and things like "last opened files" and or settings changed at closing will be lost. I didn't investigate if sway exit or hyprctl dispatch exit do that.
Labwc doesn't actually kill any applications on exit (nor does it even track them in any way). They kill themselves when the loose their wayland connection though. That might also happen indirectly via libwayland, not sure about that right now.
what is cage (it's hard to search for I guess)?
Another wlroots based wayland compositor, the main idea is to only run a single fullscreen application.
from labwc.
Another wlroots based wayland compositor that only supports a single fullscreen application.
Thanks.
from labwc.
Implemented via
from labwc.
Related Issues (20)
- Extra indicators for the window state HOT 3
- Add resistance option for tiled windows HOT 3
- shadows of qt windows HOT 2
- Monitor configuration when in greeter HOT 6
- Controls in GTK2 applications (Tried in GIMP) don't work or if they work, just barely HOT 9
- Magnifier doesn't work with full-screen surfaces (direct scanout?) HOT 22
- Choose wlroots version when compiling HOT 9
- max_toggled button should fallback to max HOT 1
- 0.7.3: Tablet: Thunar always makes multi selection on left click HOT 2
- way to customize CapsLock behavior? HOT 2
- Stylus input doesn't rotate. HOT 8
- Doubled shortcuts depending on layout HOT 2
- chromium won't open fully maximized on launch HOT 29
- last version doesn't work HOT 1
- single-clicking on chromium's titlebar unmaximizes/untiles the window. HOT 1
- labwc is not detecting mouse clicks while the cursor is moving HOT 3
- Application menus open in incorrect location when portion of window overlaps multiple outputs HOT 7
- Xwayland doesn't work in fullscreen HOT 8
- Document the `format` attribute for custom window switcher format strings
- xdg-popup: un-constraining is incorrect with gedit (CSD clients with shadow) HOT 1
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 labwc.