Comments (4)
thanks for resurrect/continuum, the are really needed functionality for tmux
Thanks, I'm glad you find them useful.
Is there a way to do this per user?
I'm not sure, there might be a way. Frankly, I don't need this feature and I'm not the right candidate to implement it.
Let's see if other users would find this useful (please upvote with 👍). If yea then we'd be looking for someone to implement this.
Just a note: when initially working on the feature of preventing 2 (or more) tmux servers doing autosave it was hard-ish to make it work properly. Adding process ownership to the mix could make this even more complicated.
from tmux-continuum.
Hi,
We are also using one central access server for several users, where anyone can run tmux, so it was a problem also for us. This can be fixed with a simple and safe change.
Edit .tmux/plugins/tmux-continuum/scripts/helpers.sh scroll to all_tmux_processes function and change it contents from:
all_tmux_processes() {
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
ps -Ao "command pid" |
\grep "^tmux" |
\grep -v "^tmux source"
}
to:
all_tmux_processes() {
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
ps -Ao "command user pid" |
\grep `whoami` |
\grep "^tmux" |
\grep -v "^tmux source"
}
This function is used for searching if another tmux instance is running. By default it searches all processess and filters them only to tmux, so it catches all tmux instances started on machine. I have extended filter to match only tmux started by current user. This change is safe because each user has it's own save directory (default $HOME/.tmux/resurrect) and still only first tmux started by a user will save it's contents to this directory.
Feel free to create a pull request and merge this change to tmux-continuum code.
Globally allowing tmux-continuum to save multiple tmux instnaces is much more complicated because this will need multiple tmux-resurrect save directiories (one per tmux instnace), and some logic in tmux-continuum to choose right directory. I also agree with argument that normally running (and saving) multiple tmux instances is not required.
Best regards
Szymon
from tmux-continuum.
Hi @szimonek thanks for the patch, I think it will do the work!
I applied it locally and will test it today. If all is good I'll push it by tomorrow.
from tmux-continuum.
Implemented via 1531b37
Sorry for the 3 year wait
from tmux-continuum.
Related Issues (20)
- Issue while starting via shell configuration in Alacritty
- add option for working on multiple tmux server
- macOS Ventura: "Background Item Added" notification on each boot HOT 6
- Autostart session with a specific name?
- Customise status with time remaining HOT 4
- Systemd user service disabled even if not managed by continuum
- Restore to named session if name provided
- Programs are not restarting
- High CPU usage on MacOS after long sleep/hibernate time HOT 2
- Hardcoded DISPLAY Variable Issues
- XAUTHORITY environment variable is not set when using automatic tmux start with systemd HOT 2
- How to restore multiple tmux sessions independently and simultaneously
- Disable auto save before manual save session
- Warp terminal automatic startup script
- Auto-save on exit
- Save file is not created after timeout HOT 3
- Wezterm automatic startup script
- tmux-continuum doesn't work when .tmux.conf is a symbolic link in WSL 2 HOT 3
- tmux unresponsive for 15 - 30 seconds, during continuum saves
- @continuum-boot 'on' causes @continuum-restore 'on' to restore only one session
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 tmux-continuum.