7 ms·
Uses of Tmux Explained
- detcherry 13y agoNice presentation!
- syldor 13y agoI heard about tmux at work two days ago, very powerful, nice prez.
- aroemers 13y agoTmux is great for working together with someone. Syme[1] uses tmux as well, and allows you to quickly program on a GitHub project with others, without setting up a server or needing to add users. I think this is relevant, as it shows the convenience of tmux. [1] https://syme.herokuapp.com/ https://syme.herokuapp.com/
- Makkhdyn 13y agoThis is what I use with Tmux: https://github.com/sorin-ionescu/prezto/blob/master/modules/tmux/init.zsh https://github.com/sorin-ionescu/prezto/blob/master/modules/... Basically a daemon session is started (if it wasn't there before) and every terminal you open automatically connects to that session. This means that you can close every terminal, the session is still open and new terminals will use the already existing session. As long as tmux itself isn't stopped (reboot, etc.) you'll stay in the same session. Which is cool because everything is de facto detached.
- spolu 13y agoThat's a pretty cool setup. These slides have been prepared for a 4mn lightning talk so I had to keep things simple and short enough! Anyway, I really like your setup. I'm thinking these days about writing my own terminal multiplexer just for fun using node.js. I already have the VT emulation part ready so there's no that much work left to do. Do you have any feature you don't have in tmux that you would love to see in a terminal multiplexer or is tmux just right for you?
- spolu 13y agoBTW if someone is interested by a reusable VT emulation library in javascript: https://github.com/spolu/vt.js https://github.com/spolu/vt.js
- simias 13y agoBy Thor, are image macros really necessary? It seems you can't have a technical presentation these days without some silly generic "memes" sprinkled all around, it's ridiculous.
- spolu 13y agoIt's just serve the purpose of trying to keep the audience waken up. Nothing more.
- CatMtKing 13y agoI thought they were pretty amusing :)
- groby_b 13y agoYou need something, yes. The purpose of a presentation is to be entertaining enough that your audience will not be bored to tears, and will actually still care about the subject after you're done. Images work well, because they evoke a more emotional response. Memes are there for a different reason - they are a non-verbal way of saying "hey, we're all part of the same subculture. I'm one of you!". Yes, presentations are to some extent an exercise in psychology, at least when they're good. If you just want to convey info, a whitepaper/article is a better choice. Information density is much higher there.
- remi 13y agoSince this is a post about tmux, I feel obligated to tell you about teamocil (http://teamocil.com http://teamocil.com) a small utility I wrote to automatically create sessions, windows and panes in tmux with YAML files :)
- davesims 13y agoTeamocil is usually the thing I show non-tmux users, that then makes them want to use tmux. Awesome utility, Remi, great job! (with apologies to Tim and Eric)
- spolu 13y agoLooks really useful.
- robotmay 13y agoOh god I've been needing this in my life.
- jenius 13y agohey man, this looks great but will it reduce your sex drive?
- foobarbazqux 13y agoI think hallucinations are a side effect.
- Kluny 13y agoYour site hijacked my back button, so we're not friends anymore.
- lambda 13y agoHow did it hijack your back button? My back button works perfectly fine navigating to and from this site.
- 13y ago
- digitalsushi 13y agoThese slides are always so out of context without hearing the audio presentation, or better, seeing the video of the presenter.. when I flip through these slideshows with the mem/macros/whatever they are called, I always imagine the audience sitting there, forced smiles, maybe a cough, and then on to the next slide. These should be refactored after the local presentation. Like how episodes of The Simpsons will cull out really topical jokes that won't be funny in a month for the sake of syndication. tmux is cool, and wemux is a tool we use regularly to share sessions. I am an old screen guy and appreciate that there is something similar being produced, as both products get invigorated by new features and bug fixes. I believe there is even a screenrc mode for tmux so that I can keep my muscle memory - what a great feature!
- kingnight 13y agoThe Simpsons does this? I believe it but had no idea. Do you have a reference.
- digitalsushi 13y agoI do not have a reference. You'll have to live with accepting what I remember from my childhood as being correct, I am afraid. Or, searching.
- snowwrestler 13y agoThe reason the Simpsons cut material is that shows in syndication have a shorter running time to permit more ads to run during them. It's more noticable than usual with the Simpsons because the joke density is higher than most sitcoms.
- spolu 13y agoThe presentation will actually take place tomorrow. I'll do my best to be entertaining!
- ktr 13y ago
- boothead 13y agoSo as a user of emacs, a user of tmux, and the soon to be recipient of a dell XPS 13 which I intend to dock at home with a very big screen and use with Xmonad... Do I need tmux? It seems to fall between the gaps between easily switching between panes and applications, which you can do with Xmonad and what you can do with buffers in emacs. With my previous setup I used tmux to run all my deamons (web servers I was developing on, continuous coffeescript and less building etc) in one terminal, but I'm not sure there was a huge benefit vs just opening a new terminal for each process (in hte same workspace) and using Xmonad to manage the layoutt/switching. Am I missing a trick here?
- mercurial 13y agoIt's useful if you need to connect to a remote server and leave stuff running after you disconnect. Otherwise... you already have a window manager.
- spolu 13y agoI definitely agree that the multi window/pane feature of tmux can be repetitive of your window manager, especially if you use a tiled window manager. But at the same time I keep thinking that most people do not use their window manager to manager their browser tabs (despite the existence of surf (http://surf.suckless.org/ http://surf.suckless.org/). Why? Not sure...
- mercurial 13y agoIt's much more useful to have several terminals displayed on the same screen. On the other hand, 20-30 tabs? Not so much.
- spolu 13y agoTmux can be extremely useful to bootstrap a working environment rapidly. We use it to connect to our mongo replica set rapidly without having to ssh into each machine. See the comments below there are a few tools to help you do that. Tmux is also extremely useful for pair programming: you can multiplex PTYs but you can also have multiple screens attached to the same session. It's a killer feature especially when working remotely with your team.
- eatitraw 13y agoI love tmux and I use for my daily work. I switched from screen after reading this awesome book: http://pragprog.com/book/bhtmux/tmux http://pragprog.com/book/bhtmux/tmux
- zacharydanger 13y agoSeconded. That book make tmux usable for me. I switched from Screen and haven't looked back since.
- bloodorange 13y agoIf one likes tmux, may I recommend having a look at 'byobu'. It's built to use either tmux or screen as a backend and provides some features that make life slightly easier than using barebones tmux or screen. However, I must warn that it is just a matter of convenience and it doesn't really add anything significant.
- agumonkey 13y agoDon't want to sound too greedy, but I can't wait for your following tmux presentation ;)
- kps 13y agoI have a feeling tmux would be useful to me, but it seems to be one of these things where all the documentation is useless unless you already understand it. I understand it's a terminal multiplexer: so, on the one side, I have one or more terminals (typically pseudo; X or ssh in my case), and one or more ∗nix sessions (typically each a single process group; shells and their children like editors). In between sits tmux, with its 'sessions' and 'windows' and 'clients' and 'buffers' and 'panes'. What are these things, how are they related, and how do they correspond to ∗nix sessions and terminals? Or have I got it all wrong? http://i.imgur.com/zJGunty.png http://i.imgur.com/zJGunty.png
- ihodes 13y agoI just wrote a little blog post that explains these terms and gives you my basic use-case for tmux. Let me know if it's helpful? http://copperthoughts.com/p/tmux-simply-explained/ http://copperthoughts.com/p/tmux-simply-explained/
- elwin 13y agoWhen you type "tmux" into a terminal, that starts a client. A client is the instance of tmux that's running in your terminal emulator. tmux manages a collection of pseudoterminals, and clients display whatever is going on in that collection. (Warning: some oversimplifications.) This collection of pty's is called a session. Each pty within it is called a window. When you start, there will be one session containing one window. You can add more windows (C-b c) and switch the one your client is currently viewing (C-b p, C-b n, etc.) Each new window will start a shell that you can use to run programs independently. Detaching (C-b d) means disconnecting your client from the session and exiting. Attaching ("tmux attach") reconnects to the session. Multiple sessions and multiple clients are an advanced topic. Don't worry about them yet. Unix sessions are unrelated to tmux sessions. Technically, each pty managed by tmux has its own Unix session. Buffers and panes are advanced topics. Buffers help with copying and pasting; panes let you split windows into multiple pty's. Don't worry about either of them yet.
- kps 13y agoThanks. I'm primarily interested in the m:n case, but your explanation has given me the right terminology to use in searches.
- ikusalic 13y agoI've written a CLI (ruby gem: tmux-connector) that uses tmux to help you handle connections to multiple servers with ease. I use it on a daily basis to manage ec2 instances. https://github.com/ikusalic/tmux-connector https://github.com/ikusalic/tmux-connector
- urza 13y agoah you see thanks for reminding me of this thing I wanted to try: http://byobu.co http://byobu.co
- lsiebert 13y agoI would use only tmux instead of a wm/de if I could get 256 colors with it in fbterm.
- jholman 13y agoEvery slide that says "tmux (screen)" should say "tmux (client)". This is especially true because when people who view these slides google for more information, and they google for "tmux screen", they're gonna get rants about tmux vs screen. EDIT: also, I would suggest renaming this to "elementary uses of tmux explained". Because obviously this is like 1% of the use of tmux (but the best 1% to start with, imo!)
- barrkel 13y agoI sit beside a coworker who wrestles with tmux daily. He likes it, but it also frustrates him; it crashes semi-regularly, it sometimes locks out input when one program is spamming one of the tiles, and due to it intrinsic nature you can no longer select-copy large blocks of text with the mouse if you have any vertical splitters. The lack of block text select-copy is alone enough to keep me away. Most of the other benefits can be gotten with screen, with better reliability and performance. I use several customized .screenrcs for various tasks, to get started up quickly every reboot. But I don't run screen in every terminal because native scrollback buffer is too valuable.
- kawsper 13y ago> But I don't run screen in every terminal because native scrollback buffer is too valuable. I feel the exact same way. Scrolling inside screen is just a pain :(
- zaius 13y agoMac specific, but hold option+command when selecting and you can select in block mode.
- blantonl 13y agowow, thank you for that. That just made my use of tmux that much easier!
- barrkel 13y agoBlock mode selects don't know whether to wrap lines or not; most half-decent terminals keep track of whether wrapping was due to carriage return or hitting the last column. I do this all the time to e.g. select deleted files from a git status command so I can xclip paste the selection out through awk to xargs git rm (or rather, use some scripts which simplify the above). Similarly for rspec / cucumber test results to extract out the failures for use with $(<failures.txt) on repeated runs as I fix broken tests. I have a script that analyzes ruby stack traces, which I copy from the crashed session. All sorts of ad-hoc clickery, I rely on word wrap being detected consistently.
- spydum 13y agoSo.. I never really understood why we need tmux/screen beyond some vanity things like running irc clients. Most applications should have sufficient log output to a file. Editing a document, want to return to it later? Save the thing. Not sure I understand why people would be so excited about this tool?
- snogglethorpe 13y agoThe traditional monster use-case for screen is making your login session independent of the terminal connection. So you can do your work from home, detach your screen session, go to work, re-attach from work, and continue where you left off. If your terminal connection dies, you can just re-attach from a new connection. It also offers other convenient session management functions like multiplexing of multiple shells (maintaining a separate screen image and scrollback for each), cut-and-paste, etc., but the above is the big one I think.