If you want reuse N sessions from one laptop to other, according the case with:
Many Windows and Panes (with their respective layout)
And keeping for each Pane the current directory where is located
How is possible accomplish this goal?
I already did do a research in Google but it seems is not possible but perhaps you have an βapproachβ For example about Terminator I reuse some content of the hidden configuration file
You can save X sessions, within one laptop.
To transfer these to another laptop, the two laptops would need to share the one .Xsession file. or you would need to copy the file across to the other laptop.
I think it would require both laptops to have the same DE.
I know Xfce can session save both automatically and manually. Do not know about other DEβs
Sorry, I dont know anything about tmux sessions, but tmux runs under X so saving X sessions would save tmux sessions.
You might be able to share tmux sessions if you can identify the files where they are stored.
I have no problem with that. Is possible use ssh in peace.
But to accomplish your suggestion is mandatory save the session itself. Am I correct? I am going to research about that
I think it would require both laptops to have the same DE.
Well it is for Ubuntu, Fedora and Debian β¦ all working with GNome
Yes. I think you will have to identify the session file(s) and transfer them to the other computer.
In Xorg the session file is called .Xsession and it is in your home directory.
In tmux, I dont know the files, but there must be session files if it can save sessions.
tmux doesnβt really run under Xβ¦ e.g. I run tmux ALL the time e.g. on my FreeBSD NAS (which is not running X or any DE), and Linux (headless) SSH jumphosts (itβs vital sometimes - e.g. I need to know some long running job will continue to run if I lose my session - tmux is the best way I know how).
It can get confusing but - you can join an existing tmux session - i.e. multiple connections to the same tmux sessionβ¦
e.g. Iβm running tmux sesssion called βDLZβ on my FreeBSD (TrueNAS) systemβ¦
To connect to it - I ssh to my FreeBSD system βbaphometβ, from a Linux or MacOS terminal session and type βtmux a -t DLZβ : tmux is aware one of my terminal windows is a different aspect ratio/ size and reacts accordingly :
There are some terminals that know about tmux, but I donβt think Gnome Terminal or iTerm2 are specifically βtmux awareββ¦ I seem to remember something called βbyobuβ that was a graphical terminal app for Linux and also a tmux session managerβ¦ I donβt use it - tmux on its own is enoughβ¦
βtmuxβ is an alternative to the ancient βscreenβ utility - but its configuration and startup is less βobscureβ or βobtuseβ than βscreenββ¦
You can list running tmux sessions βtmux lsββ¦
@Manuel_Jordan β¦ maybe my X session saving idea was not appropriate.? Sorry if I misled you.
Anyway, tmux must have session files and you should be able to export them.
e.g. Iβm running tmux sesssion called βDLZβ on my FreeBSD (TrueNAS) systemβ¦
To connect to it - I ssh to my FreeBSD system βbaphometβ, from a Linux or MacOS terminal session and type βtmux a -t DLZ β : tmux is aware one of my terminal windows is a different aspect ratio/ size and reacts accordingly
Again the importance to work with SSH too
Thanks for the clarification. So you reuse the session created in your server through 2 ssh connections for your clients. Ok it is clear. To be honest I do that.
Let me do a reformulation of my situation in the following way: In your server you have one or many tmux sessions with windows and panes with their respective layouts as you wish β¦
Later you have detected a problem in your SSD and is mandatory reinstall all the OS in the new SSD β¦
How do you would reuse all the sessions (I mean windows and panes keeping the same layouts)?
It to avoid yourself to re-create all the structure (windows, panes + layouts) from the scratch
There are some terminals that know about tmux, but I donβt think Gnome Terminal or iTerm2 are specifically βtmux awareββ¦ I seem to remember something called βbyobuβ that was a graphical terminal app for Linux and also a tmux session managerβ¦ I donβt use it - tmux on its own is enoughβ¦
I am not sure if I am in the wrong channel but is possible re-attach to a session from any kind of terminal such as either Terminator or Kitty
βtmuxβ is an alternative to the ancient βscreenβ utility - but its configuration and startup is less βobscureβ or βobtuseβ than βscreenββ¦
Interesting. I did not know about βscreenβ
p.d: Is your first figure took from pop os? It has the same 3 circles and colors as macOS too
To all
For your consideration it because has windows and panes with custom layouts (it is on my βtodoβ list yet):
Nevi
β¦ maybe my X session saving idea was not appropriate.? Sorry if I misled you.
Anyway, tmux must have session files and you should be able to export them.
Do not worry. Perhaps for the mentioned βreformulationβ situation it would be the solution
Hmmm - I might start using that script again - Iβd forgotten I wrote it
Saves me some time - I usually start similar manually, i.e. βtmux new -s YOYOβ - then βCtrl+B+"β and then same again (i.e. 2 x βCtrl+B+"β)β¦ The above script does the samething automagically
Iβve got another script I use on FreeBSD (TrueNAS) - it checks if thereβs a session already - otherwise it starts it off βanewβ :
ββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β File: /home/x/bin/bapmux
ββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1 β #!/bin/bash
2 + β HOHO=$(uname -n)
3 β EXIST=`tmux ls |grep -c DLZ`
4 β if [ $EXIST -gt 0 ] ; then
5 β tmux a -t DLZ
6 β else
7 β tmux new -s DLZ
8 β fi
ββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
I should add that checking bit to my yoyo.bash scriptβ¦