Skip to main content

All Questions

1 vote
0 answers
133 views

tmux doesn't inherit PATH variable when inside docker?

I am trying to run tmux inside docker container. It runs but looses variables like PATH, for example inside container: root@sparkmaster:/opt/bitnami/spark# ls /opt/bitnami/python/bin/python /opt/...
Dims's user avatar
  • 3,285
1 vote
0 answers
173 views

tmux/bash start tmux only if normal shell (intellij)

I have a little problem, I let tmux start in the .bashrc but I only want it to start, if the shell is a normal shell inside my terminal emulator. Now most IDEs have a terminal tab where they launch a ...
atticus's user avatar
  • 119
0 votes
1 answer
254 views

Tmux not setting $HOME

I noticed a difference in tmux behavior switching from Debian to Ubuntu. Expected / old behavior set the $HOME (and all kind of related settings) according to the user starting the tmux instance: $ ...
TacoV's user avatar
  • 113
8 votes
3 answers
8k views

Screen and kitty what should $TERM be?

Why does tmux report $TERM=screen-256color Normally kitty reports $TERM=xterm-kitty Which should I use if I run tmux inside kitty? Obviously kitty provides advanced functionality and that makes ...
Evan Carroll's user avatar
  • 31.8k
4 votes
2 answers
11k views

New tmux session only sources .zshrc, and doesn't pick up the $PATH defined in .profile

After reading multiple questions on this topic I still feel lost. I read suggestions that one should set the environment variables including $PATH in .profile instead of specifically in .bashrc or ....
xji's user avatar
  • 757
2 votes
0 answers
465 views

Issue setting environmental variable in tmux and screen

Whenever I use Tensorflow (a python library) from within a tmux or screen session, I have to manually change the environmental variables. Specifically, I have to type export PATH blah blah blah and ...
Ari Herman's user avatar
1 vote
1 answer
241 views

Can tmux and screen generate environment variables that can be used by PROMPT_COMMAND?

I want to create a log the commands I create in all the termimals I work in, as explained in this question, Is there some utility or plugin which includes the current directory in the bash history?, ...
vfclists's user avatar
  • 7,619
2 votes
1 answer
2k views

Why does tmux not pick up the variables sourced in my tmux.conf?

I'm trying to make my tmux config a little more modular by abstracting the colors to a separate file. I'm sourcing that file and then using the variables defined there as my tmux theme: # part of my ...
user avatar
15 votes
3 answers
30k views

Configure tmux to use zsh

Right now I have my iTerm session configured to use zsh (/usr/local/bin/zsh), but I'm trying to configure tmux to use zsh as well, instead of /bin/bash/, which it's currently defaulting to. So far ...
Justian Meyer's user avatar
11 votes
2 answers
7k views

Using environment variables in Tmux status bar shell commands

I am attempting to create a tmux status bar which shows three timezones: US Eastern Time :: UTC :: Central European Time. Using the TZ environment variable makes the date command show the time in a ...
Excalibur's user avatar
  • 255
49 votes
5 answers
40k views

Why do I have to re-set env vars in tmux when I re-attach?

I mainly work on a mac and ssh/tmux attach to a Linux machine to do my work. I have ssh-agent running on the Linux machine. I have set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID ...
Chris W.'s user avatar
  • 1,249
3 votes
1 answer
4k views

Set environment variable for all of tmux shells when gnome-sessions gets restarted

To solve this problem, I need to set the environment variable DBUS_SESSION_BUS_ADDRESS for all shells inside tmux every time I restart gnome without restarting tmux (this is often). How can I best ...
gerrit's user avatar
  • 3,527
6 votes
3 answers
4k views

Send a command to a running tmux session (like screen -X)

I'm looking to switch from screen to tmux for my terminal multiplexing needs, but there's a feature of screen that I need to replicate in tmux: the -X option, which allows one to run arbitrary screen ...
Ryan C. Thompson's user avatar
18 votes
1 answer
15k views

using environment variables in tmux.conf files

Is it possible to use an environment variable in a tmux.conf file? I am trying to set a default-path to an environment variable. Currently what I am trying is: set -g default-path $MYVAR further I ...
Digital Powers's user avatar
24 votes
6 answers
53k views

How can I run a script immediately after connecting via SSH?

I started to ask this question but answered it while I had it open. I'm going to post this question, follow it up with my solution and leave it open to other potential solutions. <backstory> I'...
connrs's user avatar
  • 827