apl logo

A.P. Lawrence

Information and Resources for Unix and Linux Systems
Bloggers and the self-employed
RSS FeedsGet APLawrence.com by RSS




Unix and Linux Help, Resources and information for Unix/Linux, Mac OS X. Articles on blogging, web site mechanics, and self employment. Thousands of articles, reviews, consultants listings, skills tests, opinion, how-to's, suggestions and more. This is the Blog section, which always has the newest additions. There is new content daily, most of it exclusive to this site, and all of it is indexed and cross-referenced to help you find what you need. This is not yet another mirror of the Linux LDP or someone else's Unix FAQs. If you've never been here before, there's a lot to explore.


Excerpts Style
Main Index



Has someone responded to something you wrote or commented on?
Latest Reader Comments Sat Oct 4 14:14:35 2008
- Cingular cell phones   - Advanced Cisco Networking and Security by Vinci Consulting   - Data Recovery Software   - Internet Advertising  

cartoon

Google Precipitate


2008/10/06

Google Precipitate simply gets Spotlight to index your Google Docs and Google Bookmarks. It does so in the obvious way: bringing down info to a file and setting its "Open With" attribute to "Precipitate", which will launch a web browser in turn.

You'll find Google Docs metadata in

/Users/apl/library/Caches/Metadata/Precipitate/com.google.precipitate.GoogleDocsSource.

Each document has its own directory and if it is just a simple document, you'll find an XML file within there containing the text of the document. Note that it is NOT a copy of the document; it's only an XML file containing the text. In the case of some files (like Presentations), that might only be author and title. A spreadsheet will have the text and numbers just strung out:

	<key>kMDItemTextContent</key>
	<string> Gas & Electric water 12/2007 200.43
	4/2007 40.67 11/2007 129.28 9/2007 59.07 10/2007 15.78
	12/2007 115.13 9/2007 92.14 214.87 8/2007 70.61 1812.81
	7/2007 82.29 6/2007 83.11 Homeowners insurance 667 5/2007
	136.85 4/2007 159.64 3/2007 206.21 2/2007 228.6 1/2007 193
	1597.9</string>
	<key>kMDItemTitle</key>
	<string>2007 taxes</string>

Notice that these files use the same keys that Spotlight and mdfind use.

Right now this only indexes Google Docs and Google Bookmarks; the question many users have immediately asked is "Why not Gmail?" The answer is that Spotlight will already happily do that if you POP your Gmail down to your local machine and doing anything else would be a bit of work. Precipitate's author explains at http://groups.google.com/group/precipitate:

Supporting Gmail in Precipitate would require building the complete
receiving side of an email client (plus importer); that's a pretty
large and complex wheel to re-invent. I'm afraid I'm not interested in
writing and debug an email client.

If someone were to make a little app that can register to open Mail's
files and redirect them to the Gmail URL for that message, you could
set that as the default opener, set up Mail to download your Gmail
(then set it to auto-launch hidden at login, and ignore it forever),
and you'd be able to open messages in Gmail from Spotlight. That would
be a much, much simpler way of getting the same effect. 

This is simple but I've already found it very convenient.

/MacOSX/google-precipitate.html copyright and reprint notice

Comments /MacOSX/google-precipitate.html

Add your comments




cartoon

Dial-up and Broadband


2008/10/04

I've talked before about my reluctance to get involved with home users. There are several factors at play here - for one, home users are most apt to have detestable Windows as their operating system. That's enough to turn me off right there.

But there's more. Home users often have old, weak equipment, are more apt to not be behind firewalls, may not have anti-virus software.. it can get pretty ugly.

And then there's the matter of money. Home users don't want to pay my normal rates, and I don't want to discount down to what they do want to pay. That's another reason that stands by itself.

But..

I just find it hard to say no to people that need help. That's especially true when the people asking are my neighbors or other folks I see socially.. I just can't say no to them.

So, when someone who lives here in our little retirement community asks for help, I do what I can. And I do it for free because some of these people scrape by and while others may be doing far better, I'm not going to try to figure out who has money and who doesn't: I'm just going to help. I do tell them that there are a few people here who do "computer service" for a fee and that my "free" services may be delayed because I'm busy; I tell them that I really dislike Windows..

So I was in our community library when a women asked "You are the Computer Guy, aren't you?". I admitted as much and she went on to tell me that she "couldn't get email since she had installed Comcast". That sounded sufficiently removed from a Windows problem that I didn't even bother with my "I hate Microsoft, but.." speech. I simply agreed to try to help her and we set a time and date.

