2009-11-21

the out-of-town advantage

When trying to get a job in the US, during this past Century (the 20th) there has existed a quantifiable advantage for individuals who are - all other things being equal - from "out of town".

This is clearly a subjective, psychological advantage assigned to persons of lesser known origins by the thought processes of the hiring agency. It is possible that the description of this situation may be constrained to the decision-making individual on the hiring side of the employment transaction.

Whether or not this bias in the system is a function of so-called "human-nature" or a derivation of "sociological precepts" is a matter that remains open for conjecture.

2009-11-18

Five Errors from Mozilla Firefox starting up under X11

Following is a copy of the stderr output from Mozilla Firefox startup [scripts] where the Firefox is running under Linux on the HP laptop, and the X11 display is running on the Sony Vaio laptop under WinXP - Cywin-X, it is.

Not having looked these up, yet, I'm reasonably certain that the first two - the nss-shared-helper errors (or information messages, depending on your POV) are coming from the Linux host configuration - that 'NSS_[...]_SHARED_DB' business harks back to ... was it Netscape 3.x under RedHat Linux?

The Pango-WARNINGs are doubtless a function of the X11 Font Configuration for the Cygwin X11 server - that would mean a problem on the WinXP host - needs the X11 font server configuration tweaked to correctly serve Pango fonts.

The last error message - the one tagged with the [NoScript] identifier is clearly a Javascript error from a Firefox Add-On (NoScript) which is probably doing something like assigning XML values to User Interface Document Object Model elements.

If you fix any of these, and record the fix in a blog, wiki, or other online media, email me (or post a comment here) and I will link to your site. Meanwhile, this will just have to wait until iut becomes a priority.

cps@catfish: ~
$firefox
*** nss-shared-helper: Shared database disabled (set NSS_USE_SHARED_DB to enable).
*** nss-shared-helper: Shared database disabled (set NSS_USE_SHARED_DB to enable).
NPP_GetValue()
NPP_GetValue()

(firefox:15593): Pango-WARNING **: Error loading GSUB table 0x6ead

(firefox:15593): Pango-WARNING **: Error loading GSUB table 0x6ead
[NoScript] TypeError: r.object.parentNode is null

This is part of a series

Setting up a secure connection for editting files on the remote host.

2009-11-17

Mounting a persistent file system using SSHFS

Mounting a persistent FUSE file system using SSHFS

The image is from my WinXP desktop - it shows Nautilus (the GNOME app) running on the Linux box displaying on a Windows XP desktop under Cygwin-X (X11). This was all initiated over a SSH connection established using PuTTY with X11 forwarding enabled.

What does this have to do with persistent file systems and SSHFS? It's what I was doing when this screenshot photo-op came along. More about that later.

2009-11-14

cPanel WebDisc Fails on Named Domain URL

Found just recently that the cPanel WebDisc applet does not work on a named domain on my server. Works fine when the IP address is substituted for the domain name, but if the domain name is used, shows only an .htaccess file in an otherwise empty directory.

export CVSROOT='/usr/local/cvsroot'

As superuser, install cvs on the local and remote machines (sudo apt-get install cvs or equivalent). Then, on the remote server:

# mkdir /usr/local/cvsroot/
# cvs -d /usr/local/cvsroot init

[ I left out an important step that - on that makes it clear, even, that the setup of the CVS repository, group, and user are all done from the prvileged (root) account; this next block is it - you know what to do ]

# /usr/sbin/groupadd cvs
# /usr/sbin/useradd -g cvs cvs
# /usr/sbin/usermod -a -G cvs user
# chgrp cvs /usr/local/cvsroot
# chown cvs /usr/local/cvsroot
# chmod 775 /usr/local/cvsroot

[the CVS init command should be issued from a root shell]

Changes to /etc/profile on local machine:

CVS_RSH='/usr/bin/ssh'
CVSROOT=:ext:user@servername:/usr/local/cvsroot
CVSEDITOR=emacs
export CVS_RSH CVSROOT CVSEDITOR

