this post was submitted on 20 Jan 2024
21 points (95.7% liked)

Linux

48372 readers
1325 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

cross-posted from: https://discuss.tchncs.de/post/9585677

My dream: I want a way to arbitrarily close and later open groups of applications including their states such as open files, window arrangement, scrollback, even undo histories etc. So working on a specific project I can close everything neatly and return to it later.

In my research/experiments here is what I come up with, do you agree?:

  1. in the terminal-only environment this would be tmux or another multiplexer

  2. But when you start including GUI applications (which I must), then it is something else that doesn't exactly exist

  3. Applications store their current states in a variety of places and some of them don't really do restoring in any way so it would be hard to force.

  4. the best option for this is something like xpra where you can have multiple sessions. If you had a machine that stayed powered-on all the time it might be possible to create sessions, log in remotely and use them that way.

  5. Using xpra or similar the sessions are never really actually closed. You would only close the connection from the local machine. If the machine faces a power off then too bad. As far as I can se there is basically no way to accomplish this goal where power-offs are accommodated.

I have tried some remote-login options but they are too slow for normal use. I tend to have pretty low-end hardware running (because so far it works for most things) so maybe if I upgraded it would improve.

  1. is it plausible?
  2. how to estimate hardware/performance needs of host, client and LAN? anything else to consider?

I typically use manjaro + XFCE but would be willing to try something different to accomplish the goal. I only want to do this locally on LAN not remotely.

re XFCE session managerXFCE has session management but the majority of programs don't totally work with. Like maybe the application will re-open when the session is restored but no files will be open even if they were when session was saved. Or distribution through workspaces, window size etc will not be restored.

top 7 comments
sorted by: hot top controversial new old
[–] ouch 10 points 10 months ago (2 children)

Not worth the trouble. Options are either to run a permanent X session somewhere, or a VM with suspend to disk.

[–] [email protected] 4 points 10 months ago* (last edited 10 months ago)

Second that. VM suspension is but the only way to achieve this on a standard OS.

[–] [email protected] 1 points 10 months ago

I don't have much VM experience and I didn't think of them for this. I didn't know you can do suspend to disk. Does it work reliably? Would I be correct in guessing each "saved session" would be no greater in size than your available RAM?

Interface-wise would it be similar to a remote session where you open a window and it has a full second desktop inside it?

[–] Rustmilian 8 points 10 months ago* (last edited 10 months ago)

It's called Compositor Hand-offs, it's coming in the future and is Wayland only.
It's likely going to be in Plasma 6 release.
Restoring application state isn't the only thing it does either. It also allow for graceful crash recovery, true-full-poweroff hibernation and hot-swapping supported compositors.

[–] tla 5 points 10 months ago

Suspend to RAM / hibernate already does that?

[–] Genrawir 5 points 10 months ago

The only option I can think of would be to use a vm. Unless all your apps support restoring sessions, I don't think there's any mechanism to do so globally. Getting stuff to start automatically or as a group using a script is easy enough, but that's less than half your problem as you've described it.

[–] [email protected] 5 points 10 months ago

What you want sounds like you need something CRIU based where the whole processes are saved and restored. Not sure that is worth it though as it would be rather inflexible if you want the slightest changes in the application state.