tmux-resurrect icon indicating copy to clipboard operation
tmux-resurrect copied to clipboard

Persists tmux environment across system restarts.

Results 197 tmux-resurrect issues
Sort by recently updated
recently updated
newest added

$DISPLAY is wrong in resurrected session

[{"_id":"635259fcd297b621322f2fef","body":"Is that env variable updated while your session is running? Because as far as I know this plugin does not persist environment variables (though in my opinion it should).\r\n\r\nYou can try this plugin but you would have to probably bootstrap the variables back into the environment: https:\/\/github.com\/tmux-plugins\/tmux-resurrect\/issues\/312.","issue_id":1660661779913,"origin_id":621022517,"user_origin_id":109630,"create_time":1588143194,"update_time":1588143194,"id":1666341372651,"updated_at":"2022-10-21T08:36:12.650000Z","created_at":"2022-10-21T08:36:12.650000Z"},{"_id":"635259fcd297b621322f2ff1","body":"I am facing the same issue with DISPLAY variable. The variable is updated using the following statement in `.tmux.conf` file.\r\n\r\n`set-option -g update-environment 'DISPLAY'` ","issue_id":1660661779913,"origin_id":633206616,"user_origin_id":5926675,"create_time":1590314119,"update_time":1590314119,"id":1666341372655,"updated_at":"2022-10-21T08:36:12.655000Z","created_at":"2022-10-21T08:36:12.655000Z"},{"_id":"635259fcd297b621322f2ff2","body":"I also experienced a similar issue with the DISPLAY environment variable although the variable is not being updated as per my knowledge.\r\nThe DISPLAY variable is properly set when SSHed into the server. The environment variable is properly set when creating a new tmux session\/window\/pane.\r\nWhen the session is resurrected, the DISPLAY environment variable is empty in the resurrected windows\/panes.\r\nAlthough creating new windows\/panes in the resurrected session imports the correct value of the environment variable.","issue_id":1660661779913,"origin_id":658353936,"user_origin_id":24366479,"create_time":1594753002,"update_time":1594753713,"id":1666341372659,"updated_at":"2022-10-21T08:36:12.659000Z","created_at":"2022-10-21T08:36:12.659000Z"},{"_id":"635259fcd297b621322f2ff3","body":"Update:\r\n\r\nApparently, my problem was possibly related to an outdated version of tmux.\r\nI had tmux 1.9 running on a Debian Jessie server. Updating tmux to 2.3 resolved this issue for me.","issue_id":1660661779913,"origin_id":658829494,"user_origin_id":24366479,"create_time":1594826242,"update_time":1594826242,"id":1666341372663,"updated_at":"2022-10-21T08:36:12.662000Z","created_at":"2022-10-21T08:36:12.662000Z"},{"_id":"635259fcd297b621322f2ff4","body":"Issue is still happening. This is causing the resurrected vim's clipboard to not work and also making GUI applications fail\r\n\r\nI tried the following to no avail.\r\n```\r\nrun-shell 'DISPLAY=$(cat \/proc\/$(pgrep -u $USER \"^gnome-shell$\")\/environ | tr \"\\0\" \"\\n\" | grep ^DISPLAY= | cut -d \"=\" -f 2)'\r\n```\r\n\r\nI believe the problem actually lies in `tmux-continuum` and not `tmux-resurrect`. `tmux-continuum` starts the `tmux` server before Gnome (or any user GUI). There is no way to know what the correct `DISPLAY` variable should be. (This is also because `tmux` is made to work in non-GUI environments as well)\r\n\r\nIn the end, I just had to remove the line\r\n```\r\nset -g @continuum-boot 'on'\r\n```\r\nand the `DISPLAY` variable was set correctly","issue_id":1660661779913,"origin_id":812779601,"user_origin_id":7285669,"create_time":1617416865,"update_time":1627614402,"id":1666341372666,"updated_at":"2022-10-21T08:36:12.666000Z","created_at":"2022-10-21T08:36:12.666000Z"}] comment

Hi, I've tried both with and without DISPLAY in the update-environment option: > `set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"` Either way after rebooting my machine and...

Bug: Re-saving session restored by tmux-resurrect corrupts resurrect session file, and makes programs not launch

