Giter Club home page Giter Club logo

Comments (15)

dylan-chong avatar dylan-chong commented on August 17, 2024 9

I find this annoying too. I think there should be an option to remove the session that appears when tmux is started up

from tmux-continuum.

ioogithub avatar ioogithub commented on August 17, 2024 1

What is the current status of this bug?

I am a new user to tmux and tmux-continuum so I am confused at what I was seeing. I expected that I this plugin will being me back to my saved session when I had the following settings:

set -g @continuum-boot 'on'
set -g @continuum-restore 'on'

Instead I always got a new session with a new higher session number that I have to manually get rid of. This actually creates more work than not using the feature at all.

Is this the expected behavior or is this still the bug. From a (confused) new user perspective I wanted the plugin to restore my last saved session. When I launch tmux I wanted it to bring me back to this session. When I started the computer I wanted tmux to return me to the last saved session but it doesn't do this at all.
This bug report was opened almost 3 years ago... is this feature still currently broken? Are there any easy work arounds?

from tmux-continuum.

AdrienLemaire avatar AdrienLemaire commented on August 17, 2024

As a temporary hack, I added tmux kill-session -t 0 before the main() stop_spinner call in .tmux/plugins/tmux-resurrect/scripts/restore.sh:369, since all my sessions are named and the unwanted one is always called 0

from tmux-continuum.

aguytech avatar aguytech commented on August 17, 2024

Hi,
Here is a possible solution to this issue : pull-request #83

The problem to clean this added session at each restart is that when you are in the process of daemon creation (calling tmux-continuum), you can't kill session.
So i had to externalize the call of tmux daemon in the script to have possibility to kill session after the daemon is started.

from tmux-continuum.

dylan-chong avatar dylan-chong commented on August 17, 2024

For some reason a new window is no longer created for me now

from tmux-continuum.

aguytech avatar aguytech commented on August 17, 2024

@dylan-chong Which OS and tmux version do you use ?

from tmux-continuum.

aguytech avatar aguytech commented on August 17, 2024

For me:
I tried few days ago with a fresh install of tmux-resurrect & tmux-continuum from github
my tmux version are 3.1_c-1
Os: manjaro

Here is my problem:

$ tmux ls
0: 1 windows (created Sun Nov 29 01:04:07 2020)
$ systemctl restart --user tmux.service
$ systemctl restart --user tmux.service
$ systemctl restart --user tmux.service
$ tmux ls
0: 1 windows (created Sun Nov 29 01:14:50 2020)
1: 1 windows (created Sun Nov 29 01:14:50 2020)
2: 1 windows (created Sun Nov 29 01:14:50 2020)
3: 1 windows (created Sun Nov 29 01:14:51 2020)

Something seems to be wrong?

Here is my file .tmux.conf without binds:

# prefix key
set-option -g prefix C-q
# time allowed to repeat key following prefix key
set-option -g repeat-time 500
# set history to 5000
set-option -g history-limit 5000

# tmux-continuum
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'

####  plugins

# resurect plugin
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux

from tmux-continuum.

dylan-chong avatar dylan-chong commented on August 17, 2024

@dylan-chong Which OS and tmux version do you use ?

> tmux -V
tmux 3.1c

Mac os 10.14.6

My tmux conf is here dylan-chong/dotfiles@0c9a484

from tmux-continuum.

aguytech avatar aguytech commented on August 17, 2024

Mac os 10.14.6

Ok the problem seems to come from systemd (linux)

from tmux-continuum.

dylan-chong avatar dylan-chong commented on August 17, 2024

Nevermind. the problem is back for me :(
I swear it was fine in the last few weeks

from tmux-continuum.

austinbutler avatar austinbutler commented on August 17, 2024

Yeah this happens for me on MacOS.

from tmux-continuum.

bruno- avatar bruno- commented on August 17, 2024

Hey guys,
the original problem with session 0 being always present is solved via tmux-plugins/tmux-resurrect@5f5f9d8

About the new problem "session with an increasing session number appears after restart":

  • I confirm we have a bug.
  • I suspect that's a bug in tmux-resurrect, not tmux-continuum (but we can continue the discussion here).
  • I tried reproducing this yesterday, but I was unable to. I'm running tmux next-3.3.
  • Having detailed reproduction steps would be useful at this point. Please ensure you have latest tmux-resurrect and tmux-continuum installed. Please also try with latest tmux version.

from tmux-continuum.

UbiquitousPhoton avatar UbiquitousPhoton commented on August 17, 2024

There is one easy workaround: set @continuum-systemd-start-cmd = 'start-server'

It defaults to new-session -d, which creates the new session each time, then restores the others. I am not entirely sure why.

Note that setting this variable is not enough, you need to force regeneration of your systemd unit file - so either delete ~/.config/systemd/user/tmux.service and the script should recreate it, or just hand edit the aforementioned file manually.

from tmux-continuum.

ioogithub avatar ioogithub commented on August 17, 2024

There is one easy workaround: set @continuum-systemd-start-cmd = 'start-server'

What does between the " " is this where you place the command you want to start or is this command complete as it is? I tried this but it did not work. When I enable this command and reload tmux I still get the default. I saw the documentation mentioned this as well but I have tried several different attempts and never got it working.

from tmux-continuum.

ioogithub avatar ioogithub commented on August 17, 2024

the original problem with session 0 being always present is solved via tmux-plugins/tmux-resurrect@5f5f9d8

Has anyone else confirmed this change is working? I am running tmux 3.2a and tmux-restore version 4.0 (as per the CHANGELOG.mg file in my ~.tmux/plugins/tmux-resurrect/ folder) but I get a new 0 session after every restore. I have tested this extensively tonight.

I believe this 0 session is also causing other issues with restoring.

Example after a restore:

user@server:~$ tmux list-session
0: 1 windows (created Sun Aug 28 22:27:48 2022)
test: 7 windows (created Sun Aug 28 22:27:46 2022) (attached)

from tmux-continuum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.