Last Updated: February 25, 2016
·
4.365K
· athal7

Using Tmuxinator with Wemux

Background

  • wemux makes remote pairing sessions easy because it simplifies multi-user tmux sessions.
  • tmuxinator allows you to easily specify tmux window and pane configurations so you can have your favorite dev environment up and running quickly.

The Problem

  • How do you get tmuxinator to use wemux for the tmux session that you want to configure?

The Solution

sample_app.yml

project_name: wemux
project_root: ~/Documents/Code/sample_app
tmux_command: wemux
tabs:
  - editor:
      layout: main-horizontal
      panes:
        - #empty, for shell prompt
        - vi .
  - server/console:
      layout: even-vertical
      panes:
        - rails server
        - rails console

8 Responses
Add your response

This doesn't seem to be working. I used the same socketpath and projectname, but I still get a tmux session. Any suggestions?

over 1 year ago ·

Thanks for trying this out! It's possible that this has some issues with the latest version of tmux, as I've seen the same thing on a newer machine. I plan to spend some time debugging it soon. If you are able to figure it out before me I'll be sure to update this.

over 1 year ago ·

Please feel free to send a pull request. There's an open issue on the repo here https://github.com/aziz/tmuxinator/issues/88.

over 1 year ago ·

Thanks for the link, going to try to find time to work on a pull request soon. You are right that wemux is not quite a tmux wrapper so it may be more complicated

over 1 year ago ·

@soliah @akofink updated with the latest, since better support was merged in, thanks for your help!

over 1 year ago ·

Thanks alot for this tip!

athal7,

I had the same problem and solved it. The message I was getting was "No wemux server to attach to on 'wemux'".

1. the first problem I seemed to have was when changing the default name in the wemux config. I re-commented that line so the only line I had effectively was for the allowed host. Then my host could run a server.
2. the second problem seems to be that the socket directory has the wrong group permissions. According to the readme:

"Host Commands
wemux start
Use wemux start to start a wemux server, chmod /tmp/wemux-wemux to 1777 so that other users may connect to it, and attach to it. If a wemux server already exists, it will attach to it instead."
https://github.com/zolrath/wemux/blob/master/README.md

Mine had the group permission set to 0. If I chmod that directory as instructed, and call "mux SESSIONNAME" as usual, it works.

over 1 year ago ·

I did a quick test with the following equipment:

  • host: fedora. starts the wemux server by invoking tmuxinator.
  • user: ssh from another computer into a user account of the Fedora host.

On host (server), I did the following 5 commands as a test:

  • mux MYSESSION

    The session starts well. I check from remote computer by ssh into a user account, and get "No wemux server to attach to on 'wemux'".message

  • ctrl-b, d
    To detach and go back to prompt

  • ls -la /tmp
    To check permissions on wemux-wemux. Permissions are 660.

  • chmod 1777 /tmp/wemux-wemux

    Change according to README

  • ls -la /tmp # to double-check permissions on wemux-wemux

So it appears to be a problem with the permissions of the socket. That doesn't explain the first problem I had with renaming the wemux default host. Obviously the socket name changes but I couldn't get it to start in the first place by changing that. I don't have the time to check it out. It's what the session name is in tmuxinator that is important. There is no need to change the default server name in wemux config if using through tmuxinator anyways.

I'm out of time. I just wanted to do a quick test as I am trying it out now...

over 1 year ago ·

And Fedora currently had version 1.9A in it's repo..

over 1 year ago ·