[{"_id":"63525a9d3056137e265896cc","body":"I followed the repro steps and I can't reproduce the bug.\r\nHowever, I do believe you're getting a bug, but it's probably due to something else in your (and other users') environment.\r\n\r\nI propose you try to figure it out. PR with a fix would be welcome!","issue_id":1660661779917,"origin_id":882383938,"user_origin_id":1042682,"create_time":1626685811,"update_time":1626685811,"id":1666341533729,"updated_at":"2022-10-21T08:38:53.728000Z","created_at":"2022-10-21T08:38:53.728000Z"},{"_id":"63525a9d3056137e265896cd","body":"@bruno- Are you setting any variable related to tmux-resurrect in tmux.conf file? I had just one, and commenting that also doesn't do anything different. \r\n\r\nPerhaps you have more elaborate settings related to tmux-resurrect? Can you give it a try by disabling them if thats true? Btw, the bug is not reproducible if the process is started in right pane instead of left.\r\n\r\n```\r\nset -g @resurrect-processes ' \\\r\n \"~nvim->nvim\" \\\r\n'\r\n```\r\n\r\n```\r\nSome system information:\r\nOS: macOS 11.4 BigSur\r\nArchitecture: ARM-64\r\nTerminal: iTerm2 or Alacritty\r\nShell zsh 5.8\r\nBash version: GNU bash, version 5.1.8(1)-release (aarch64-apple-darwin20.4.0)\r\n```\r\n\r\nAlso, can you post your entire tmux.conf file?\r\nIt would also help to understand the format of resurrect file. Like what's the line with -zsh (on line 2) (I guess that is the parent process).","issue_id":1660661779917,"origin_id":882424104,"user_origin_id":71736629,"create_time":1626689418,"update_time":1626736482,"id":1666341533732,"updated_at":"2022-10-21T08:38:53.732000Z","created_at":"2022-10-21T08:38:53.732000Z"},{"_id":"63525a9d3056137e265896ce","body":"@bruno- I debugged further, and this is what is happening:\r\n\r\nFirstly, I am using the default save strategy, \"ps\". I am not sure what save strategy you are using?\r\n\r\nThe problem seems to stem from the following statement in file https:\/\/github.com\/tmux-plugins\/tmux-resurrect\/blob\/master\/save_command_strategies\/ps.sh\r\n\r\n```bash\r\n\tps -ao \"ppid command\" |\r\n\t\tsed \"s\/^ *\/\/\" |\r\n\t\tgrep \"^${PANE_PID}\" |\r\n\t\tcut -d' ' -f2-\r\n```\r\n\r\nDuring first resurrect save it returns\r\n\r\n```bash\r\nhtop\r\n-zsh\r\n```\r\n\r\nAfter reloading resurrect session, and upon resurrect save again it returns:\r\n\r\n```bash\r\n-zsh\r\nhtop\r\n```\r\n\r\nThe order is reversed, any thoughts of what this means?","issue_id":1660661779917,"origin_id":882925901,"user_origin_id":71736629,"create_time":1626736954,"update_time":1626736988,"id":1666341533736,"updated_at":"2022-10-21T08:38:53.736000Z","created_at":"2022-10-21T08:38:53.736000Z"},{"_id":"63525a9d3056137e265896cf","body":"@bruno- I think I fixed it! Adding a final piped grep to the ``ps`` command ``grep -v -e \"^-.*\"`` resolves the problem. It removed lines for login shell ``-zsh``.\r\n\r\n```\r\n\tps -ao \"ppid command\" |\r\n\t\tsed \"s\/^ *\/\/\" |\r\n\t\tgrep \"^${PANE_PID}\" |\r\n\t\tcut -d' ' -f2- |\r\n\t\tgrep -v -e \"^-.*\"\r\n```\r\n\r\nNow every time the resurrect session file is saved like this:\r\n\r\n```\r\npane\t0\t1\t:zsh...\t1\t:*\t1\t:\/Users\/amanmehra\t1\thtop\t:htop\r\npane\t0\t1\t:zsh...\t1\t:*\t2\t:\/Users\/amanmehra\t0\tzsh\t:\r\nwindow\t0\t1\t1\t:*\tc920,300x76,0,0{150x76,0,0,1,149x76,151,0,2}\r\nstate\t0\r\n```\r\n\r\nPlease review, and let me know what you think. Then I will submit a PR.\r\n\r\n> Updated the command above from grep -v -e \"-.*\" to grep -v -e \"^-.*\". Can be further refined to just catch login processes like ``--zsh``, ``-bash``, etc.","issue_id":1660661779917,"origin_id":883042589,"user_origin_id":71736629,"create_time":1626755246,"update_time":1626843214,"id":1666341533739,"updated_at":"2022-10-21T08:38:53.739000Z","created_at":"2022-10-21T08:38:53.739000Z"}] comment

