From owner-freebsd-questions Thu Feb 5 17:07:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA14257 for questions-outgoing; Thu, 5 Feb 1998 17:07:11 -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 RAA14204 for ; Thu, 5 Feb 1998 17:06:45 -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 LAA06800; Fri, 6 Feb 1998 11:35:24 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id LAA18448; Fri, 6 Feb 1998 11:35:24 +1030 (CST) (envelope-from grog) Message-ID: <19980206113524.54855@freebie.lemis.com> Date: Fri, 6 Feb 1998 11:35:24 +1030 From: Greg Lehey To: Burton Sampley , questions@FreeBSD.ORG Subject: Re: Dynamic title in XTerm bound to F8 (fwd) References: 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 03:42:22PM -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 15:42:22 -0800, Burton Sampley wrote: >> From: Burton Sampley >> >> I have been trying unsuccessfully to bind the appropriate sequence of >> escape characters to dynamically change the title of an xterm window to >> F8. >> >> (snip) >> >> Is there an easier way to accomplish what I want? BTW, I can't modify >> .cshrc on the remote boxes. >> >> I have tried using string() to send the hex values for the escape key, but >> that only seemed to echo the correct sequence to the display and would >> only chime the bell. > > First, I apologize for cross posting this message to both questions and > isp mailing lists. I don't understand why this should interest the ISPs, so I'm replying only to -questions. > I thought maybe a freebsd user has experienced this problem and has > a solution I could use. Yes, indeed. I have a program called xtset which does exactly what you're looking for. I've put it on ftp://ftp.lemis.com/pub/xtset.c (source) and ftp://ftp.lemis.com/pub/xtset (executable). Unfortunately, in the course of time, I seem to have lost the man page. The only documentation is in the source: + Passed a string to set the window title and / or icon name to and this string + is text except for % characters which introduce fields like printf. + + %h is translated to hostname, excluding domain name + %H is translated to hostname, including domain name if gethostname returns it + %d is translated to current dir + %D is translated to current dir, only last part (unless this is src, man, doc, etc., in which + case the previous part is included as well) (Greg Lehey, 4 June 1993) + %u is current user name + %g is current group name + %U is current real user name + %G is current real group name + %m is octal current umask + %e is value of environment variable XTXTRA or null string + %t is the complete name of the stdin terminal, if it is a terminal + %T is the last part of the stdin file name, if it is a terminal + %% is a real percent sign, God knows why you'd want one but there you are + + So for instance the string: + + "%d@%h (%u:%g)" might expand to "/home/sol/msmith@rheya (msmith:group2)" + + command line arguments are: + + -t to update window title + -i to icon name + + (if neither of these are given, both are done) + + The program exits silently if the TERM variable is not set to xterm Greg