From owner-freebsd-questions@freebsd.org Tue Dec 22 17:19:17 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EFDEA4EDDE for ; Tue, 22 Dec 2015 17:19:17 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B302C1040 for ; Tue, 22 Dec 2015 17:19:16 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from ox-dell39.ox.adestra.com (no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged)) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.2/8.15.2) with ESMTPSA id tBMHJ5ho020641 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 22 Dec 2015 17:19:06 GMT (envelope-from m.seaman@infracaninophile.co.uk) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=infracaninophile.co.uk DKIM-Filter: OpenDKIM Filter v2.10.3 smtp.infracaninophile.co.uk tBMHJ5ho020641 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1450804746; bh=3gRJ/5XWjN7Tm5zRjqYQhO2t7xKaT/PZTS6rZ1fWL3o=; h=Subject:To:References:From:Date:In-Reply-To; z=Subject:=20Re:=20Place=20servername=20in=20TAB=20iTerm|To:=20free bsd-questions@freebsd.org|References:=20<56794339.3080106@gmail.co m>=0D=0A=20<20151222123933.GA3974@c720-r285885-amd64>=20<56794743. 5040808@gmail.com>|From:=20Matthew=20Seaman=20|Date:=20Tue,=2022=20Dec=202015=2017:19:05=20+0000|In -Reply-To:=20<56794743.5040808@gmail.com>; b=JuBKfaF4PNxwZgeC+vkKrepSwt9o/un36yN8qnoz25gKYByMT1CbCn7qOwysPKWci qNzBRKKNdkU1h7glCX89kbEqjWJcXKIISyMkZbBYQab7DBZDBV85COwQ+KlhSDvYk2 8ArlFjR2WEysreT9/cMU6INLBBLILmFA56mBdITA= X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged) claimed to be ox-dell39.ox.adestra.com Subject: Re: Place servername in TAB iTerm To: freebsd-questions@freebsd.org References: <56794339.3080106@gmail.com> <20151222123933.GA3974@c720-r285885-amd64> <56794743.5040808@gmail.com> From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <56798609.4030104@infracaninophile.co.uk> Date: Tue, 22 Dec 2015 17:19:05 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <56794743.5040808@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dIpq2iS8U7dP6oeuOvchc3AKNMjiWCqXN" X-Virus-Scanned: clamav-milter 0.98.7 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 17:19:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dIpq2iS8U7dP6oeuOvchc3AKNMjiWCqXN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/22/15 12:51, Johan Hendriks wrote: > Thanks that works, can this be automated when I log in >=20 > regards > Johan >=20 > Op 22/12/15 om 13:39 schreef Matthias Apitz: >> El d=C3=ADa Tuesday, December 22, 2015 a las 01:34:01PM +0100, Johan H= endriks escribi=C3=B3: >> >>> Hello all. >>> >>> I use iTerm on my mac. >>> When I connect to a Linux (Ubuntu) machine, in the TAB the name off t= he >>> server appears. >>> If I connect to a FreeBSD machine it just shows me ssh. >>> How can I change the name off the TAB in iTerm (and other terminal >>> programs) to show the servername. >>> I use the standard csh. BTW if i use portmaster then it renames the t= ab >>> also to what portmaster is doing. >>> >>> I do not know what I need to change to get the same behauviour as Lin= ux >>> >>> Thank you for your time. >> I can only speak for xterm and urxvt terminals (and maybe for iTerm on= >> Mac you should consult its documentation or mac user forums); I have a= >> script 'ti.sh' which says: >> >> >> #!/bin/sh >> printf "\033]0;$1\007" >> >> and when I run this as '~/ti.sh blabla' it puts 'blabla' in the titel >> bar of the terminal. Given you're using tcsh, try something like this in your .tcshrc: set prompt =3D "%B%m%b:%c03:%# " if ( $?TERM ) then switch ($TERM) case xterm: case xterm-color: set prompt =3D '%{\033]0;%n@%m:%/\007%}%B%m%b:%c03:%# ' breaksw case screen: set prompt =3D '[%B%m%b]:%c03:%# ' breaksw default: set prompt =3D '%B%m%b:%c03:%# ' breaksw endsw endif That sets your prompt to look like eg. lucid-nonsense:~:% (except the hostname bit is in bold) and for any terminal that behaves like an xterm -- which includes both Terminal.app and iTerm.app -- it sets the title bar to eg matthew@lucid-nonsense:/home/matthew The other cases in that switch statement are used for different terminal types. Cheers, Matthew --dIpq2iS8U7dP6oeuOvchc3AKNMjiWCqXN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJWeYYJAAoJEABRPxDgqeTnu3oP/0jf/iBWvfCv6r77TaSXq0J/ mMHyuU/VftCXRbZurInDuXqiBI90OtJVq9ieoxZmw+38XaossvhKCWe7M9svl43O N9WreCDUXeAr+aLK461iHuuGLe3RNngumecOtx1shdgPZC0vDMU81kQvid1mtJdm VB3kyE65aOURI/3tdrXcRy/mM3T3DjCtzqx4n5a54C676GveOMKVLYl1X0C8anPZ GMftB4ImYaDHAYMMejYvHBP2NB4bh0FtIP2Rbvt/YnRr4ZKS76vrirpGFDFZ2HDI J7CuZyjaOPxaZ2owYRLtazePvT9LRC9666Cfv3b2tFupWFC8n6a/YfwhOp40JWa0 0DPx5iWSsVf5gZnXCxVJaArYmeKlBHTfHgXan3pmdQhpK6WMX/FgbSvh+BfOyWhF JG201CoWw7qEog/jBPwxYzkxT8a/TjYzMpjND9GpeM+3Bl7/UsLbuLyHtvfm4bsf cOgUl3EaSq5G1/bN1/RPJYIY69oM/MbLAXT570jEgSx+jpWgZj2/qp8NI+/S5gRp NS6F/f8Ab5LLEfHksfZG32F3gRGSN4angNcI9ovMiDNmfwXD4j59DzE62A67bKMr I4DNEbAJVnmJbsM/2ASH/F14WP/J4GGTyhRkj6rZNmJVxQv9lkExCmGXaIsJoYEQ YDdvGVR9jFaXITe6ZywC =WuPx -----END PGP SIGNATURE----- --dIpq2iS8U7dP6oeuOvchc3AKNMjiWCqXN--