I had some problems getting Firefox to accept/provide arguments to a protocol handler command entered in the about:config page [see
previous post for about:config settings], but I have found a workaround, and posted a HOWTO document about it. See:
HOWTO Enable Telnet URI Handling in Firefox.
The gripe here is that telnet://host.name:portnum/ URLs didn't work by default in Firefox. The HOWTO gives a fix.
Labels: bash, config, firefox, hack, howto, linux, protocol, script, telnet, x11, xterm
There is a Linux mini-HowTo entitled
How to change the title of an xterm. This how to covers several shells and has a lot of good information about the various escape sequences of various shells and how to use them.
The section
4.3 Bash has example code for setting the XTerm title from within
Bash.
The Bash shell uses the value of the environment variable
PS1 as the prompt. The default Bash prompt set during the installation of the
Cygwin environment uses the escape sequences described in the How-To to set the title of an XTerm.
This is fine, unless you want to use the same prompt value in the
.bashrc file on a Linux box. The technique does work, but cases some annoying behaviour at the console when you log in to the Linux box without the benefit of the X environment.
Also, the dynamic setting of the XTerm title can interfere with static title settings you may try to use.
Now that we know the escape sequences that are used to set the XTerm title, we can examine the default Cygwin prompt and re-write it to leave the XTerm title alone, while still giving us the two-line prompt that can be useful for readability.
The default value is something like:
export PS1='\[\033]0;\w\007\033[32m\]\u@\h: \[\033[33m\w\033[0m\]
\$'
We can re-write this as
export PS1='\033[32m\]\u@\h: \[\033[33m\w\033[0m\]
\$'
This keeps the Bash prompt, but doesn't try to set the XTerm title.
Note that the
bashrc file can contain code that checks the value of
$TERM before setting the prompt. That would eliminate the problem that occurs for console logins, but still won't help us when we're setting the XTerm title ourselves e.g. using
-n and
-T. We prefer to simply remove the dynamic setting of the XTerm title as a default.
referencesLabels: bash, cygwin, faq, gui, link, linux, prompt, ps1, x11, xterm
export PS1='\[\033]0;\w\007\033[32m\]\u@\h: \[\033[33m\w\033[0m\]
$'
Labels: bash, prompt, ps1