From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: tramp:sshx:(screen|tmux) Date: Thu, 07 May 2015 09:33:29 -0400 Organization: disorganization Message-ID: References: <87mwa7d1g6.fsf@gmx.de> Reply-To: sds@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1431005661 12974 80.91.229.3 (7 May 2015 13:34:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 13:34:21 +0000 (UTC) Cc: Vitalie Spinu To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 07 15:34:08 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqLwF-0007lS-RS for ged-emacs-devel@m.gmane.org; Thu, 07 May 2015 15:34:07 +0200 Original-Received: from localhost ([::1]:51085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqLwF-0006Ty-6q for ged-emacs-devel@m.gmane.org; Thu, 07 May 2015 09:34:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqLwA-0006Tf-PC for emacs-devel@gnu.org; Thu, 07 May 2015 09:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqLw3-00030o-JB for emacs-devel@gnu.org; Thu, 07 May 2015 09:34:02 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqLw3-0002zn-D9 for emacs-devel@gnu.org; Thu, 07 May 2015 09:33:55 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YqLvx-0007am-K5 for emacs-devel@gnu.org; Thu, 07 May 2015 15:33:49 +0200 Original-Received: from 66.9.135.66 ([66.9.135.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 May 2015 15:33:49 +0200 Original-Received: from sds by 66.9.135.66 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 May 2015 15:33:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 66.9.135.66 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Cancel-Lock: sha1:vcJ+VJC8Mapc/enBc+sJeQeyMVM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186315 Archived-At: > * Svend Sorensen [2014-09-10 17:22:51 -0700]: > > joakim@verona.se writes: > > > Michael Albinus writes: >> >> I have used dtach for this, albeit in a slightly different context. >> Maybe dtach can be of use for tramp? > > I use the following function to start a remote shell running dtach. > > (defun ssh-dtach (host) > "Open SSH connection to HOST and start dtach session." > (interactive (list (ssh-host-completing-read))) > (let ((explicit-shell-file-name "dtach") > (explicit-dtach-args '("-A" "/tmp/emacs.dtach" "-z" > "/bin/bash" "--noediting" "-login")) > (default-directory (format "/ssh:%s:" host))) > (shell (format "*ssh %s*" host)))) It turned out that dtach does indeed do what I need: http://stackoverflow.com/questions/16819248/emacs-tramp-over-an-unreliable-connection (defvar R-remote-host "remote-server") (defvar R-remote-session "R") (defun R-remote (&optional remote-host session) "Connect to the remote-host's dtach session running R." (interactive (list (read-from-minibuffer "R remote host: " R-remote-host) (read-from-minibuffer "R remote session: " R-remote-session))) (pop-to-buffer (make-comint (concat "remote-" session) "ssh" nil "-t" "-t" remote-host "dtach" "-A" (concat ".dtach-" session) "-z" "-E" "-r" "none" inferior-R-program-name "--no-readline" inferior-R-args)) (ess-remote (process-name (get-buffer-process (current-buffer))) "R") (setq comint-process-echoes t)) -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1347 http://www.childpsy.net/ http://memri.org http://mideasttruth.com http://thereligionofpeace.com http://www.memritv.org http://think-israel.org Democrats, get out of my wallet! Republicans, get out of my bedroom!