From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,ffb0fb48546947c4 X-Google-Attributes: gid103734,public X-Google-Thread: fee84,ffb0fb48546947c4 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-10-10 13:00:33 PST Newsgroups: comp.windows.x,comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!news.encore.com!lucifer!ashekhar From: ashekhar@lucifer.encore.com (Ajay Shekhar) Subject: Re: Machine Name in The Title bar??? Organization: Encore Computer Corperation Date: Mon, 10 Oct 1994 19:20:11 GMT Message-ID: Keywords: X11, title References: <37bpie$8sd@nyx10.cs.du.edu> Sender: ashekhar@lucifer (Ajay Shekhar) Nntp-Posting-Host: lucifer.encore.com Xref: bga.com comp.windows.x:12437 comp.unix.osf.osf1:3963 In article <37bpie$8sd@nyx10.cs.du.edu>, mhatz@nyx10.cs.du.edu (Mike Hatz) writes: |> |> Is there a script someone could send along or give a hint for a hack that |> displays the machine name you are logged into in the window title? |> |> The box I am on is a DEC3000 running osf1. |> |> Thanks! |> |> Mike Using csh the following works setenv SHORTNAME `hostname | cut -f1 -d.` echo -n "^[]2;$SHORTNAME Actually, I have the working directory displayed too - simple addition to the above setenv SHORTNAME `hostname | cut -f1 -d.` alias cd 'cd \!*; echo -n "^[]2;$SHORTNAME : `pwd`^G"' Using the fancier perl script "prunepwd" you can "prune" the directory name too ... -- Ajay Shekhar (ashekhar@encore.com) Disclaimer : Nothing I ever say reflects Encore's opinions ...