This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: OK, I'm a newbie in CYGWIN... How to do title?


On Thu, 15 Aug 2002 Bruce.A.Petro@mail.sprint.com wrote:

> I'll have to think about that.  The issue is, if any problems occur and
> its discovered, guess who gets the blame.  However, I'll fiddle with it
> and see if it seems like a safe bet.

You'll need to copy every other non-windows DLL that it'll need to access,
unless you link everything statically, which (and correct me if I'm wrong)
makes things run slower.  So it's a tradeoff.  C'est la vie.

> Also, I put
>   function settitle() { echo -n "^[]2;$@^G^[]1;$@^G"; }
> into my .bashrc, but It's not working.

First off, you have to run settitle for it to work (I assume you've done
that, just covering my bases).
Second, depending on what you mean by "not working" (not defined or no
effect?), there are two possibilities:
1) "not defined": .bashrc is not read by a login shell, .bash_profile is.
   My solution is to symlink .bash_profile to .bashrc.

2) "no effect" (and this relates to the question you asked):
> Do I need to alter the etc/profile as well?

Whoops, didn't make that clear...  The default value for the prompt (in
/etc/profile) contains the commands to alter the window title whenever a
prompt is printed.  So, if you want to set your title and make it stay
that way, remove the first line of PS1 (you don't have to do that in
/etc/profile, btw, you can just copy the setting to your .bashrc and
modify it there).
	Igor

> Thanks!
>
> -----Original Message-----
> From: Igor Pechtchanski
> Sent: Wednesday, August 14, 2002 6:13 PM
> To: cygwin
> Cc: pechtcha
> Subject: RE: OK, I'm a newbie in CYGWIN... How to do title?
>
> On Wed, 14 Aug 2002 Bruce.A.Petro@mail.sprint.com wrote:
>
> > Thanks, I'll try it tomorrow.
> > >As to ... I fail to see why it shouldn't use cygwin...
> > I didn't mean to say the application COULDN'T run under cygwin. Its
> > logistics and politics.  I don't have rights on that NT server to
> > install any new software - including cygwin.  Cygwin is on my own
> > desktop, but the servers I can't touch.
>
> Wait, I thought you said that you were going to compile the
> application...
> If so, you'll need to install it on the servers anyway.  Just make sure
> you copy cygwin1.dll along with it...
>       Igor
>
> > -----Original Message-----
> > From: Igor Pechtchanski
> > Sent: Tuesday, August 13, 2002 6:14 PM
> > To: Bruce.A.Petro
> > Cc: pechtcha; cygwin
> > Subject: Re: OK, I'm a newbie in CYGWIN... How to do title?
> >
> > On Tue, 13 Aug 2002 Bruce.A.Petro@mail.sprint.com wrote:
> >
> > > I promise, I checked the archives and docs and don't see anything on
> > > this...
> > >
> > > Can someone share how I perform the equivalent of the NT 'title'
> > > command on a CYGWIN window??   I've got 4-6 CYGWIN windows open - each
> > > tailing a certain log file.  Only problem is its not obvious which
> > > window is which log file!  What I need is to do something like:
> > > $title "Logfile1"
> > > tail -f logfile1.log
> > >
> > > Hey, while I've got your attention - one more question.  Does anyone
> > > know where I can download (or compile) a version of sendtcp to run
> > > under NT (Sorry, can't run under CYGWIN, must run under NT scripts).
> > >
> > > THANKS!
> > > Bruce.
> >
> > Check the value of PS1 in the default /etc/profile -- it sets the title.
> > I use the same principle in this handy function
> >
> > function settitle() { echo -n "^[]2;$@^G^[]1;$@^G"; }
> >
> > in my .bashrc, and use that when I need to dynamically change the title.
> > The ^[ is actually the ESC character (\033), and the ^G is the BEL
> > character (\007).
> >
> > As for whatever application you need to run under NT, I fail to see why it
> > shouldn't use cygwin...  As long as cygwin1.dll is in the path, you can
> > call the app from NT scripts all you want.  You can also use something
> > akin to 'cygpath -u' if you want your app to recognize windows file and
> > path names.
> >       Igor

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]