This one was difficult to debug, but it's simple to reproduce. Steps: 1. Kill tmux-server ``>>tmux kill-server``, and restart tmux ``>>tmux``. 2. Create a vertical split so there are two...

Wrong path when I open a new window/pane

[{"_id":"63525a5d8041c95dfb106597","body":"From looking at the source of restore.sh, it seems that, when tmux new-session is called (line 208), it is provided the arguments \"-c $pane_working_dir\", where the pane being used is the very first entry in the resurrect file. Not sure I'd consider that the best behaviour, though I'm sure that there are workflows that use this behaviour.\n\n(Surprisingly, I can't seem to find this default path anywhere in the output of tmux show-options \/ show-environment. This made it a bit annoying to track down.)","issue_id":1660661779922,"origin_id":882165655,"user_origin_id":27742,"create_time":1626659047,"update_time":1626659098,"id":1666341469127,"updated_at":"2022-10-21T08:37:49.126000Z","created_at":"2022-10-21T08:37:49.126000Z"}] comment

I use [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum) but I think that this might be resurrect related. Any new window/pane opens with an old path that I don't even use anymore. Is this somehow related...

As per the documentation from the documentation https://github.com/tmux-plugins/tmux-resurrect/blob/abbc4fbfc4a51948478d6b05f0c0d554111663a8/docs/restoring_programs.md, tmux-resurrect looks for string Vim in a statement like in the entire path. ```tmux set -g @resurrect-processes '~Vim -> vim' ``` This...

Is it possible to set `resurrect-dir` more dynamical

[{"_id":"6352574dea01ec786e761d0b","body":"Hello @ErikLambrechts I am wondering if this is possible as well.\r\n\r\nI would like to have different \"ressurects\" this way I would use tmux state based in the projects that I am working on.","issue_id":1660661779929,"origin_id":394100814,"user_origin_id":2129872,"create_time":1527958038,"update_time":1527958038,"id":1666340685252,"updated_at":"2022-10-21T08:24:45.252000Z","created_at":"2022-10-21T08:24:45.252000Z"},{"_id":"6352574dea01ec786e761d0c","body":"@ErikLambrechts @marabesi I have filed another ticket which gives a minimal change that would be needed in tmux-resurrect to be able to achieve this behavior. https:\/\/github.com\/tmux-plugins\/tmux-resurrect\/issues\/389. That seems to be the only hurdle in achieving the result we all intend.","issue_id":1660661779929,"origin_id":876046939,"user_origin_id":71736629,"create_time":1625707720,"update_time":1625707765,"id":1666340685257,"updated_at":"2022-10-21T08:24:45.256000Z","created_at":"2022-10-21T08:24:45.256000Z"},{"_id":"6352574dea01ec786e761d0d","body":"Update: I have created a PR that should resolve this: https:\/\/github.com\/tmux-plugins\/tmux-resurrect\/pull\/390","issue_id":1660661779929,"origin_id":876226895,"user_origin_id":71736629,"create_time":1625731635,"update_time":1625731635,"id":1666340685261,"updated_at":"2022-10-21T08:24:45.261000Z","created_at":"2022-10-21T08:24:45.261000Z"},{"_id":"6352574dea01ec786e761d0e","body":"As mentioned in #390, I can't see this feature making it into `tmux-resurrect`. I encourage you to fork the plugin (or just copy the code) and create another plugin that focuses on saving\/restoring individual sessions.","issue_id":1660661779929,"origin_id":876993072,"user_origin_id":1042682,"create_time":1625817384,"update_time":1625817384,"id":1666340685264,"updated_at":"2022-10-21T08:24:45.264000Z","created_at":"2022-10-21T08:24:45.264000Z"}] comment

