help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: setting the window title for remote shell


From: Michael Albinus
Subject: Re: setting the window title for remote shell
Date: Sat, 12 Apr 2014 12:07:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Ross Boylan <ross@biostat.ucsf.edu> writes:

> MAIN QUESTION
> I often ssh through a series of systems, run screen on the last
> system, start emacs in the screen window and then start up a bash
> shell.  I would like it if the system window title reflected the
> system, and possibly the directory, I am in.

This you could also achieve from a local Emacs with Tramp. Just open
"/ssh:usera@hosta|ssh:userb@hostb|ssh:userc@hostc:". Then you could
still open your bash shell by "M-x shell".

Anyway, you could use `frame-title-format' for setting the title of
Emacs' current frame (which is a window, if you run Emacs under a
window manager). If you use Tramp as said above, you could set

(setq
 frame-title-format
 `(:eval
   (format
    "%s@%s:%s"
    (or (file-remote-p default-directory 'user) (user-login-name))
    (or (file-remote-p default-directory 'host) (system-name))
    (or (file-remote-p default-directory 'localname) default-directory))))

If you don't mind to see als Tramp's method in your frame title, it
would suffice to set

(setq frame-title-format `(:eval default-directory))

See the doc of `frame-title-format' (or `mode-line-format',
respectively) for other settings. Tramp is not necessary for that :-)

> Thanks for any help.
> Ross Boylan

Best regards, Michael.



reply via email to

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