From b22025d6bcf6c204f0254faa812f9b5058360707 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Sun, 21 Jan 2024 00:23:33 +0100 Subject: [PATCH] screen : remplacement par tmux --- README.md | 6 +++--- bin/qemush | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8c73099..fbf9d23 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ the same virtual machines - **Modularization**: `qemush` launching scripts are intended to be stackable to reuse common `qemu` parameters in all virtual machines needing them -- **Process supervision**: `qemush` uses `screen` to supervise processes -and keep track of them +- **Process supervision**: `qemush` uses `tmux` to supervise processes and +keep track of them - **Copy-on-write**: images are formatted using `qcow2` to use less space on disk @@ -48,7 +48,7 @@ need it - `bash` - the `qemush` interpreter - `coreutils` - used for basic OS operations - `sudo` - execute commands as `qemu` -- `screen` - for process supervision +- `tmux` - for process supervision - `source-highlight` - for syntax highlighting when displaying launching scripts - `pathof` - see [Installation instructions](#installation-instructions) diff --git a/bin/qemush b/bin/qemush index 546d450..93488a4 100755 --- a/bin/qemush +++ b/bin/qemush @@ -63,15 +63,20 @@ public_start() { QEMUSH_NAME="$1" shift - exec screen -S "$vm_name" "$vm_name" "$@" + exec tmux new-session \ + -s "$QEMUSH_NAME" \ + "$QEMUSH_NAME" \ + "$@" } public_watch() { - exec screen -dr "$1" + [ -n "$1" ] && set -- -t "$1" + + exec tmux attach "$@" } public_active() { - exec screen -ls + exec tmux list-sessions } public_ls() {