I am looking for a way to set `resurrect-dir` to the directory from which I start a new tmux session (extended with something like `.tmux_resurrect`). I was hoping for a...

Sessions restore by directly using name order and overwrite index order.

[{"_id":"63524b9aea01ec786e761333","body":"I think the order is based on the `list-windows` command (`tmux list-windows -a -F \"#{session_name}\"`). From what I can see it orders sessions alphabetically (in my tmux version `next-3.3`). Also, it seems it doesn't have a sort-order flag. And if it did have a `sort-order` flag it would be for windows, not sessions?\r\n\r\nIf someone can figure out a simple solution for this, a PR would be accepted.\r\n\r\nWhile we're on this topic: I recommend completely ignoring session order. Use `prefix + g` from [tmux-sessionist](https:\/\/github.com\/tmux-plugins\/tmux-sessionist) (or some other means) to switch sessions **without** looking at the session list at all.","issue_id":1660661779933,"origin_id":872970577,"user_origin_id":1042682,"create_time":1625229947,"update_time":1625229947,"id":1666337690962,"updated_at":"2022-10-21T07:34:50.962000Z","created_at":"2022-10-21T07:34:50.962000Z"}] comment

In the original tmux (before prefix + Ctrl-R) , the order of sessions are sorted by three types. Sorted by index, sorted by name and sorted by time. In tmux...

version 3.1c - prefix Ctrl-r fails to restore sessions

[{"_id":"63524d51ea01ec786e7614a1","body":"bumped","issue_id":1660661779938,"origin_id":871177082,"user_origin_id":67359748,"create_time":1625039444,"update_time":1625039444,"id":1666338129966,"updated_at":"2022-10-21T07:42:09.966000Z","created_at":"2022-10-21T07:42:09.966000Z"}] comment

Quick self-help question Where might I insert some sort of visual confirmation the command to restore the session was received? I've been using/loving tmux for many years; these plugins are...

[Bug] watch command resurrects without '-characters.