Notice that I didn't ask any questions. This woman graduated High School two years before I was born and I'm no spring chicken myself, , so I was surprised she even cared about email. I didn't think I could query her for technical hints about her problem.

Besides, even if I'm dealing with a twenty year old, I usually don't ask a lot of questions. I'd rather see for myself.

When I came to her house a few days later she brought me to the computer. It was an old Gateway with a humongous CRT and a Comcast modem sitting beside it. Nothing was plugged into the Ethernet jack of that modem and there wasn't any NIC in the machine anyway. This was dial-up.

The first thing I did was ask to look at her Comcast bills. I wanted to make sure they weren't charging her for Internet. They weren't; she had only TV and telephone. We talked a bit about whether she wanted to add Internet service; based on how little she uses the computer we decided that she did not. She'd stick with her Earthlink dial-up.

I then attempted to bring up the dial-up link but it immediately told me "No dialtone". As I heard no dialtone myself, I had to agree. I traced the phone line; it was plugged in.

But it was plugged directly in. Back when DSL was all the rage, we'd have to put DSL filters on any modem or fax lines. Is the same true for Broadband? Darned if I know, but it seemed like a good bet. I called Comcast and asked. The rep said he had no idea but that he'd turn me over to the High Speed Internet group. I pointed out that this was NOT High Speed Internet, this was phone. I figured nobody would know anything about modems, so I asked if a fax line needed a filter. "Oh, definitely", he said.

Definitely? Well, then shouldn't they have provided one? "No, we don't provide filters", he answered. Nice.

I went home to do some research. The Internet let me down on this: I could not find out if Comcast Broadband Digital Voice needs a filter on modem lines. Aww, the heck with it: for the cost, it's worth the try: I found an appropriate device at Radio Shack, printed out the page and took it back to my neighbor, asking her to pick one up next time she was out. I went home.

An hour later she called me. Well, she had been four months without email: I guess she was tired of that and ran right out to get the filter. I returned to her house, plugged it in, and tried the Earthlink dial again.

This time I could hear the dialtone, but the dialer still complained. However, this time it warned about a "stuttering dialtone". I picked up her house phone and yes, it was stuttering.

"You have voicemail messages", I said. "No, I don't", she retorted instantly, and pointed at her answering machine.

Ah, yes, this is a road I've been down before. Comcast and Verizon offer voice mail, but some folks like their old answering machines. Does Comcast shut off the voice mail in that circumstance? Nooooo... they leave it on, and anytime their service isn't working, or any time the answering machine is otherwise engaged, messages go to their service. The "stuttering dial tone" turns on to alert you that you have a message.

I explained that. She still insisted that she'd never been told about this. She probably wasn't. I showed her how to dial her own phone number to get the messages - indeed the service had never been activated, but that doesn't stop it from storing messages. I went through the setup and then turned it over to her to listen to her messages, some several months old.

After clearing those out, the dialer was happy and we got a connection. Old mail messages starting flowing in - 185 old messages, which really isn't a lot considering that she'd been disconnected for four months.

I left her patiently waiting for that to catch up. I still don't know that I needed that filter; it could have been coincidence, but it doesn't really matter: it's working now.

/Misc/dial-up.html copyright and reprint notice

Comments /Misc/dial-up.html

Add your comments




cartoon

Trust


2008/10/02

Index by Subject



"Trust" has little to do with computers or computing. It doesn't really have a lot to do with business, either. Oh, it does talk about the Internet quite a bit, and certainly the implicit trust relationships of business come into play, but really it falls outside of the subjects we usually talk about here.

This is a short book. I read it before breakfast, still in bed. It's not going to tie you up for days, although you may want to go back and read it again (I did). I think it's a very powerful book, interesting, thought provoking and very much worth reading and passing on to other thinking people.

One Amazon reviewer complained that it is too scholarly. I don't agree at all: I don't think anything here is beyond the reach of an average well-read person. You don't need a degree in Humanities or Philosophy to read this - it may be peppered with references to scholarly books and ideas, but it's perfectly readable by any intelligent person.

The author builds the case that trustful societies are healthy societies and suggests that we, as individuals and in governments, should be consciously working to promote and enhance trust among ourselves. The base idea isn't new ("Do unto others" isn't necessarily altruistic), but its application as political philosophy has never had great support. I read Kohn as suggesting that it should, not for reasons of religious ideals, but for practical improvement of the fabric of society.

I agree with that. Trust is the glue that holds societies together. Lack of trust does create unhappiness and worse (far worse). Fostering trust at every level, from our individual relationships to our political structures, can help improve all of our lives.

Grab yourself a copy of this. Read it, think about it, talk about it. I think it is that important.

