> What I don't know is how to change the xterm title from within bash
> - is it possible, and if so, how?
Here's what I do:
In a shell script that is sourced at startup:
---
# set prompt for xterm vs. non-xterm
setprompt()
{
local TITLEBAR=""
local prompt="[\w]"
case $TERM in
xterm*|screen)
TITLEBAR="\[\033[^[]0;\h: \w\007\]"
;;
esac
prompt="${TITLEBAR}[\$(basename \$(dirname \w))/\$(basename \w)]"
PS1="$prompt"
}
---
At some later point in time, call the setprompt function. The
function will (among other things) set the titlebar to a string of the
form, "hostname: /full/path/of/current/dir" e.g. "koo: /home/koo". You
don't need to use the PROMPT_COMMAND variable ;).
If all you want is the escape code, its there in the "TITLEBAR"
variable above. I got that from "man console_codes" (mandrake 8.2).
HTH.
--
Koo
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]