background preloader

Shells & SSH Sessions

Facebook Twitter

eShell

Running Shells in Emacs: An Overview. To use Emacs effectively, you must learn to use all that Emacs has to offer.

Running Shells in Emacs: An Overview

One of Emacs’s strongest selling-points is its shell integration and terminal emulation. If you come from other editors or IDEs you’re probably using an external terminal window (like xterm), a terminal multiplexer (like GNU Screen) or console window (in Windows) and switching back and forth. But there’s a better way… If you use Emacs as your shell you will have all the functionality that Emacs provides plus you get almost all of the advantages provided by the shell itself, but built into Emacs. This article is only a quick overview of all the shells: I plan on tackling each one, in-depth, later on. All external, interactive shells in Emacs are derived from something called comint-mode. comint-mode introduces low-level functions for dealing with interactive shells that require user input, a history ring, and so on.

The Inferior Shell ("Shell Mode") Emacs and tmux - PerlStalker's SysAdmin Notes. Hello.

Emacs and tmux - PerlStalker's SysAdmin Notes

My name is PerlStalker and I’m an emacs user. I love emacs and use it for nearly everything but there are a few things it’s not good at. (“Like editing,” I hear all you warped vi users cry.) Among them, and most important to me, are window management and terminals. Let’s start with terminals. My main use of terminals, however, is logging into Linux servers and making changes. The other thing that emacs is bad at is window management. However, something that is good at handling window layouts and shells is tmux. The super secret ingredient to all of this is emacs server and emacsclient. Now to how this all works with tmux. The first problem I needed to solve was to quickly and easily ssh into servers.

Bind-key S command-prompt -p "host" "split-window 'ssh %1'" bind-key C-s command-prompt -p "host" "new-window -n %1 'ssh %1'" Tramp Mode. TRAMP (Transparent Remote Access, Multiple Protocols) is a package for editing remote files, similar to AngeFtp or efs.

Tramp Mode

Whereas the others use FTP to connect to the remote host and to transfer the files, TRAMP uses a remote shell connection (rlogin, telnet, ssh). It can transfer the files using rcp or a similar program, or it can encode the file contents (using uuencode or base64) and transfer them right through the shell connection. Tramp was formerly called RCP or rcp.el. It allows you transparent access to files on remote access. “Transparent” means that usually the user doesn’t have to worry about anything. You can speed up Tramp by using ssh’s “ControlMaster?” A good alternative to Tramp that doesn’t do anything at the Emacs level is sshfs. Obtaining TRAMP TrampMode is a part of Emacs starting with version 22.1. You can get it from here: TRAMP User Manual. Table of Contents This file documents TRAMP version 2.2.9, a remote file editing package for Emacs.

TRAMP User Manual

TRAMP stands for ‘Transparent Remote (file) Access, Multiple Protocol’. This package provides remote file editing, similar to Ange-FTP. The difference is that Ange-FTP uses FTP to transfer files between the local and the remote host, whereas TRAMP uses a combination of rsh and rcp or other work-alike programs, such as ssh/scp. You can find the latest version of this document on the web at The manual has been generated for Emacs. The latest release of TRAMP is available for download, or you may see Obtaining Tramp for more details, including the Git server details. TRAMP also has a Savannah Project Page. There is a mailing list for TRAMP, available at tramp-devel@gnu.org, and archived at the TRAMP Mail Archive.

Copyright © 1999–2014 Free Software Foundation, Inc. 1 An overview of TRAMP The package provides support for ssh connections out of the box, one of the more common uses of the package.