emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp:sshx:(screen|tmux)


From: Sam Steingold
Subject: Re: tramp:sshx:(screen|tmux)
Date: Thu, 07 May 2015 09:33:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

> * Svend Sorensen <address@hidden> [2014-09-10 17:22:51 -0700]:
>
> address@hidden writes:
>
>  > Michael Albinus <address@hidden> 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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]