graphic of book cover Order (or just read more about) Trust  from Amazon.com

/Books/trust.html copyright and reprint notice

Comments /Books/trust.html

Add your comments




cartoon

CPU sucking processes


2008/10/01

A few weeks back one of my larger Unix customers called about some small issue. We dealt with that, and he then off-handedly asked "More memory should speed things up, right?"

I hesitated and said "Maybe.. but not necessarily". I then asked why he wanted to know. He explained that at one of their sites they were experiencing some performance complaints. As it happens, this site has the largest user base, and the RAM in the box was only 2GB, so they had added another 2GB but the slowness persisted.

It was then my turn to explain a few things. First, slowness can come from many causes and you really need to identify WHY a system is slow before throwing fixes at it. Yes, it could need more RAM for user processes, but it could also be disk bound, cpu bound.. the RAM might need to be used for I/O buffers, for other tunables.. but we can't know any of that if we haven't identified the real problem.

So we arranged for me to log on to take a look. My first impression from a simple "w" was that performance looked fine. I looked at sar, sar -d and sar -r and still saw nothing. Sar was not turned on, so I had no historical data to compare with, but the system seemed fine to me. I enabled sar reports and arranged to check back later.

As it happened, they called me again a few days later for some printer problems. A LaserJet wouldn't print; a power off, power on of the printer fixed that. A serial printer on a Digi Portserver wouldn't print.. it turned out that the PortServer had been decommissioned and nobody was supposed to use that printer.. not much I could do about that except have any jobs go to a different printer. But as long as I was logged in, I thought I'd take a look at sar.

This time there was definitely a problem. Sar showed 0% idle, 84% user cpu pegged.

I immediately ran a "ps" and spotted a "foxrun.pr" process that had been running about 36 hours and had accumulated almost that much in CPU time. Obviously that was the problem. Using "-o args" I was able to see the full command line and the customer identified it as a weekly process that was expected to take an hour or so. I killed it and sar immediately showed 94% idle stats.

What probably had been happening is that this program would foul up sometimes, suck down performance, and after a day or so the local people would get sick of it and reboot ("stupid Unix machine needs to be rebooted every week!"). That would "fix" the problem until the next time the program screwed up.

While I as still on the phone my customer had a conversation with his off-shore Foxpro programmer about the program, explaining what I had observed. I could not understand the programmer very well, both due to his accent and the scratchy phone line, but I had the impression that he at least thought he could see where he might have gone wrong. My customer will watch that process a little more closely over the next few weeks.

It of course is possible to write scripts that look for run-away processes like this and kill them off. Foxpro seems to be particularly vulnerable to such errors; I've had to write scripts like that at other places where the programmers could not or would not fix the root problem.

You can also sometimes use "ulimit -t" to prevent such processes from dragging down the rest of the system.

/Unixart/fox_cpu.html copyright and reprint notice

Comments /Unixart/fox_cpu.html

Sat Oct 4 14:14:35 2008 BigDumbDinosaur

http://bcstechnology.net

While I as still on the phone my customer had a conversation with his off-shore Foxpro programmer about the program, explaining what I had observed.

Why is this company using an "offshore programmer" when there are plenty available right here in the USA. Perhaps if more companies quit giving our work away to overseas vendors we might have a more robust economy.

Add your comments





cartoon

Gloom and Doom


2008/09/30

Well, here we all are, waiting to see what happens next. Are we heading for a big crash? Recession? Inflation? Stagflation?

Most of us are probably paralyzed. We don't dare touch our investments because we can't think of any safer place to put them. Cash (at least U.S. cash) sure doesn't seem like a good idea and while gold and diamonds are probably "safe", paying your bills with that can be a little difficult. So we sit and wait..

Let's look on the bright side. You never did convert your IRA's to Roth's because the tax bite would be too painful? Well, a big crash might make that bite into a nibble or even a profitable kiss.

The next few months or years could be your chance to buy stocks at rock bottom prices. When and if we recover, small investments made during the blackness could be very profitable. And if we never do recover? Well, then none of it matters anyway, right?

Oh sure, there are other things to worry about. Times like this are ripe for religious crazies to try to take over the country and make "The Handmaiden's Tale" a reality. On the other hand, it could mean the rebirth of liberalism and a rejection of unfettered capitalism.

People are going to lose jobs. A lot of companies depend on credit to make payrolls during slow periods and if they can't get it, they'll have to cut back. The bright side of that is that independent consultants will be much more in demand: you might have some collection issues now and then, but you should be busier than ever.

Nobody knows all the effects of something like this, but it's never all bad. There will be opportunities - you just need to look for them.