[{"_id":"63525b8ccecf4e081a1aea3c","body":"> If you have a comment then please let me know how I could do things better next time :)\r\n\r\nThank you for taking the time to report the issue. You've done all good :+1: . I especially appreciate that you included the proper files at the end of your post.\r\n\r\nI've looked into this issue.. and I too can reproduce the bug where the quotes are missing.\r\n\r\nUnfortunately, I don't know what can be done about this... I've played with both `ps` and `pgrep` programs that we use to get process' argument list. And it's the quote-free output that we get from both `ps` and `pgrep`. Given that those tools \"loose\" the quoting, I'm not sure what can be done so they are restored...\r\n\r\nI'll place the proper labels at this issue, but unfortunately I don't know if we'll ever have the solution.\r\n","issue_id":1660661779941,"origin_id":68541956,"user_origin_id":1042682,"create_time":1420217887,"update_time":1506594389,"id":1666341772402,"updated_at":"2022-10-21T08:42:52.402000Z","created_at":"2022-10-21T08:42:52.402000Z"},{"_id":"63525b8ccecf4e081a1aea3d","body":"Oh, I forgot to add.. even if this issue was solved, I'm sure there would be some other command line construct \"discovered\" after this one that could not be restored (pipes, redirects etc come to mind).\n\nSo, I'd say the question is not \"how to restore every possible command line construct?\", but \"where is the line of what can be restored?\". Even if our command restore capabilities are pretty limited, that's probably okay.\n\nThis plugin was never really intended for restoring all commands. That could even be dangerous. Instead, a user should pick a couple commands that are important in his workflow and explicitly enable them via `set -g @resurrect-processes`.. and that's it. Non standard and complex stuff should really be explicitly typed and executed again really.\n\n@absorber also I've opened #65 for the second issue you brought up.\n","issue_id":1660661779941,"origin_id":68543281,"user_origin_id":1042682,"create_time":1420218887,"update_time":1420218887,"id":1666341772405,"updated_at":"2022-10-21T08:42:52.405000Z","created_at":"2022-10-21T08:42:52.405000Z"},{"_id":"63525b8ccecf4e081a1aea3e","body":"> Oh, I forgot to add.. even if this issue was solved, I'm sure there would be some other command line construct \"discovered\" after this one that could not be restored (pipes, redirects etc come to mind).\n\nHmm I see. So is this something which can be fixed \/ implemented \/ taken care of in the tmux codebase itself? If not, I hope the tmux team considers doing so in the future. Tmux resurrect is a really cool and much needed feature IMO.\n\nMeanwhile, is there a list of supported commands (and their constructs) which can be restored? If not, perhaps we can work on documenting them in the wiki?\n","issue_id":1660661779941,"origin_id":70732363,"user_origin_id":2358532,"create_time":1421787657,"update_time":1421787657,"id":1666341772409,"updated_at":"2022-10-21T08:42:52.409000Z","created_at":"2022-10-21T08:42:52.409000Z"},{"_id":"63525b8ccecf4e081a1aea3f","body":"> So is this something which can be fixed \/ implemented \/ taken care of in the tmux codebase itself?\n\nHmm.. I somehow doubt it. Vanilla tmux does have support for detecting running programs via `pane_current_command` (you can look it up in the tmux manpages), but it's pretty basic. You can always open an [issue to tmux core team](http:\/\/sourceforge.net\/p\/tmux\/tickets\/) if you want to bring their attention to this.\n\n> Meanwhile, is there a list of supported commands (and their constructs) which can be restored?\n\nWe have this in [the configuration section in the readme](https:\/\/github.com\/tmux-plugins\/tmux-resurrect#configuration).\n","issue_id":1660661779941,"origin_id":70766255,"user_origin_id":1042682,"create_time":1421802063,"update_time":1421802063,"id":1666341772412,"updated_at":"2022-10-21T08:42:52.412000Z","created_at":"2022-10-21T08:42:52.412000Z"},{"_id":"63525b8ccecf4e081a1aea40","body":"Does this have anything to do with bash itself? \nIMHO, bash would strip the quotes before it executes the commands.....\n","issue_id":1660661779941,"origin_id":165328003,"user_origin_id":8252035,"create_time":1450323399,"update_time":1450323436,"id":1666341772416,"updated_at":"2022-10-21T08:42:52.416000Z","created_at":"2022-10-21T08:42:52.416000Z"},{"_id":"63525b8ccecf4e081a1aea41","body":"I have found a way to restore command arguments in a way that doesn't break with quotation marks.\r\nBut I had to encode the contents of proc\/cmdline as escaping it during save didn't work.\r\nHere's my patch: https:\/\/github.com\/tmux-plugins\/tmux-resurrect\/compare\/master...donat-b:cmdline?expand=1\r\nI can make a PR unless someone has a better idea how to make this work.","issue_id":1660661779941,"origin_id":332411218,"user_origin_id":1835559,"create_time":1506489393,"update_time":1506489789,"id":1666341772420,"updated_at":"2022-10-21T08:42:52.420000Z","created_at":"2022-10-21T08:42:52.420000Z"},{"_id":"63525b8ccecf4e081a1aea42","body":"From what I see that uses `\/proc` filesystem.. so it wouldn't work on osx.. but it could be added as a \"save strategy\".","issue_id":1660661779941,"origin_id":332795863,"user_origin_id":1042682,"create_time":1506594568,"update_time":1506594568,"id":1666341772423,"updated_at":"2022-10-21T08:42:52.423000Z","created_at":"2022-10-21T08:42:52.423000Z"},{"_id":"63525b8ccecf4e081a1aea43","body":"I'm seeing this with Neovim on NixOS (Linux) due to wrappings. Going to try @donat-b's changes, since they're in the same vein as what I was looking at doing.","issue_id":1660661779941,"origin_id":450278585,"user_origin_id":630909,"create_time":1545966005,"update_time":1545966005,"id":1666341772427,"updated_at":"2022-10-21T08:42:52.426000Z","created_at":"2022-10-21T08:42:52.426000Z"},{"_id":"63525b8ccecf4e081a1aea44","body":"Looks like it needed a small adjustment to disable wrapping output from `base64`. Submitting a PR","issue_id":1660661779941,"origin_id":450283456,"user_origin_id":630909,"create_time":1545968652,"update_time":1545968652,"id":1666341772430,"updated_at":"2022-10-21T08:42:52.429000Z","created_at":"2022-10-21T08:42:52.429000Z"},{"_id":"63525b8ccecf4e081a1aea45","body":"> `pane_current_command`\r\n\r\nFor what it's worth.. I do put `pane_current_command` on my pane title bars and so at a glance I can confirm that it does retain both backslash-escaped spaces and single and double quotes, which if this method is used (rather than `ps` or `\/proc\/{PID}\/cmdline` which definitely does not keep them) for resurrection it seems like it'd be an improvement to how this works now. \r\n\r\nLike, it's pretty bad, don't you think, that resurrect simply can't handle any reasonable form of `tail -f log\\ file\\ with\\ space.log` command?","issue_id":1660661779941,"origin_id":859225506,"user_origin_id":1542910,"create_time":1623380293,"update_time":1623380308,"id":1666341772434,"updated_at":"2022-10-21T08:42:52.433000Z","created_at":"2022-10-21T08:42:52.433000Z"}] comment