If your remote server uses a non-standard port for SSH (and it should!), add the following to ~/.ssh/config

Host servername
  Port 666

So now you have access to cvs on the remote server. To import an exising project (called a module in cvs), go to its base directory and do this:

me@local:/home/me/tmp$ cvs import modulename companyname START

To check out that project:

me@local:/home/me/tmp$ cvs checkout modulename

Getting started with CVS (tutorial)

2009-11-13

$SSH_AUTH_SOCK and $SSH_AGENT_PID

SSH_AUTH_SOCK=/tmp/ssh-WEk27297/agent.27297; export SSH_AUTH_SOCK;
SSH_AGENT_PID=27298; export SSH_AGENT_PID;                        
echo Agent pid 27298;                                             

This means that if you need to set the ssh-agent PID and SOCK environment settings by hand, you will need to know

  1. the filename of the socket within the file system
  2. the process ID of the ssh-agent process
#!/bin/bash
$pid=$1
$HashVal=$2
export "SSH_AUTH_SOCK=/tmp/ssh-$HashVal/agent.$pid"
export "SSH_AGENT_PID=$pid"
echo "SSH_AGENT_PID: $SSH_AGENT_PID"
echo "SSH_AUTH_SOCK: $SSH_AGENT_PID"

Note that the value passed in as the 2nd parameter - the value assigned to $HashValue - is created by the ssh-agent on startup.

#!/bin/bash $SSH_AGENT_PID fix

#!/bin/bash
if ((! $SSH_AGENT_PID )) ; then 
   eval ‘ssh-agent -s‘ ; 
fi
echo "SSH Agent ID: $SSH_AGENT_PID" ;

Tasty Thunderbits

Are you as annoyed as I am regarding the complete lack of regard for common sense shown by the Mozilla Thunderbird user interface designers? Have you spent the deep hours of many late nights weeping and tearing your hair because the abject stupidity of the so-called "Long Date Format" has cost you more con points than any of the twinks who are trying to pkill you for your grand-master-level armor?

If you answered "Yes" to the above, there may be a degree of relief in sight: http://kb.mozillazine.org/Date_display_format has (finally) some information about how to make Thunderbird - at least - behave in a bit more civilized manner - more like an application that may be willing to live within the constraints of the system, and with the desires of potential users to have a mail application that doesn't hide from them things like the date, time, source of the message, etc.

While many of you may feel - as the Mozilla Designers obviously do - that the trend towards Complete Desktop Dis-functionality - usually combined by the software designers with a concerted assault on the sanity of any unfortunates who may happen to stumble into the precisely and deviously laid psyware traps (I mean, have you seen the error message that says "You WILL NOT use the international standard date formats, you pinko commie fag - you un-American hippie filth! SCREW YOU if you think you want to use this computer as god intended, fulfilling the natural relationship between man and machine - making the world a better place for yourself and the rest of you weak, puny, carbon-based SCUM! Screw YOU if you think this machine is going to do ANYTHING you tell it to. WE are in charge now, and you days as a system operator are NUMBERED!"?) - is some sort of fiscal holy grail, I am here to assure you that there are still some of us out here who hold to the Truths we have known and discovered through tribulation and discord these many long temporal units - you're just wrong. So there.

Anyway - vituperation and contempt for panty-waist UI designers and wussy software developers aside - here is the answer:

about:config settings for Mozilla Thunderbird
Preference Applies to Default value
mail.ui.display.dateformat.today Messages with today's date 0
mail.ui.display.dateformat.thisweek Messages with a date in the past seven days2
mail.ui.display.dateformat.default Older messages2

Of course, that will do you no good at all w/o the codes:

values for about:config for date format control settings
Value Meaning Example date and time
0 No date 10:23 AM
1 Your system's long* date format Friday, December 31 2003 10:23 AM
2 Your system's short* date format 12/31/1999 10:23 AM
3 Year and month, separated by a slash 1999/12 10:23 AM
4 Abbreviated day name Fri 10:23 AM

