tmux for MobaXterm

An old friend meets a new friend: tmux for MobaXterm!

In a previous sysadmin life, I used tmux to good effect. Today, I’m using a Windows 8.1 system as my primary work desktop and recently got into MobaXterm for my Linux/terminal/X11 needs. While my most common usage scenario for tmux is invoking it on a remote server/VM instead of directly on my local machine, I thought it would be a good exercise to install tmux for local usage on MobaXterm and sharing that work by creating a plugin.

Download: tmux 1.9a for MobaXterm (tmux.mxt3)

tmux.mxt3 includes the following software:

The licenses for the above software is included within the mxt3 (zip) file.

For additional MobaXterm plugins and installation instructions, see the MobaXterm plugins page.

Additional credits:

13 thoughts on “tmux for MobaXterm

  1. HIey

    I’m using mobaxterm with tmux plugin installed but i can’t start the tmux in normal user mode [Getting the error : “can’t create socket: Permission denied”] and if i do a “sudo tmux” i get an error saying “open terminal failed : not a terminal”. I’m currently trying to fix this. Can you please point me in the right direction ?

    1. @alatairpearl:

      That sounds like a problem with the tmux socket file normally located in /tmp.

      Try to remove any tmux sockets from /tmp while tmux isn’t running and then launch tmux again.

      There could be a cygwin compat issue with newer versions of cygwin and the version of tmux that I packaged for MobaXterm. I’m no longer running Windows on the desktop regularly so I’m not using MobaXterm much and certainly not keeping up with the latest versions.

    2. Hey @ALTAIRPEARL did you ever find a workaround for this? I am hitting the same thing.

  2. Hi,
    I’m newbie with linux, please let me know after downloading tmux.mxt3, how do I make it work with MobaXterm. How to build it, which file to copy and where to copy…

    Sorry for my stupid question.
    Lekcy

  3. Hi!

    I’ve been trying a very similar steps to make it work for tmux 2.1.
    I need to build tmux 2.1 from sources to fix the bug with zoomed panes (you cannot select other panes while zoomed).

    But I got an early error in the autogen.sh:
    Can’t locate threads.pm in @INC (@INC contains: /usr/share/automake-1.14 /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/site_perl/5.14 /usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/vendor_perl/5.14 /usr/lib/perl5/5.14/i686-cygwin-threads-64int /usr/lib/perl5/5.14 .) at /usr/share/automake-1.14/Automake/ChannelDefs.pm line 23.
    BEGIN failed–compilation aborted at /usr/share/automake-1.14/Automake/ChannelDefs.pm line 26.
    Compilation failed in require at /usr/share/automake-1.14/Automake/Configure_ac.pm line 27.
    BEGIN failed–compilation aborted at /usr/share/automake-1.14/Automake/Configure_ac.pm line 27.
    Compilation failed in require at /bin/aclocal-1.14 line 39.
    BEGIN failed–compilation aborted at /bin/aclocal-1.14 line 39.
    aclocal failed

    I’ve tried some little hack around… but the hack was becoming too big.
    Any ideas?

    Thanks!

    1. @Albert: It seems like you’re missing the perl “threads” module in your cygwin build environment. Cygwin might provide a package for it or you may need to install it with CPAN or manually.

    2. @rthomson: Thanks for your quick answer, but unluckly I do have the threads module. I’m using mobaxterm as cygwin, so I installed perl just with apt-get. The problem is that the location of threads.pm is at:
      /usr/lib/perl5/5.22/i686-cygwin-threads-64int/threads.pm
      As you can see in the original error, the autogen.sh is locking only to 5.14 directories, but not on the newer 5.22 version of perl I’ve installed with apt-get.
      I’ve tried to do some hacking linking/renaming dirs/versions of perl… but it didn’t worked.

      Probably I should contact to mobaxterm support?

      Thanks!

      Albert

  4. Thanks for a cool plugin. Haven’t used tmux in years, but it’s great to see it for MobaXterm. Now I just have to remind myself of all the commands. :)

    Note; I had a similar problem as Steve, where the .bashrc file wasn’t getting parsed by MobaXterm because all the stock commands were loaded after it (thus ignoring some commands that I put in there). By using the trick in the stackoverflow link, it solved my problem. Double win!

    Thanks for your hard work and a great plugin!
    Bruce

    1. Steve, if you’re still having this issue, check out the stackoverflow reference above. It definitely hit me too, and the solution was simple: source it from your .bash_profile file. .Bashrc runs BEFORE MobaXterm loads, so your changes are lost, but .bash_profile runs AFTER (essentially running it twice, but it works).

  5. Thank you for this plugin.
    I have a small problem : it seems that my bashrc file is not sourced by tmux.

    I put a .bashrc file in MobaXterm home directory (C:\Users\username\Documents\MobaXterm\home) which is sourced by MobaXterm at startup.
    But when I run tmux, another instance of Bash is run without sourcing my bashrc.
    I see it because my prompt changes and I have no more aliases.

    If I manually source this file : source $HOME/.bashrc, I get back my prompt, aliases, etc.
    So I guess it’s just a mather of initialization.

    Have you any clue about this?

Leave a Reply

Your email address will not be published. Required fields are marked *