Dude, it's UNIX... you can do whatever you want. Here's some functions that should work in ksh or bash. Notice that if you put this in your .bashrc or .kshrc file using vi, you would create the "^[" by pressing control-V and then the Escape key. ^G is created by control-V and then control-G. All other characters are verbatim, and are the property of their owners.
wt changes the window title on the fly. Use it like: wt anything you want
it changes the window title and the icon title. Usage: it anything you want
defwt is my default window title, it shows you how to put a shell function in the window title.
cls is clear screen. Xterms are like vt100's, so it will work.
These functions work for many other vt100 emulators, I have found.
This is for Sun's echo command, which takes a \c to tell you not to send a carriage return at the end. For Linux you have to use its version. I think echo is deprecated and you want to use printf, but I'm not in front of Linux right now to check if it has printf also.
In Real Life, I have yet another function that dynamically modifies my window title to show me my current directory, but that will cost you extra.
Oh, ok... this works on bash but my older version worked on ksh. You would have to figure out how to get it to work with ksh. Better to switch to bash, IMHO.
...bold and normal do not work under Linux here. This is from my Sun, sorry. I have a version that works on Linux and Solaris but it's at work and I'm not.
-Mike
Last edited by mschwage; 11-20-2005 at 02:54 AM..
Reason: Drat, forgot arguments
Thanks for those additional options mschwage. Might have to incorporate some of those ideas.
For now, I'm using the ksh shell and was actually able to configure a PS1 command to get colors in my prompt and dynamically set the title bar based on working directory location.
Hello all,
I have a not so unix question for you guys(or maybe it is). I use PUTTY to login to serverA (my putty title shows as serverA.domainname.com)
Now from ServerA i do ssh user@ServerB (i have ssh public private key setup)...
now my question is when i do ssh and logon to... (20 Replies)
In ubuntu, I want to update the title of the terminal window with the current directory path. Any ideas how this can be achieved?
---------- Post updated at 02:22 PM ---------- Previous update was at 02:08 PM ----------
Done it
---------- Post updated at 02:30 PM ---------- Previous update... (2 Replies)
Hi,
How to change the value after the symbol '@' ?
$
i.e. @mac1
I want to change it to @prod2
Also need to change the same in the title bar on the top when we open a new terminal. (3 Replies)
I would like to have the directory I am currently in being shown in the title when I open a terminal window in Fedora (selecting "Open in terminal" or using the Terminal from the panel).
Any way that I can do this?
Basically whenever I do "cd", the title should update
I have created this... (1 Reply)
Once I type "mail" command, I got to see the mail like below:
> 1 daemon Thu Aug 12 17:31 31/938 "Output from cron job "
My question is, how to do change the default title "Output from cron job " to be more customized title?
Thanks. (4 Replies)
Code for the tweak (not my fave 'running process' but the more popular 'working directory') :
case "$TERM" in
xterm*|rxvt*|rxvt-unicode*)
PROMPT_COMMAND='echo -e "\033]0;$TERM: ${PWD}\007"'
;;
*)
;;
esac
Where it works: rxvt (the one I run 'rootless' outside of ... (0 Replies)
Hello.
I am trying to figure out how to change the title of my console window. I don't need it to dynamically change with my current directory. I just want to be able to change the name of it, so when I minimize the window I can see which windows are for what purpose.
I've tried using the... (8 Replies)