From owner-freebsd-questions Thu Feb 5 18:57:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA02779 for questions-outgoing; Thu, 5 Feb 1998 18:57:16 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA02768 for ; Thu, 5 Feb 1998 18:56:57 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id NAA06906; Fri, 6 Feb 1998 13:26:26 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id NAA19058; Fri, 6 Feb 1998 13:26:26 +1030 (CST) (envelope-from grog) Message-ID: <19980206132625.47987@freebie.lemis.com> Date: Fri, 6 Feb 1998 13:26:25 +1030 From: Greg Lehey To: Burton Sampley Cc: questions@FreeBSD.ORG Subject: Re: Dynamic title in XTerm bound to F8 (fwd) References: <19980206113524.54855@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: ; from Burton Sampley on Thu, Feb 05, 1998 at 06:15:01PM -0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" On Thu, 5 February 1998 at 18:15:01 -0800, Burton Sampley wrote: >> >> I don't understand why this should interest the ISPs, so I'm replying >> only to -questions. > > Thanks for the help. I've been 'banging my head against a brick wall' > trying to figure this out. I finally did figure out a solution shortly > after submitting my request for help. > > The reason I think ISP's might be interested is if they manage more than > one box using XFree86 and xterm. Well, sure, but that goes for just about everybody who uses xterms. I really don't think you should be spamming -isp with this. > It can be quite convent to just hit 1 single key to update the xterm > title to the hostname of the box they are currently working on, > especially if they need to minimize more than one xterm (ie, if > you're changing DNS entries on more than one DNS server). It would be a lot more convenient to have it happen automatically. Here's my cd script (bash): cd () { command cd $* xtset -t "%u (%T) %H:%D" xtset -i "%u@%H:%D" } This sets different strings for the title bar (longer) and the icon (shorter). > The solution is: > >> /.Xdefaults: > xterm*VT100.translations: #override\ > NoneF8: string("echo \\"^V^[]0;`hostname`^V^G\\"") \ > string(0x0d) \n\ > > In the above string, "^V^[" is produced with the following key sequence in > vi "ctrl-v ctrl-v ctrl-v esc" and "^G" is produced with "ctrl-v ctrl-g". > The \\ correctly escapes the inside set of double quotes. NOTE: I've > only tried this with csh and derivatives (ie, tcsh) on both ends. > > NOTE: For whoever's interested, in the command above, 0 specifies the > regular title and the minimized title; 2 will change only the regular > title and 1 will change only the minimized title. > > I verified this works by ssh'ing into several remote accounts and pressing > F8. It did what I wanted it to do. Sure, but it requires you to hit a key, and it takes away any other purpose that this key might have. Greg