From owner-freebsd-questions@FreeBSD.ORG Tue Aug 17 16:41:05 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A73FA16A4E4 for ; Tue, 17 Aug 2004 16:41:05 +0000 (GMT) Received: from mtiwmhc12.worldnet.att.net (mtiwmhc12.worldnet.att.net [204.127.131.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B0E443D49 for ; Tue, 17 Aug 2004 16:41:05 +0000 (GMT) (envelope-from duanewinner@worldnet.att.net) Received: from [10.10.100.91] (unknown[216.113.237.29]) by worldnet.att.net (mtiwmhc12) with ESMTP id <2004081716410411200lch3fe> (Authid: duanewinner); Tue, 17 Aug 2004 16:41:05 +0000 Message-ID: <4122351E.7040205@att.net> Date: Tue, 17 Aug 2004 12:41:02 -0400 From: Duane Winner User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040809 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <41222679.7080000@att.net> In-Reply-To: <41222679.7080000@att.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: xtset or xtermset tricks? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2004 16:41:05 -0000 Found a solution! In ~/.bashrc, put this: cd () { builtin cd "$@" /usr/local/bin/xtset %u@%h:`pwd` } -Duane Duane Winner wrote: > Hello, > > Hey, does anybody know of any useful tricks for automating xtset or > xtermset? > > I use xtset to set the title and icon labels to user@host:path so I can > keep track of my xterms littered all over my desktop (pretty frequent! :) > > But it sure would be nice to have them updated whenever I 'cd' to > another directory or 'su' to another user or 'ssh' to another host! > > I'm sure there's got to be someway to make this a little more seamless > then running # xtset %u@%h:`pwd` everytime, but I'm just not good enough > with shell programming to know how to do this. > > The closest I came was writing a small bash script that does: > > for filename in /dev/ttyp*; do > /usr/local/bin/xtset %u@%h:`pwd` > "$filename" > done > > And thought about cron'ing it (every minute), but the problem is that > when I tested this, all my xterms get the same title/icon based on who > is running the script and where at the time. No good :( > (And of course this would be useless to update the titles/icons for > xterms that are remote shells (ssh). > > > Any thoughts? > > Thanks! > Duane > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" >