Live data from Hacker News

Using tmux properly

danielallendeutsch.com

91–100 of 218 posts

Re: Using tmux properly

#91
Most people use tmux locally, because their terminal emulator doesn't do what they need it to do, or the window manager doesn't do it. Using tmux locally merely supplements the window manager. I stopped using tmux locally after switching to i3 (and I believe any other tiling / proper wm would do). Now my only use case for tmux is on the server where I'm running weechat. When sysadmining, it's eaiser for me launch few terminals in my window manager and ssh to the same server, then running tmux remotely. It's simply a question of ergonomics, how many sets of keyboard shortcuts do you need to remember to handle a multiplex... eh, window manager running inside a window manager?

Re: Using tmux properly

#92

So this may mark me out as different, but apart from persistent remote connections, I've never really felt the need for screen/tmux. I've been trying to figure out what the fuss is about, and I still really don't understand (apart from persistence and screen sharing.) When I want multiple terminals, I just fire up another terminal window and hey presto, jobs a goodun. I have a fairly high res screen and small fonts,…

Vim + tmux with custom bindings makes moving between vim and a terminal seamless. The same keystrokes for moving between panes in vim can be used to move to tmux panes. Also, as a vim user I loathe to reach for the mouse, so having quick and easy keybindings for launching and arranging tmux panes is great and preferred to the imperfect and slow arrangement using a mouse. Lastly, I can have tabs and window panes that…

Hey, I contributed to that script! I love it to death.

https://www.reddit.com/r/vim/comments/22ixkq/navigate_around...

Another way to think about tmux is that it frees up text editors like Kakoune [1] from having to deal with window management.

[1] Discussed recently at https://news.ycombinator.com/item?id=10484653

Re: Using tmux properly

#93
post #81

Earlier quoted context omitted.

I do 90% ops stuff and never have this issue with tmux, so I'm curious what your workflow's like. Why not just have tmux running on your host machine and ssh from a tmux window?

It preserves the shell, history and outputs if the ssh session is dropped.

Fair enough. My personal workaround (though, hacky, I guess) is to use screen for preserving the shell. It has a slight advantage of being more accessible, since more people know screen than tmux.

Re: Using tmux properly

#94

I basically use tmux as my window manager. I only typically open two programs: a browser, and a terminal. Both are always in full-screen mode. It makes things nice and simple. No matter if I'm working on a laptop or a desktop, all my terminal windows end up in the same place and have the same settings. It's great!

Me too, and it's great and even works on Windows with Babun :-) If I use tmux as window manager, I don't have the problem with installing fluxbox etc. on Windows :-)

Re: Using tmux properly

#95

So this may mark me out as different, but apart from persistent remote connections, I've never really felt the need for screen/tmux. I've been trying to figure out what the fuss is about, and I still really don't understand (apart from persistence and screen sharing.) When I want multiple terminals, I just fire up another terminal window and hey presto, jobs a goodun. I have a fairly high res screen and small fonts,…

The problem with opening multiple terminals is that you will eventually be slowed down in your workflow. Say you want to switch to a particular terminal, and you have more than 10 terminals running. You either have to press CTRL+Tab a few times (5 times on average for 10 terminals), or switch using the mouse, both of which are slow.

Another problem is working remotely. If you connect to a remote server, and you need another terminal for that remote server, you must establish another separate connection. With a terminal multiplexer, you do not need that.

Re: Using tmux properly

#97
post #33

Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, f…

Put your dotfiles under version control. Open a repository for them on github. A complete personal install on a fresh box is just useradd and git clone away. Two commands to paradise.

Google dotfiles in git. It's easier than you think.

Re: Using tmux properly

#98

So this may mark me out as different, but apart from persistent remote connections, I've never really felt the need for screen/tmux. I've been trying to figure out what the fuss is about, and I still really don't understand (apart from persistence and screen sharing.) When I want multiple terminals, I just fire up another terminal window and hey presto, jobs a goodun. I have a fairly high res screen and small fonts,…

The problem with opening multiple terminals is that you will eventually be slowed down in your workflow. Say you want to switch to a particular terminal, and you have more than 10 terminals running. You either have to press CTRL+Tab a few times (5 times on average for 10 terminals), or switch using the mouse, both of which are slow. Another problem is working remotely. If you connect to a remote server, and you need…

iTerm works with Cmd-[0-9] just fine.

Re: Using tmux properly

#99
post #51

Earlier quoted context omitted.

It gets worse when you work in ops and are constantly needing to remote into servers and you regularly have tmux within a tmux within a tmux... Littering config files across the datacenter just isn't an option.

I learned to give up making things exactly to my liking and learn to use the default key bindings. Now I can log into any machine and be 100% productive.

Yeah, this is a good approach. I have memorized how to set up three settings for vim I just have to have, but I can usually do that in less than a minute.

Re: Using tmux properly

#100

Earlier quoted context omitted.

That's why I have public dotfiles. Also this situation happens rarely. The whole beauty of software is that you can customize it and make it your own. The only downside I see with customization is that it can be huge timesink. I guess to each his own, but I think you're really missing out. P. S. Backups.

Regardless of the frequency of such a situation, it can really bite you when something big breaks and you need to ssh into a vanilla server in the middle of the night under pressure. Trying to fix a production fire under the gaze of an angry CEO is stressful enough, but not being able to take care of business on a box because of a missing personal config is truly one of the worst experiences I've ever had in this bus…

Keep your dot files in github. Grab them. No internet, I bet you have them on your laptop that you are ssh'd to the server from. SCP them over. Heck, cut and paste them if needed. If things are so bad nether of these work you have bigger issues and need to consider a design with some redundancy. Clos fabrics and VM/containers and if you have to have bare metal then you should have more then one (cluster or behind a SLB).

There is no excuse for a single point of failure in 2017. Not trying to sound like an ass but....

You did say it was years ago, so what I said seems to be true for today, no judgment on your situation years ago. My first major shit, got to fix it was on Solaris 2.51 so that shows my age.

I bind bash and tmux to vim keymaps. If that is not on the box it is the first thing I fix. I will be fast to resolve the issue if my fingers just work as I have trained them :)

Post reply on HN