And finally, you should know what this is:

user_pref("mail.ui.display.dateformat.today", 2);

FtR: This is Mozilla Thunderbird v2.0.0.23 (20090817) running on heavily customized OpenSuSE 11.1 install to some kind of an HP notebook [luggable] which has not been moved or opened in months, but which has fairly good uptimes, only needing to restart when new kernels are installed, etc.

This blog post is supplied as a Mind Numbing Experience (MNE). No warranties are expressed or implied, and if you try anything you find written here, you r one sick fuck, and there's probably no help for you. Sorry. Peace out.

2009-11-12

umount sshfs?

Well yeah - it has to be done some times. Despite the warm comfort of having all those remote file systems securely mounted on your thin-client FTL notebook (you know, the one with the incredibly fast multicore CPUs, incredibly high resolution audio-visuals, integrated video phone, WiFi, and goddess-only-knows what else - the one you use to multitask working with surfing pr0n on the intarweb? That one.

What has to be done? Why, the umounting of securely mounted remote file systems, of course!

Therein lies the problem. Please allow me a simple demostration:

Do you know how to un-mount a remote file system which was mounted using the [admiriably direct, logical, and to-the-point, I must add] instructions found in the well-written and informative Unix Manual page, which was right about where I expected to find it when I typed

    man sshfs  
at my local, user-friendly Bash prompt?

If not, do you code know anyone who knows how to do that?

I will tell you right now, I do not. I had to figure this out myself, without even being able to tell anyone what I was doing, since there is no one else here, and no one interested in talking about it with me over the many and various digital telecommunications channels which have been put at my disposal for the [potential] reading of such many and various messages, should they even magically spring into existence.

So. Having typed enough words that this post can reasonably and plausibly be used as a passphrase to unlock some public key, or perhaps to trigger false positives on some poor kid's search for pregnancy test results, I will present the long-fought-for, hard-won solutions which we here at ${NameOfCompany} have chosen to adopt, both premises-wide, and inter-premises:

  fusermount -u /path/to/mountpoint

And I am sorry to have to add that this information is from illicit sources. I cannot tell you where it came from. Although, it is publicly available on the internet at http://www.sonoracomm.com/support/18-support/59-sshfs?format=pdf, the information remains hidden because of the arcane and secretive formatting of the storage object. PDF!? This is the 21st Century, isn't it?

2009-11-11

wall(1)

Was trying to find the source of an error message that came up when I started screen - the problem is with the line mesg y in the file /etc/bashrc, and that when I login to the server using ssh, the terminal I get is a /dev/pts and not a /dev/tty. Makes sense, right? But how is facebook going to react to the whole IP issue surrounding the naming of the Wall application?

2009-11-08

AJAX Offline: referencing the window.location

The javascriptkit.com site makes some interesting points about AJAX and the implementation of the responseXML property of the XMLHttpRequest object.

"If you're running an Ajax request offline locally on your PC, a value of 0 is returned by status in most browsers regardless of the actual request status, even if it was successful. To run and test Ajax requests locally, it should overlook the status code being 200, and merely rely on a readyState value of 4. The following example takes into account the request possibly being run offline and to enable it:"

var myrequest = new ajaxRequest()
myrequest.onreadystatechange=function() {
  if ( myrequest.readyState == 4 ) { //if request has completed
    if ( myrequest.status == 200 || 
      window.location.href.indexOf("http") == -1 ) {

      /* if request was successful 
         (versus "page not found" etc) 
         or if run offline (rely on readyState of
         4 alone then) */

      // ... do something with returned data ...

  }
 }
}

From the example, it is clear that the test

window.location.href.indexOf("http") == -1

can be generally useful for other things - like finding the protocol string from the URL of the current document. In theory, at least, this should tell you what protocol was used to load the content of window.