iTerm2 Shell Integration
51–60 of 102 posts
Re: iTerm2 Shell Integration
#52I like the idea of these features, but the "run this random shellscript from the internet" part really bugs me. Could / will you integrate it another way when it comes out of the nightly releases?
The easiest way to install shell integration is to select the iTerm2>Install Shell Integration menu item. It will download and run a shell script as described below.
...you'll see: "Don't care for piping curl to bash? Do it by hand. First, download the right script for your shell...."Re: iTerm2 Shell Integration
#53Re: iTerm2 Shell Integration
#54I'd love to see something like iTerm for Windows.
Re: iTerm2 Shell Integration
#55I'd love to use a terminal with similar features on linux
When I still used Linux on the desktop, I just used urxvt.
Notably, keyboard-select allows you to cut/paste things into the X buffer from anywhere in the terminal scrollback using only keyboard shortcuts. url-select, conversely, allows you to cycle through any visible URLs and either open them in an external browser or copy them to the X buffer.
Re: iTerm2 Shell Integration
#56I'd love to use a terminal with similar features on linux
Terminator comes close, but to be honest, iTerm2 still beats it with its user friendliness and features. It's really interesting how OS X is the one that has a terminal emulator with the most features out there. iTerm2 now comes with 24-bit colors, command completion popup, notifications, triggers, profiles, mouseless copy, split panes, search, and you can even have inline images/gifs all out of the box with zero or…
In my experience, the vast majority of web developers use OS X. Those of us doing server side and devops work spend a lot of time in the terminal
Re: iTerm2 Shell Integration
#57Does it work with mosh ( https://mosh.mit.edu/ )? Thanks.
Re: iTerm2 Shell Integration
#58Earlier quoted context omitted.
Well, if all I have to do is run the script, I can just import it into my git repo (by submoduling iterm2's git repo, if they have one; if they don't, they need one just for this script), and just call it normally (with a bit of if wrapper to not execute on non-iterm2 terms).
Yes, all you have to do is source the script at https://iterm2.com/misc/${SHELL}_startup.in from your ~/.login, ~/.zshrc, ~/.bash_profile, or ~/.config/fish/config.fish as appropriate. If there's ever a major change you'll get a notification when you log in and you'll need to update it, but that hasn't happened yet.
Re: iTerm2 Shell Integration
#59Earlier quoted context omitted.
What do you use ProxyCommand for? It seems hard to support, but I'd like to know more.
I've used it in the past to ssh via bastion hosts and the like.
I have over 300 hosts defined in my .ssh/config file and it's indispensable to have all these options, especially when mixing in 2FA jump hosts into the mix.
Re: iTerm2 Shell Integration
#60Earlier quoted context omitted.
Thanks for your hard work and generosity. How should we think about the security story when sshing from a more trusted to a less trusted host?
Great question! When installing, especially on an untrusted host, follow the manual installation instructions. The menu item will just output a curl|bash command (currently; this will likely change in the future). If the host is really untrusted you're screwed, of course. Bad guys could modify your ~/.iterm2_shell_integration.bash and you'd never know. But this script is not special in any way (except that it's kinda…
I don't have a great solution to suggest for this. One option is to add some sort of per-user static password to the escape sequence, and insert it in the file that's copied to each (trusted) host, but that just seems questionable. A better one might be to make the communication use a socket instead of an escape sequence, and forward the socket (recent OpenSSH can forward UNIX domain sockets) to trusted hosts, but that's its own mess.
This is such a useful feature, though, especially with remote hosts. It'd be a pity if it can't be done securely. :/
(While we're on the subject of security, there's an obscure attack involving interrupting the download of a `curl | sh` script -- which a MITM can do, even over SSH -- and relying on the shell to execute a partial command line. I learned about this from the Sandstorm folks, who have a workaround in https://install.sandstorm.io/ involving the sh equivalent of an IIFE.)