Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Tmux Support #98

Merged
merged 9 commits into from
Aug 11, 2020
Merged

Conversation

whatever4711
Copy link
Contributor


name: Feature implementation for tmux
about: One terminal multiplexer to rule them all ;)


Is your merge request related to a problem? Please describe.
Not a real problem. More like a frustration, if all terminals pop up and are hard to manage. In tmux all terminals are in their own window and can be navigated through

Describe the solution you propose
Added libtmux to the requirements and adjusted the implementation of Machine.py to create tmux windows for each machine and attach them to the tmux server session named Kathara. Added /usr/bin/tmux to the terminal selections in Settings.

Describe alternatives you've considered
I had a look at terminator and screen, but the Python library libtmux eased the implementation of the tmux multiplexer

Additional context
After selecting tmux as default terminal and a lab has been started with kathara lstart, you can access the session with tmux attach -t Kathara

tmux

@Skazza94 Skazza94 changed the base branch from master to minor_features August 11, 2020 10:30
@Skazza94 Skazza94 merged commit c8f8218 into KatharaFramework:minor_features Aug 11, 2020
@Skazza94
Copy link
Member

Hi @whatever4711,
I reviewed the code and done some changes.
First of all, I removed the vstart meta. I prefer that the -v option of connect is explicit.
Then, I refactored the TMUX class a little bit (and capable of handle multiple sessions with a dict). I removed the "session creation" of TMUX inside the ManagerProxy (that class only forward calls to the correct Manager). Now everything is done inside the connect of Machine. I also added the tmux support on macOS (it is also available there).

I merged the PR into a branch called minor_features that will be merged with the master on the next release.

Thanks for the PR! ❤️

@whatever4711 whatever4711 deleted the tmux branch August 13, 2020 08:29
@Skazza94
Copy link
Member

Hi @whatever4711,
just as a reminder the new version (3.0.1) contains this feature.

Thanks for you contribution!
Mariano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants