Can’t run “ssh -X” on MacOS Sierra

I didn’t need to reinstall XQuartz, but, based on Matt Widjaja’s answer, I came up with a refinement. sudo vi /etc/ssh/ssh_config (This is ssh client config, not sshd_config) Under the Host * entry add (or add where appropriate per-host) XAuthLocation /usr/X11/bin/xauth (The location of xauth changed in Sierra) ServerAliveInterval 60 (Pings the server every 60 … Read more

Vim: Difference between t_Co=256 and term=xterm-256color in conjunction with TMUX

When you don’t use tmux or screen, you only need to configure your terminal emulators to advertise themselves as “capable of displaying 256 colors” by setting their TERM to xterm-256color or any comparable value that works with your terminals and platforms. How you do it will depend on the terminal emulator and is outside of … Read more

Is there a linux command to determine the window IDs associated with a given process ID?

xwininfo and xprop permits to retrieve what you want, but it is a little tricky. xwininfo permits to retrieve all known windows, and xprop to query X about a single window ID for your _NET_WM_PID parameter. So far, a hacky way to do it would be: #!/bin/sh findpid=$1 known_windows=$(xwininfo -root -children|sed -e ‘s/^ *//’|grep -E … Read more

Bind Ctrl+Tab and Ctrl+Shift+Tab in tmux

Recent “unreleased” versions of tmux do automatically recognize those xterm-style key sequences once you have your terminal sending them (no need to change your terminfo entry). The next release version (1.8?) should also have this support. With an appropriate build of tmux1, all you have to do is bind the keys in your tmux configuration: … Read more

Set screen-title from shellscript

You can set the screen / xterm title using the following lines: #!/bin/bash mytitle=”Some title” echo -e ‘\033k’$mytitle’\033\\’ [UPDATE] – by request I’m also including the solution proposed by @Espo below: Depending on your xterm version or your linux distribution the line above may or may not work and you can try the xterm-defaults: #!/bin/bash … Read more