First of all, thank you for making this really awesome tool that I've been waiting for a long time now! Also, I'm pretty new on Git(Hub) and as such I'm...

bug
help wanted

Source nvim session from some other directory

[{"_id":"635259ddd297b621322f2fd8","body":"Gaining the ability to source vim sessions from not exactly .\/Session.vim would be a great benefit for me because it'd allow having different vim sessions in the same directory concurrently. (Happens, for example, when I'm in a session with a window for the module-being-worked-on, a window for all the parts of the code where I insert quick hacks, and one for testing). With plain \"`:mks!` all the time\", these would overwrite each other.\r\n\r\n@ankitpal1029, do you already have a mechanism that sets you up the sessions in ~\/.config\/nvim\/sessions (or ~\/.local\/share\/nvim\/sessions but whatever)?","issue_id":1660661779946,"origin_id":800953236,"user_origin_id":442326,"create_time":1615975222,"update_time":1615975222,"id":1666341341208,"updated_at":"2022-10-21T08:35:41.207000Z","created_at":"2022-10-21T08:35:41.207000Z"},{"_id":"635259ddd297b621322f2fd9","body":"@chrysn there is this vim plugin called vim-workspace that offers this but i couldn't quite get the source the session file automatically on startup to work . If you get this to work on your system do let me know , it infact does provide what you need in the sense that you can just hop into the code without a flag (that restores your session) and with a flag (which opens a fresh non recorded session)\r\n\r\nThis way the session file doesn't get overwritten each time you just get into vim for making a small edit.","issue_id":1660661779946,"origin_id":803439593,"user_origin_id":49815751,"create_time":1616264781,"update_time":1616264835,"id":1666341341212,"updated_at":"2022-10-21T08:35:41.211000Z","created_at":"2022-10-21T08:35:41.211000Z"},{"_id":"635259ddd297b621322f2fda","body":"Maybe not exactly the solution but I think its better to use [startify](https:\/\/github.com\/mhinz\/vim-startify) or [Auto-session](https:\/\/github.com\/rmagatti\/auto-session) to manage sessions in vim\/neovim. There's also the [dashboard](https:\/\/github.com\/glepnir\/dashboard-nvim) plugin that I haven't tested out myself. One advantage of this method is that your can restore from all kinds sessions in your directory of choice automatically or manually. I use tmux resurrect purely for tmux sessions and windows and the dedicated vim\/nvim plugins for extending their functionalities.","issue_id":1660661779946,"origin_id":857874576,"user_origin_id":84911063,"create_time":1623258331,"update_time":1623258374,"id":1666341341216,"updated_at":"2022-10-21T08:35:41.215000Z","created_at":"2022-10-21T08:35:41.215000Z"}] comment

I prefer storing session.vim files outside my project directory , is there any way by which tmux could source this file from another directory link ~/.config/nvim/sessions/

Everything works great but I was a bit surprised one cannot remove a session on purpose. At least, I didn't find any obvious solution in the documentation. How can one...