/Opinion/gloom-doom.html copyright and reprint notice

Comments /Opinion/gloom-doom.html

Add your comments




cartoon

New Phone


2008/09/23

I need a new cell phone. My current phone is almost four years old now and like all of its predecessors it has been dropped, smashed, soaked and abused beyond reason. Its once shiny features are pitted and scratched, but against all expectation, it still works.

Well, sort of. It doesn't like to charge any more. I've found a solution of sorts: plug it in and then give it several hard smacks on its battery with the palm of my hand. After two or three enthusiastic whacks, the charging indicator will light up and I know that, yes, I can use this yet another day at least. So far I have only had to do this in the privacy of my own home so it hasn't embarrassed me.. though my wife has given me some odd looks.

OK, I know I need a new phone. However, there are factors working against me. The first is cost. I have had this one long enough that I am eligible for free or reduced cost "upgrades", but chances are I'm not going to like the "free" units, so I know I'm going to shell out a few bucks at least.

Second is features. I'm not sure what the heck I want. I don't think I need an iPhone or an Android.. though I absolutely agree with Google that these ARE our future. But as I've said before, the current state of technology for phones is still far away from the do-it-all computer that I'd really like. Given that even the best is a weak imitation of my ideal, I revert back to basics: I need a cell phone, period. Don't need a camera, don't need the Internet.. well, that's not true, it is nice to be able to check my email when I'm out for long periods..

I did get as far as visiting a store. Unfortunately I ran into a young, gum snapping sales clerk.. no, she really wasn't snapping gum or even chewing it, and she wasn't unprofessional, but she was somewhat uninterested in helping an old geezer who didn't care about texting and mp3's. Maybe uninterested isn't quite the word I want: baffled is more like it. She had no idea what to suggest for me. I left unhappy.

I'm a bit frustrated, so I'll probably go on slapping this phone until it no longer responds. Then I'll have to do something, but I have no idea what.

/Misc/new-phone.html copyright and reprint notice

Comments /Misc/new-phone.html

Tue Sep 23 13:07:40 2008 bruceg

What are your most desired secondary features (besides the phone part), Tony? I would say if it is email, then a blackberry might be a good choice. If it is web browsing, than an iPhone would be a good choice. I know I would love an iPhone, but not having a real keyboard would be annoying for me. But, after using some friends' iphones, I can see the allure. It really is a nice phone, and a great way to keep you busy if you are queued up in a line or waiting room. So many applications, games, brain teasers, etc.. Plus, it's Apple, so it's just done really well. Lot's of little details that most companies overlook. I just really wish Apple would give us a real keyboard. If they did that, than I would probably find a way to come up with the $$ to buy one, and would suffer the contract agreement with AT&T.

- Bruce Garlock

Tue Sep 23 13:29:27 2008 TonyLawrence

