note to self....
Saturday, May 21, 2005
FAQ: XTerm Titles, Bash Prompts, Cygwin, and Linux
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
Friday, May 13, 2005
NetworkSolutions Consumer Insight
"NetworkSolutions Consumer Insight" is the text of the "stealth" popup that the
Network Solutions account management pages opens when you log in to your account there to manage domains you have registered there.
While that may seem unremarkable, what we have found over the course of the last week is that, when trying to manage these Network Solutions registered accounts, any changes made will silently fail unless your trusty
Firefox browser has enabled all of a) allow popups for
networksolutions.com, b) allow cookies for
networksolutions.com, and c) enable Javascript.
Furthermore, if popups are disabled and/or cookies are not allowed for the site, no errors are returned from Network Solutions servers - that is, any changes you request (e.g. to the DNS records) will fail without telling the use
why the changes are not accepted. In fact, no indication is given that the changes were not accepted except for the fact that e.g. the DNS changes are not shown and are never propagated.
Network Solutions tech support did not inform us of what the problem was, even when explicitly asked. We specifically asked the rep if not having cookies enabled could be causing this problem, and the rep didn't think so. Nor was any mention made of the stealth popup or Javascript.
After about 20 minutes on the phone with Network Solutions tech support - which ended with them telling us "the problem is on your side" - we decided to try a few things, which is how we discovered this problem.
It is our considered opinion that Network Solutions should make clear in their documentation that Javascript, Cookies, and Popups are all required by the Network Solutions Account Manager pages. Also, it might be nice if an error of some kind - perhaps even a specific error, say "YOU NEED TO ENABLE COOKIES TO USE THIS SITE" - would be a good idea.
Finally, there is a bit of actual weirdness involved here, in that the cookie for
networksolutions.com does not show up in our cookie list. The
Javascript source code shows that at least one cookie is being set, but it doesn't show up.
Labels: link
Thursday, May 12, 2005
National Map Viewer
Wednesday, May 11, 2005
Damn
Thursday, May 05, 2005
SlashPicks
Slashdot picks:
Labels: link
Wednesday, May 04, 2005
RTFM
Monday, May 02, 2005
Unix Daemons in Perl
Unix Daemons in Perl is a short, to-the-point tutorial about how to create basic daemons using Perl in a UNIX environment.
Labels: link
Sunday, May 01, 2005
Common network problems
There are several problems that can commonly occur between your host computer and the internet when connecting to the internet using a DHCP to configure host computers on a local area network attached to a cable modem via home router. The setup we are currently discussing here is
- cable modem
- 802.11b/g wireless router
- wireless network card (NIC) in Linux host
These same principles will apply for wired networks and for non-Linux based computers, but any commands specified on the host may differ slightly for either exception. Likewise, the principles will apply for uplink devices other than cable modems (e.g. DSL routers).
There are several things that must happen when the DHCP client configures the NIC on the host computer. DHCP configuratino of the host NIC happens when a network interface is brought up. Typically, network intefaces are brought up either when the computer is powered up, or when the user manually commands it. In this case, we are starting the DHCP configuration of the wireless NIC manually using the Kinternet widget.
The things that must happen during DHCP configuration of the NIC are:
- The host acquires an IP address from the a DHCP server and assigns it to the NIC
- The host acquires a DNS address from the DHCP server and assigns it to the host for use resolving network names
- The host acquires a default gateway address - also known as a default route - which is assigned to the TCP/IP stack on the host and used for all non-local network traffic (i.e. Internet access).
As the host computer NIC is brought up and configured via DHCP, if any of the above operations fails, then the host computer will exhibit behavior which provides a tip-off to what the problem is:
- If no IP address was acquired from the DHCP server, then the network connection has failed - Kintenet will not show an the connection as active, and /sbin/ifconfig will not show an IP address for the wlan0 interface.
- If no DNS server address is provided (or if the DNS is unsuccessfully set on the host), then network names will not be resolved for the host - e.g. web browser requests will time out with "host not found" type errors.
- If no default gateway is provided, or if the default route is not set for the host, then web requests via the browser will be returned immeadiately. Network requests in general will be returned with "network unreachable" errors.
Labels: link
Saturday, April 30, 2005
The Darth Side: Memoirs of a Monster
Monday, April 25, 2005
sploits
Sunday, April 24, 2005
Mainstream Ludditism
The Register has a story
How computers make kids dumb. This is just one of a number of stories [see links on story page] about how technology in general, and computing in particular is destroying society.
Ref:
luddite - definition by dict.die.net
Ref:
Luddite: Definition from
Answers.com
Labels: link
Thursday, April 21, 2005
Mobile WiFi: EVDO StompBox Project
Slashdot.org has a dicussion about a
Homemade EVDO/WiFi Mobile Access Point. The details are on the projects pages:
EVDO StompBox ProjectThis project includes a wireless EVDO to 802.11 router.
Labels: link
Monday, April 18, 2005
Law Enforcement Humour
The LAPD, the FBI and the CIA are all trying to prove that they are the best at apprehending criminals. The President decides to give them a test. He releases a rabbit into a forest and each of them has to catch it.
The CIA goes in. They place animal informants throughout the forest. They question all plant and mineral witnesses. After three months of extensive investigations they conclude that rabbits do not exist.
The ATF goes in. After learning that the rabbit has formed a militia and is using the woods as cover, they call in the US Marshals who while trying to serve a warrant have some agents killed and injured; some by rabbits and some by errant friendly fire. The Marshals readjust the rules of engagement to include, "Shoot on sight anything with long ears."
The FBI goes in. After two weeks with no leads they burn the forest, killing everything in it, including the rabbit and they make no apologies. The rabbit had it coming.
The LAPD goes in. They come out two hours later with a badly beaten bear. The bear is yelling: 'Okay, okay, I'm a rabbit, I'm a rabbit.'
Labels: link
garbage.com.home - Bleed Like Me - Owning it since 5 am this morning...
The English-to-American Dictionary
Saturday, April 16, 2005
Annoyances.org - Download TweakUI
Finally found what appears to be a fix for that annoying habit Windowz has of making the user *Click* to move the input focus between windows on the screen.
*
Windows NT/2000/ME/98/95 version (1.33) at microsoft.com*
The XP version from Microsoft* Both versions are available from
Annoyances.org -
Download TweakUILabels: link
Friday, April 15, 2005
Issues with X and ssh -X under Cygwin
A couple interesting notes about Cygwin, X, and SSH, today.
Problem 1: The BadWindow X-client CrashFirst off, we had a problem with Gnu Emacs (not Xemacs or other, non-Gnu Emacs - don't know if the problem exists with others) and Cygwin X when the Emacs was running on a remote host and displaying on the X-server of a local workstation. The X server is Cygwin's, and the remote Emacs is installed on a Linux system. The connection was mude using OpenSSH.
As it turns out, this is a problem between SSH and X, not (as was first suspected) a problem with the Window Manager or Cygwin-X / Windows interaction. It is not an Emacs problem either, and from the reports we found on the Inernet concerning this, it is not unique to Gnu Emacs under X, either. That is, this could affect any X application - not sure why it doesn't appear to affect XTerm, but it may be because the Emacs was run as a child process of the XTerm.
The Workstation has:
* Windows 2000 Professional Workstation
*
Cygwin *
X (x11.org) *
FVWM *
Gnu Emacs *
OpenSSHFix for Problem 1:Found
a fix (together with a description of the problem) in
a posting on
RedHat.com support site.
The post there suggests a fix involving a change to the change to the SSH configuration files, which we were loathe to do, so we (using arcane knowledge gained from intense study of manual pages) opted for the alternative solution (which occurs further down in the post, from a later response to it) - which suggestion is to use the
-Y parameter to
ssh instead of the
-X parameter as was tradtional.
Labels: link
Tuesday, March 22, 2005
Siag Office - A Free Office Package for Unix
Siag Office - A Free Office Package for Unix also:
Free Linux-Based SpreadsheetsNote that if you remove KDE and Gnome from the current SuSE Linux distro, there is no spreadsheet or Word Processor available - The Siag Office tool sute addresses this problem - allowing you to have a Word Processor or SpreadSheet without installing and running e.g. a sound server.
The sound server problem is what drove me to discover these tools - specificly, the desire to decouple audio processing from the desktop environment package.
Neither Gnome nor KDE will allow the sound server packages to be uninstalled without removing all Gnome or KDE dependant apps and libraries.
Labels: link
Friday, September 24, 2004
: : : : D U S T � N E T W O R K S : : : :
Biz: 15 Rules for Success In Your Home Business
Wednesday, September 22, 2004
Entreupenaueship Article
Monday, September 20, 2004
Clothing: Actual Clothes
http://www.fabricsandbuttons.com/folkwear.html and
>http://www.pillagedvillage.com/ ....: skirts, tunics, doublets and stuff.
Labels: link
Archives
2004/09
2005/03
2005/04
2005/05
2005/06
2005/07
2005/08
2005/09
2005/10
2005/11
2006/01
2006/02
2006/04
2006/05
2006/06
2008/01
Subscribe to Posts [Atom]