<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ruslan&#39;s Tech Blog</title>
    <link>https://blog.bekenev.net/tags/tmux-ssh.html</link>
    <description>Software development related stuff</description>
    <language>en-us</language>
    <lastBuildDate>Mon, 24 Jun 2019 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bekenev.net/tags/tmux-ssh/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Open Tmux on ssh login</title>
      <link>https://blog.bekenev.net/2019/06/24/tmux-autopen-on-ssh-login.html</link>
      <pubDate>Mon, 24 Jun 2019 00:00:00 +0000</pubDate>
      <guid>https://blog.bekenev.net/2019/06/24/tmux-autopen-on-ssh-login.html</guid>
      <description>&lt;p&gt;Here is few lines you need to add to your .bashrc/.zshrc/.whatevershellrc:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;if [[ -z &amp;#34;$TMUX&amp;#34; ]] &amp;amp;&amp;amp; [ &amp;#34;$SSH_CONNECTION&amp;#34; != &amp;#34;&amp;#34; ]; then&#xA;    tmux attach-session -t mysession || tmux new-session -s mysession&#xA;fi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;These lines check if tmux session &lt;code&gt;mysession&lt;/code&gt; is exist then we &lt;code&gt;tmux attach-session&lt;/code&gt;&#xA;is executed. Otherwise new session with &lt;code&gt;mysession&lt;/code&gt; name is created.&lt;/p&gt;&#xA;&lt;p&gt;Replace &lt;code&gt;mysession&lt;/code&gt; to something more meaningful.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
