GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Environment variable not set when launching session from tmux · Issue #184 · tmux-python/tmuxp

Environment variable not set when launching session from tmux #184

New issue
Copy link
New issue
Copy link
Closed
Closed
Environment variable not set when launching session from tmux#184
Copy link

Description

@k4nar
k4nar
opened on Oct 20, 2016
Issue body actions

Hello,
I have several tmuxp configuration files using environment to pass an env variable to the created session.
When I launch them from a terminal, the environment variables are set. But when I launch them from a running tmux session they are not.

Do you have idea what's causing this behavior?

Failing testcase

session_name: test
environment:
  FOO: bar
windows:
  - panes: ['env | grep FOO']

Running tmuxp load -y test.yml shows FOO=bar, whereas launching the same command from a tmux session doesn't.

Reacted by Matt Behrens

Activity

  1. romabysen commented on Nov 1, 2016

    @romabysen
    romabysen
    on Nov 1, 2016
    More actions

    I have noticed the same issue and I think it is due to the workspace being built in the current (or non-existing when outside tmux) session instead of the new one.

  2. askedrelic commented on Aug 8, 2017

    @askedrelic
    askedrelic
    on Aug 8, 2017
    More actions

    I've found a bug in libtmux which is causing this, @romabysen is correct. So I will try to fix libtmux and it should magically fix tmuxp.

  3. askedrelic commented on Aug 19, 2017

    @askedrelic
    askedrelic
    on Aug 19, 2017
    More actions

    tmux-python/libtmux#65 has fixed this for me locally, so this should be fixed with the next version of libtmux.

  4. tony commented on Aug 20, 2017

    @tony
    tony
    on Aug 20, 2017
    Member
    More actions

    @askedrelic if you're around, try seeing if pip install -U libtmux and trying to load a fresh session in tmuxp works.

  5. tony commented on Aug 20, 2017

    @tony
    tony
    on Aug 20, 2017
    Member
    More actions

    tmuxp 1.3.2 is live

  6. askedrelic commented on Aug 21, 2017

    @askedrelic
    askedrelic
    on Aug 21, 2017
    More actions

    tmuxp 1.3.2 fixes this for me.

    My use case for this has been restarting a tmuxp session, while I'm currently using it. I setup a bunch of ssh connections and restarting the whole session has always seemed like the easiest thing for me:

    tmux-restart() {
        # kill client incase it exists
        tmux kill-session -t temp || TRUE
        # create detached session with commands
        tmux new-session -s temp -d 'sleep 1 && tmux kill-session -t dev && tmuxp load dev -y && tmux kill-session temp'
        tmux switch-client -t temp;
    }
  7. k4nar commented on Aug 21, 2017

    @k4nar
    k4nar
    on Aug 21, 2017
    Author
    More actions

    Indeed, tmuxp 1.3.2 seems to have fixed it. Thanks!

  8. k4nar
    closed this as completedon Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.