Skip to content

Is it normal that tmuxp load ~/.tmuxp/foo.yaml prompts to a python process automatically? #588

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

Closed
1 task
Ma-Nu-El opened this issue May 27, 2020 · 1 comment

Comments

@Ma-Nu-El
Copy link

Ma-Nu-El commented May 27, 2020

Describe the problem:

Steps to reproduce:

  1. start a simple tmux session
    For the sake of tracing, I bypassed my .tmux.conf so it's been reproduced in vanilla tmux.

  2. While inside that tmux session
    $ tmuxp freeze
    (complete process to "freeze" session)

  3. Exit 'tmux' session

  4. Load 'tmux' session using (from $HOME/)
    $ tmuxp load .tmuxp/0.yaml

Observed Results:

From outside of tmux:
[Loading] /home/ma/.tmuxp/0.yaml

Once inside tmux, the prompt is presented as follows:

$  python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

I'm not by any means an expert in the terminal or even programming in general, but I assume that's a python program being executed right?

Expected Results:

I mean, the session should be restored as it was when it was saved isn't it?

Or at least, if it's not successfully saved, present a regular prompt.

To exit that prompt is as simple as typing exit(), however, in this manner, I can't rely on the freeze feature of 'tmuxp', which is what made me choose it in the first place. If I'm doing something wrong please let me know.

Required info

$ python3 --version
Python 3.8.2
$ echo $PATH
/home/ma/.local/bin:/home/ma/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$ tmux -V
tmux 3.0a
$ tmuxp --version
tmuxp 1.5.4
$ command -v tmux
/usr/bin/tmux
$ command -v tmuxp
/home/ma/.local/bin/tmuxp
  • don't know how to find libtmux version
$ echo $SHELL
/bin/bash
$ tmux list-sessions
no server running on /tmp/tmux-1000/default
  • same output for all tmux related commands
$ tmuxp freeze
Convert to [yaml]: 
session_name: '0'
windows:
- focus: 'true'
  layout: b29d,90x24,0,0,0
  options: {}
  panes:
  - focus: 'true'
    shell_command: python3
  start_directory: /home/ma
  window_name: bash

---------------------------------------------------------------
Freeze does it best to snapshot live tmux sessions.

The new config *WILL* require adjusting afterwards. Save config? [y/N]: y
Save to: /home/ma/.tmuxp/0.yaml [/home/ma/.tmuxp/0.yaml]: 
Save to /home/ma/.tmuxp/0.yaml? [y/N]: y
Saved to /home/ma/.tmuxp/0.yaml.

Describe your environment

  • Architecture: x86_64
  • OS version: Ubuntu 20.04 focal
@Ma-Nu-El Ma-Nu-El changed the title Is it normal that tmuxp load foo starts a python process automatically? Is it normal that tmuxp load ~/.tmuxp/foo.yaml starts a python process automatically? May 28, 2020
@Ma-Nu-El Ma-Nu-El changed the title Is it normal that tmuxp load ~/.tmuxp/foo.yaml starts a python process automatically? Is it normal that tmuxp load ~/.tmuxp/foo.yaml prompts to a python process automatically? May 28, 2020
@Ma-Nu-El
Copy link
Author

Ma-Nu-El commented May 28, 2020

update

Turns out ,tmuxp freeze does actually freeze the session with a python3 process running even if you didn't run any python process whatsoever (check your ~/.tmuxp/foo.yaml). Completely unaware of if this is intentional and has an actual use in my favor that I don't know of.

From now on, I'll keep an eye on the freeze file and manually erase that python3 process every time I freeze a session.

Closing issue.

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

No branches or pull requests

1 participant