This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Terminal window hostname always showing


On 25/04/2015 09:23, AC wrote:
Is it possible to turn off the automatic hostname that the window
manager is adding to terminal windows?

Yes, use the X server option -nohostintitle.

Right now, on any machine I log into, they all use escape sequences to
set the title of the window.  However, the window manager (not sure
which I have, looks like xorg-server) on the Cygwin system is adding a
hostname to the title.

I'm using the bash escape sequence "\u@\h: \w" which is supposed to give
me the user and the short name of the host (minus the domain) and the
path.  However, all my terminals on the Cygwin system end up like this:

user@host: ~ @host.example.com

Thanks for pointing out this issue.

If I change the escape sequence on the remote machine to use the full
hostname, the result on the Cygwin system is:

user@host.example.com: ~

It seems to me that the window manager is interpreting the data in the
escape sequence and opting to put a hostname on the title if it can't
find one that matches the connection.

Almost. When -hostintitle is enabled, the WM adds the contents of WM_CLIENT_MACHINE to the window title, unless it already seems to be there.

I've tried to tweak this heuristic a bit in X server 1.17.1-3 so that
if WM_CLIENT_MACHINE contains something that looks like a FQDN, it only looks for the hostname part, not the whole thing.

--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]