Questions tagged [tmux]
The tmux tag has no usage guidance.
60
questions
3
votes
2
answers
2k
views
STIG'd RedHat 8 kills tmux session upon SSH timeout
I am working on a Red Hat Enterprise Linux (RHEL) 8 machine with the DISA STIG applied via OpenSCAP. The STIG requires that users be automatically dropped into a tmux session, that tmux session locks ...
0
votes
1
answer
99
views
tmux: pane make up windows, windows make up sessions. Now whats the use of session groups?
panes make up windows. A session can have multiple windows. But what is the use case of session groups?
Is it a group of sessions?
1
vote
1
answer
124
views
Why is my bash script not being sourced when opening new tmux pane?
The following logic in .bash_aliases to remove duplicate paths works fine when opening a new terminal:
# prune duplicate paths
PATHS=("PATH" "LD_LIBRARY_PATH" "C_INCLUDE_PATH&...
1
vote
1
answer
3k
views
How to start tmux session with 2 panes and execute in each pane predefined command, only then connect to this tmux session?
I want to create development environment in docker and establish there tmux session where I can see 2 watch processes (frontend watch process and backend watch process).\
I can't seem to understand ...
0
votes
1
answer
118
views
Script for no hangup, time-consuming process that shuts down the machine after finished [closed]
I'm trying to make a script that launches some time-consuming processes detached (using tmux) and also launches a process that works like a sentinel: it looks for the tmux process (in /proc/$(pgrep ...
0
votes
1
answer
348
views
Exclude or Include certain profile lines during a tmux session start
In my .bash_profile, I have a line to start tmux only if it is present on the system with:
[ -z $TMUX ] && export TERM=xterm-256color && exec tmux
In a similar vein, I would like to ...
0
votes
1
answer
719
views
The ulimits in tmux pane are not correct
I have changed the /etc/security/limits.conf file and set the nofile to 4096, and it returns 4096 if I run ulimits -n in an ssh session. But after I run tmux in the same session, ulimit -n returns ...
3
votes
1
answer
3k
views
use a service to start a new, shared, tmux session (and detach)
I'm trying to use systemctl to launch a process in a new, shared, tmux session. I'm pretty sure my tmux command is all set:
I have the socket path set with a shared group.
the service is executing ...
0
votes
1
answer
207
views
Why "--nodetach" option is needed for xsel when it is started from systemd unit?
I'm trying to adopt Alexey Samoshkin's approach to copy text from remote tmux session into local clipboard. I'm using xsel instead of xclip, and systemd user service instead of system one. Here is my ...
0
votes
0
answers
577
views
byobu: How can I create a new session in an existing tmux group?
We are using byobu here in our embedded development team to share access to the programmers that are connected to our devices. That way all of our team have access to the device log files and so on.
...
1
vote
0
answers
1k
views
TMUX not creating sessions from CRONTAB
I'm having a heck of a time getting a tmux session to be created from a script executed by crontab. The script executes and the session is created without fail from just running it but if I run it ...
0
votes
2
answers
411
views
re-parenting to screen two processes joined by pipe [duplicate]
Let's say in a PuTTY connection I start
mysqldump --host host1 --databases db1 db2 db3 | mysql
which creates two processes: mysqldump with PID 5800 and mysql with PID 5801. Is it possible to let the ...
0
votes
1
answer
431
views
Can not reconnect to instance via ssh in google cloud
I use google could for machine learning. It takes too much time for completing execution. So I use tmux for that so that I can detach and attach to the session.
But now when I restart my laptop and ...
1
vote
2
answers
1k
views
Start tmux session immediately after killing tmux server
If I run
tmux kill-server ; tmux new -d -s test
Sometimes it works, and sometimes I get lost server or no server running on /tmp/tmux-1000/default.
If I do
tmux kill-server ; sleep 0.1; tmux new -...
-1
votes
1
answer
119
views
Directories cease to exist while using tmux
When I connect via ssh to a terminal at work I need to keep sessions alive to run various scripts. However, I often find that the scripts fail because some directory ceases to exist in the meantime.
...
3
votes
1
answer
2k
views
Tmux Status Bar default window names
On one of my clients' servers, I've been using the tmux status bar to monitor long-running processes, both through the automatic window-name changes and by setting window names through ANSI control ...
8
votes
4
answers
16k
views
How to fix a tmux session messed up by control characters
Every once in awhile, I'll accidentally blast some control codes into my terminal session (either errant coding or accidentally gpg --export). This sometimes causes my tmux session to loose it's ...
0
votes
1
answer
3k
views
commands not running from crontab [duplicate]
I have setup and cron to check if a port is busy or free and if its free then it sends and email and then start golang api service
send mail is working properly but api server is not getting started
...
1
vote
1
answer
3k
views
How to start a detached tmux session via ssh?
I know I can start a detached tmux session like this:
> tmux new -d -s mysession sleep 10000
> tmux ls
mysession: 1 windows (created Mon Apr 16 22:56:14 2018) [177x62]
Now I want to start it ...
2
votes
1
answer
2k
views
Byobu creating new session on every connection
Every time I connect to my Ubuntu 17.10 machine with byobu-enable turned on, I get a new "session" rather than it reusing my existing sessions.
On connect:
Byobu sessions...
1. tmux: foo: 3 ...
2
votes
1
answer
471
views
Easing terminal sizing on OpenVMS
Being somewhat green with OpenVMS, but still trying to "get stuff done", I'd like to make things a little easier in respect of setting terminal height and width.
Presently I can SSH to an OpenVMS-8.4-...
2
votes
2
answers
5k
views
keeping a detached ssh process running *after closing the ssh client*
I ssh in to my ubuntu machine usimg mobaxterm.
This works very well.
Sometimes I want to keep a process running but exit my ssh session (and exit mobaxterm). I have tried the following but ...
6
votes
1
answer
6k
views
Send command to new tmux pane?
If I want to send a command to a running pane in tmux I can do this:
tmux send -t foo ls ENTER
I figured I could do something like this to do the same but in a new pane:
tmux send ls ENTER
Is ...
1
vote
1
answer
2k
views
Parse through a list of Ansible variables and refer to itself while running task
Problem
I have a simple Ansible playbook that creates a list of tmux sessions and then runs a script inside of each session. I am trying to give the tmux sessions names in my vars.yml file.
My ...
9
votes
2
answers
2k
views
Why does tmux bind externally accessible ports?
I am performing a quick audit of services listening on external interfaces on a Ubuntu 14.04 machine, and tmux is binding TCP *:50994 and *:59147 as reported by netstat -l.
I can connect to this port ...
0
votes
1
answer
589
views
What is right way to tmux with fabric django?
1.I am doing this on local machine
tmux new -s amazon
then I ssh in to the server into tmux window
shh user@amazon
then I detach it ctrl b-d
Into fabfile.py I am doing like this
local("tmux a -...
5
votes
1
answer
1k
views
Send tmux command from remote inside ssh session to local instance
The goal is to send tmux command to the local running tmux from the remote server. not to run to different instances of tmux.
Inside tmux we ssh to a server that doesn't run tmux
local>tmux send-...
-2
votes
2
answers
575
views
send tmux command from inside ssh session
Inside tmux we ssh to a server that doesn't run tmux
local>tmux send-key C-p # works
local>ssh user@remote
user@remote> tmux send-key C-p
tmux: command not found
It looks like this more of ...
2
votes
1
answer
9k
views
Linux "tmux" Permission denined
I'm trying to run some automated scripts from root that will start running other scripts as another user in a "tmux" session.
Example:
File 1 - "start_test_script.sh" - in "root" home directory:
#!/...
0
votes
0
answers
97
views
Correct tmux disconnect
I have got ubuntu server 12.04 for android application. Application server(python, postgresql) started via tmux.
After closing tmux terminal(or "tmux detach") on my computer, application server is ...
9
votes
9
answers
21k
views
Tmux new-session returns: "can't create socket"
I have killed a byobu session accidentally (kill -9 byobuSessionId), and now when I try to start another byobu command fails with "can't create socket".
Also tmux new-session returns: "can't create ...
6
votes
1
answer
3k
views
How to start a tmux within bash right after reboot
I have created a script to run upon reboot of an Ubuntu instance.
crontab -e
Then added this to the script:
@reboot /home/ubuntu/startup.sh
This is how the script looks like:
#!/bin/bash
tmux new-...
3
votes
2
answers
6k
views
What is causing the famous "broken pipe" when I use tmux inside an SSH session?
Scenario1:
I SSH from my employer (OSX Yosemite SSH client) to my home server (Debian stable) and (re)connect to a tmux session. If I leave the terminal inactive for a while (~20minutes), it seems ...
0
votes
1
answer
800
views
Bashrc function called ssh doesn't work
I created a function in my bashrc file so that when i ssh into something it automatically opens a tmux session.
function ssht () {
/usr/bin/ssh $@ -t 'tmux a || tmux || /bin/bash'
}
This ...
1
vote
2
answers
549
views
Caveats of installing development tools on production server
I want to install some software on production CentOS box which are not available from repository (like tmux etc). I can download the source and compile it locally, but for doing that I'll need ...
4
votes
1
answer
4k
views
Automate Byobu window creation [closed]
I use Byobu on a Vagrant dev machine to run multiple things in one screen and to be able to suspend/restore the machine and continue where I left off the other day.
There are times when I have to ...
1
vote
1
answer
680
views
My long-running script in tmux goes to sleep when I disconnect from the server - why?
I’m executing a long-running xml-generating script on a CentOS 6.3 server and using tmux (version 1.6) to keep the script running when I disconnect from the server. My problem is that when I ...
1
vote
1
answer
372
views
Use tmux for managing multiple downloaders as a supervisorctl service?
I have many data-servers I need to download data from via http as soon as it is available. For each server I start a bash "while true"-loop and within that a wget to poll the server for new data. To ...
7
votes
5
answers
41k
views
Linux: Connect to another a terminal session
I can use screen or tmux to connect to other terminal sessions, or to share them. But this work only when we first know we will use them.
As root can access everything, is there a way to do the same ...
7
votes
4
answers
10k
views
tmux attach to existing sessions or create new ones
I am looking for a ssh / tmux solution that would act like this:
if there is no session, create one
if there is a session and nobody is connected to it, create another one
Mainly I want to be able ...
5
votes
1
answer
1k
views
Tmux and encryptfs causing "(unreachable)" directories upon reconnect
I'm running an Ubuntu 13.04 server with an encrypted home directory (encryptfs). I keep a tmux session open which holds my development environment (vim, etc). When I disconnect, I'll detach the tmux ...
-3
votes
1
answer
289
views
GNU screen, tmux, dvtm - none are working as ordinary user on OVH VPS [closed]
I bought cheapest vps for teamspeak hosting and I have strange issues with demonizing it's process. None of screen tmux and dvtm work for ordinary user, but they work witout a charm for root. As far ...
0
votes
3
answers
1k
views
Logout root after tmux detach
I'm running tmux on my servers and when configuring things I like to just su into root and take care of things. Is there a possibilty to log out root automatically after I detach the tmux session?
1
vote
1
answer
594
views
Does long running tmux session affect the server and does server need shutdown?
I have 2 questions that are related.
1st) I have a server running centos and is never shutdown. Does server need shutdown , if so how often and what problems can it cause if run without shutdown.
...
-1
votes
1
answer
139
views
Forcecommand is giving strange results with Tmux [closed]
I'm trying to set up pairing with tmux (wemux specifically). I have a pair user set up on my system and can ssh into pair and attach to a tmux session manually. However when I set up Forcecommand in ...
4
votes
1
answer
880
views
Problems with C^b C^[arrow key] in tmux through a ssh session from a mintty terminal
I have a server that I ssh to from Windows 7 using Cygwin+mintty. On the server I attach to a tmux session. So far so good, but when I try to change the tmux layout using C^b [arrow] and C^b M^[arrow] ...
11
votes
2
answers
12k
views
tmux won't run as non root user?
If I run tmux as root, it runs normally and fully functional.
I created a couple users, and it will not run as any of the users.
create session failed: : No such file or directory
I checked the ...
0
votes
1
answer
802
views
Issue with Prompts when SSH from Tmux to Remote Host
I have a Tmux session running locally, in one of the panes I ssh to another host, however once the remote machine is logged in, the cursor is overwriting the command prompt. I think this is happening ...
8
votes
4
answers
5k
views
Tmux send-keys stripping space
I'm trying to run a series of commands in tmux from a remote file like so:
tmux $(wget -qO- http://example.com/tmux)
The file contains commands like split-window and send-keys
The problem is, send-...
2
votes
2
answers
2k
views
freeze and thaw tmux and/or terminal sessions?
I would like to be able to freeze and thaw tmux sessions. That is, to take a complex set of session state, persist it, and bring it back from some persistent store later. Essentially, git stash for ...