The G1 "Dream" (T-Mobile's Android phone) might answer the keyboard thing - we'll know in an hour or so. But no doubt the monthly plan will be as expensive as the iPhone and that's far too rich for my blood.

Tue Sep 23 14:19:49 2008 anonymous

I recently upgraded my phone because I really wanted a full keyboard and the ability to check email, but didn't want to pay the monthly premium for a Blackberry. After reading a bunch of reviews I got a Nokia E71 and love it. I got an unlocked phone from Newegg ($420 delivered). I don't know if one you got from a carrier would support WiFi like the unlocked one. So far there seems to be a hotspot just about everywhere. I'm thinking about canceling the overpriced data part of my wireless plan.

Like you, I never used sms. Now, because it is so easy, I find myself texting a lot.

I would definitely recommend it.

Tue Sep 23 14:28:44 2008 TonyLawrence

I don't need SMS. Most of my life is now in my office - I hardly ever go out for work anymore. I don't think I've been out on the road more than half a dozen times per month anytime this year and most months it is far less.

Actually, if all customers would send email instead of calling, I'd hardly ever need a phone at all. That's one reason I'm reluctant to spend much money on it - it's not the big part of my business life it was years back. Times have changed, at least for me: I'm not on the road much at all.


Tue Sep 23 14:40:56 2008 rbailin

Tony, if you truly are satisfied with your present 4 year old cellphone and it's just getting old, go over to eBay, search for the model number and get a new or gently used one at a steeply discounted price. Maybe by the time this replacement also breaks down, the new ones out then will finally have the features you're looking for.

--Bob

Tue Sep 23 14:51:26 2008 TonyLawrence

Well, they aren't that cheap at eBay.. It looks like I get a better deal taking advantage of the discounts at AT&T.

Tue Sep 23 20:44:24 2008 anonymous

The iPhone is the first decent stab at a mini computer and a dam good one. Since I got one my iPhone my MBP stays at it's desk when at home. The iphone is so badly named. It's a great tool one you will soon realize is not a phone with a stupid camera and MP3 player added but a great mini computer that also makes calls



Wed Sep 24 16:37:53 2008 JonR

I'm happy with prepaid service from T-Mobile and Tracfone (I have both following a week-long T-Mobile outage due to an ice storm a couple of years ago; I carry a cell phone for emergencies, and that was not acceptable. Now I have backup). My Motorola M370 from Tracfone is as unintuitively set up as all the rest I've had, but I like it a lot in terms of actual performance.

Just a word about sales service. When one T-Mobile phone got lost (and then stolen!), I went to a T-Mobile kiosk in a shopping center for a replacement. I was at least 65 but the sales guy in his 20's was not only willing to spend all the time it took to find the best replacement, he recommended a less expensive phone than my first choice when I told him I needed decent volume level because of a hearing problem. It's so good to find sales people like that -- they may be increasingly rare, but they're still out there.



Wed Sep 24 17:24:47 2008 JonR

I'm happy with prepaid service from T-Mobile and Tracfone (I have both following a week-long T-Mobile outage due to an ice storm a couple of years ago; I carry a cell phone for emergencies, and that was not acceptable. Now I have backup). My Motorola M370 from Tracfone is as unintuitively set up as all the rest I've had, but I like it a lot in terms of actual performance.

Just a word about sales service. When one T-Mobile phone got lost (and then stolen!), I went to a T-Mobile kiosk in a shopping center for a replacement. I was at least 65 but the sales guy in his 20's was not only willing to spend all the time it took to find the best replacement, he recommended a less expensive phone than my first choice when I told him I needed decent volume level because of a hearing problem. It's so good to find sales people like that -- they may be increasingly rare, but they're still out there.



Wed Sep 24 18:25:20 2008 John

I completely understand your dilemma - mobile devices these days often try to jam as many features as possible onto one thing and the end result is a confusing, user-unfriendly mess.

For a simple phone, that makes calls and doesnt have an emphasis elsewhere, you will probably do well with something like the Motorola Razr or the Jitterbug. But when you choose something simple like this it will probably not be able to handle e-mails well, and you likely dont want the feature behemoth that is the blackberry (and the bills that come with it).

Enter the Peek. Once you have your phone out of the way, this new little device is perfect for email. It does email, and email only. I've had one for a little while now and love it. Its pretty cheap and very, very easy to use. The best part: no contract at all! They have it at www.getpeek.com and at Target. Pair this up with a dead simple phone and I think you've got what you're looking for.




Sun Sep 28 05:56:35 2008 cell phone Bob

I like my iphone.

Add your comments




cartoon

Mac OS X Security Guides


2008/09/22

These PDF OS X security guides came out a few months back at http://www.apple.com/support/security/guides/. Although primarily concerned with corporate environments, even a home user can benefit from reading these. I downloaded the Mac OS X Security Configuration Guide (there's another version for Server).

I learned a thing or two here. For example, I didn't know this:

Time Machine illustrates the difference between mandatory access controls and the user privilege model - it allows files within Time Machine backups to be deleted only by programs related to Time Machine. From the command line, no user - not even one logged in as root - can delete files in a Time Machine backup.

It's true:

sh-3.2# pwd
/Volumes/IOMEGA500/Backups.backupdb/MacBook/2008-09-17-105229/Macintosh HD/Users/tony/Desktop
sh-3.2# rm -f *dmg
rm: kerio-kms-6.2.0-1255-mac.dmg: Operation not permitted
sh-3.2# 

So how do you get rid of ALL copies of a file you want to delete? You use Time Machine itself: the little gear icon functions differently here. When you highlight a file and pull down that menu, it has the choice "Delete from all backups".

delete all backups from time machine

Another thing I never thought of is using keychains on a portable drive. That's a little extreme for most of us, but if you travel with your system a lot, it might be worth the trouble:

Anyone attempting to access data on the portable computer needs the portable computer, portable drive, and password for the keychain stored on the portable drive. This provides an extra layer of protection if the laptop is stolen or misplaced.

This guide covers things like disabling wifi, bluetooth, usb and firewire support: even a home user might consider doing that for any of those you don't need to use.

It also covers "sandboxing" (see sandbox-exec), encrypting swap files and much more.

Worth reading.

/MacOSX/security-guides.html copyright and reprint notice

Comments /MacOSX/security-guides.html

Add your comments




cartoon
Older