Skip to content

How to automatically open my tmux session on each connection? #1526

Discussion options

You must be logged in to vote

For mosh connections, go to Settings > Hosts, choose your host, and scroll down to Mosh section. In the command field, put:

tmux new -A -s name -n name

In short, it will attach(-A) if the session name(-s) already exists or create a new one. It also names the first window the same as the session(-n).

For SSH connections, go to SSH Config in the same settings panel and paste this setting:

RequestTTY yes 
RemoteCommand tmux new -A -s name -n name

RequestTTY is required to run tmux command on a remote host.

End configuration should look like example below.

From this point, Blink Shell will automatically attach to the session of your choice.

Tip: It will work with any command you like, i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carloscabanero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant