Category: software

Logitech C910 Webcam (Logitech Webcam Software) crashing on Mac OS X 10.7

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

This falls into the category of “notes I am posting for myself so I don’t lose them”.  A Logitech C910 Webcam works under Mac OS X (more or less — some users have had more success than others), but the Logitech Webcam Software is buggy and Logitech seems to be in no big hurry to fix it, as can be attested to by the many posts in their Webcams forum complaining about problems using the device with a Mac.  I followed all the instructions in this thread (which was actually for OS X 10.6 but I was grasping at straws) but nothing helped – after I uninstalled and reinstalled the Webcam software, it would run fine ONCE and then after that, every time I’d try to run it again, it would crash immediately after opening.  This was not always the case, but perhaps something was broken during an upgrade.

I figured out that if I go into /Users/username/Library/Preferences/ and remove the files com.logishrd.LWS.plist and com.logishrd.LWS.plist.lockfile it would then not crash on the next run attempt.  So, Logitech’s software is buggy because the mere presence of these files should not cause the software to crash.  Note this is with the lws220.dmg software so if they ever release a newer version it just might fix the problem.

I suppose you could write an AppleScript to delete the two offending files and then launch the Logitech Webcam Software, but I have not got around to that yet (I An Not A Programmer).  My question is, why doesn’t Logitech fix their damn software instead of leaving OS X users hanging, waiting for a solution? People have been complaining about these issues for at least a year and a half now!

Review of FreeSWITCH Cookbook by Anthony Minessale, Michael S Collins, Darren Schreiber, Raymond Chandler (Packt Publishing)

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog. In order to comply with Federal Trade Commission regulations, I am disclosing that he received a free product sample of the item under review prior to writing the review, and that any links to Amazon.com in this article are affiliate links, and if you make a purchase through one of those links I will receive a small commission on the sale.

The FreeSWITCH Cookbook is the second book from Packt Publishing on the subject of FreeSWITCH, which in my opinion may someday soon be the “telephony software engine” that replaces Asterisk in popularity. I’ve previously reviewed the earlier book, FreeSWITCH 1.0.6, and this book builds on that one. If you know nothing at all about FreeSWITCH, you’ll probably want to start with the earlier book, because it gives you all the basics.  The publisher was kind enough to send me a complementary copy of the new book for review purposes.

This book, as the name implies, is a “cookbook” in that it gives “recipes” for how to do certain tasks. Just as an actual cookbook presupposes certain knowledge (that you know how to operate an oven; the difference between certain measuring units, etc.) this book tends to start with the assumption that you already have a grasp of how to set up FreeSWITCH, but you may need examples of the configuration necessary to perform certain tasks. And, that’s what this book gives you. The idea, I think, is that if even one of the “recipes” saves you a couple of hours of head-scratching and trying to figure out how to do something, then that justifies the cost of the book.

Normally in this type of review I would list the chapters, but in the case of this book you’ll probably want to know what’s in each chapter. So, here is the complete Table of Contents from the Packt Publishing web site:

  • Preface
  • Chapter 1: Routing Calls
    • Introduction
    • Internal calls
    • Incoming DID calls
    • Outgoing calls
    • Ringing multiple endpoints simultaneously
    • Ringing multiple endpoints sequentially (simple failover)
    • Advanced multiple endpoint calling with enterprise originate
    • Time of day routing
    • Manipulating To: headers on registered endpoints to reflect DID numbers
  • Chapter 2: Connecting Telephones and Service Providers
    • Introduction
    • Configuring a SIP phone to register with FreeSWITCH
    • Connecting audio devices with PortAudio
    • Using FreeSWITCH as a softphone
    • Configuring a SIP gateway
    • Configuring Google Voice
    • Codec configuration
  • Chapter 3: Processing Call Detail Records (available as a sample chapter in PDF format)
    • Introduction
    • Using CSV CDRs
    • Using XML CDRs
    • Inserting CDRs into a backend database
    • Using a web server to handle XML CDRs
    • Using the event socket to handle CDRs
  • Chapter 4: External Control
    • Introduction
    • Getting familiar with the fs_cli interface
    • Setting up the event socket library
    • Establishing an inbound event socket connection
    • Establishing an outbound event socket connection
    • Using fs_ivrd to manage outbound connections
    • Filtering events
    • Launching a call with an inbound event socket connection
    • Using the ESL connection object for call control
    • Using the built-in web interface
  • Chapter 5: PBX Functionality
    • Introduction
    • Creating users
    • Accessing voicemail
    • Company directory
    • Using phrase macros to build sound prompts
    • Creating XML IVR menus
    • Music on hold
    • Creating conferences
    • Sending faxes
    • Receiving faxes
    • Basic text-to-speech with mod_flite
    • Advanced text-to-speech with mod_tts_commandline
    • Listening to live calls with telecast
    • Recording calls
  • Index

As you can see, the order progresses from the basics (setting up your extensions, and inbound and outbound routing) to the sort of things you might want to do in a more full-featured PBX. Chapter 4 in particular will be of interest to many developers. I’ll quote from the introduction to that chapter:

One of the most powerful features of FreeSWITCH is the ability to connect to it and control it from an external resource. This is made possible by the powerful FreeSWITCH event system and its connection to the outside world: the event socket. The event socket interface is a simple TCP-based connection that programmers can use to connect to the inner-workings of a FreeSWITCH server. Furthermore, the FreeSWITCH developers have also created the Event Socket Library (ESL), which is an abstraction layer to make programming with the event socket a lot simpler. The following languages are supported by ESL:

  • C/C++
  • Lua
  • Perl
  • PHP
  • Python
  • Ruby
  • TCL

Keep in mind that the ESL is only an abstraction library—you can connect to the event socket with any socket-capable application, including telnet!

The tips in this chapter will focus most of their attention on using the event socket for some common use cases. The last tip, though, will introduce a particularly interesting way to connect to FreeSWITCH externally without using the event socket, namely, using the built-in web server that is enabled when you install mod_xml_rpc. Regardless of how you wish to control FreeSWITCH, it is highly recommended that you read the first recipe in this chapter, Getting familiar with the fs_cli interface, as this will serve you well in all aspects of working with FreeSWITCH.

This, of course, is somewhat analogous to controlling Asterisk via Asterisk Gateway Interface programming, but it appears that you get more functionality in FreeSWITCH, and more languages are supported.

I have said on many occasions that I am not a programmer, so in one sense I’m not exactly the target audience for this book.  However, I know just enough about coding to be able to appreciate when a book lays out examples in a clear, easy-to-understand manner, with enough comments for you to “get” what the author is trying to explain to you.  Personally, if I could just get over my hurdle of not fully grasping XML (which is actually strange, because I have no problem understanding basic HTML, which is very similar), I think that this book would be a lot more useful to me in understanding how to do things in FreeSWITCH.  I sort of “get” Asterisk dialplans a little bit, but for some odd reason XML is not nearly as understandable to me.  I guess everyone’s mind works a little differently.  If you work with FreeSWITCH and you don’t share my mental block with regard to XML, you are really going to like this book.  In terms of layout and readability, I think it’s one of the best titles I’ve seen from Packt.

One thing in particular I like about this book is that they don’t just give you the XML dialplan (although the XML is included), but the authors then explain to you how it works.  In addition, in many cases they also give you additional related information, such as tweaks you can make to the XML to perform slightly different functions or otherwise modify the behavior, and links to additional resources you made need.  So, you are not just viewing XML samples and then left on your own to puzzle out how they work!

In fact, I really only have one criticism of the book — it’s too short!  It’s only 134 pages from opening material to the index at the end.  But I’ll balance that by saying this — I’ve seen too many books that have a high page count, but a high percentage of the book is “filler”, much like the low-grade ground beef you buy at some supermarkets.  With this book, other than a few obligatory opening pages that tell you a bit about the authors and others involved with the book, it’s solid content.  No history of something or other, no long personal ramblings by the authors, etc. — just the “recipes” for doing the various things you might want to do in FreeSWITCH, and then the explanations as to how they work and other useful and relevant content.  You have to ask yourself the question, “Will this book save me time?” (almost certainly, if you are doing any of the things covered in the chapters of this book) and “How much is my time worth?”, and “Can I learn something from this book that would be useful to me?” (if you developing a project using FreeSWITCH, I can’t imagine how you wouldn’t).

My personal hope is that those who write, or who may be considering writing the next generation of GUI configuration programs for FreeSWITCH will get this book.  It basically shows you how to do everything you need to do to create a working PBX, and for those that are programmers, Chapter 4 is where the real magic is revealed.  That said, I would highly recommend this book for anyone attempting to develop a project using FreeSWITCH!

You can read a sample chapter here (PDF format).

FreeSWITCH Cookbook by Anthony Minessale, Michael S Collins, Darren Schreiber, Raymond Chandler (Amazon affiliate link)

Addendum: Just a bit more from the publisher’s site:

What you will learn from this book

  • Configure users and phones as well as connections to VoIP providers and even Google Voice
  • Control FreeSWITCH remotely with the powerful event socket interface
  • Route inbound and outbound calls
  • Handle call detail records, which includes inserting CDRs into a database
  • Enable text-to-speech conversion in your voice applications
  • Monitor calls via the FreeSWITCH Web interface

PHP Bug can cause FreePBX Inbound Routes and Asterisk Phonebook entries to not work as expected

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

It appears there is a nasty bug in certain versions of PHP (almost certainly in version 5.3.3, and perhaps other versions as well) that can cause SOME inbound and outbound routes in FreePBX to be ignored.  Add this to the list of difficulties to plague some FreePBX users, but for once it’s not something the FreePBX developers did.

The symptom appears to be that you have an inbound route with a DID that starts with the number “2”, or an Asterisk Phonebook entry that starts with a “2”, but it doesn’t work as expected or gets changed to a negative number.  Not all patterns starting with “2” appear to be affected, but ten digit numbers in certain area codes (such as 248 here in Michigan) definitely are.  In the case of inbound routes, it appears that the numbers get stored in the MySQL database correctly, but when they get written out to extensions_additional.conf (the dialplan file that F—PBX generates for Asterisk to use) they get transformed into negative numbers.  Therefore, when a call comes in on that DID, Asterisk doesn’t recognize it and the call gets dropped (or if you accept calls for any DID then it’s handled as such a call, but a warning message is posted to the CLI and the log file).

For a discussion of this issue, see these threads in the PBX in a Flash forum:

Inbound DID routing (only catchall works)
(240) area code in Asterisk Phonebook

Just wanted to alert you to this in case you happen to have the buggy PHP version and things just aren’t working as they should be. The best fix is probably to upgrade PHP to a later version but that can cause other issues, or you may encounter unmet dependencies when trying to upgrade (in fact, if you come across a foolproof way to upgrade PHP on Centos, please let us know). If you are using PBX in a Flash, they’re aware of the issue and one would hope they’ll have a fix real soon now. If you are using any other FreePBX-based distro then you will have to bug the distributors of that distro for a fix. If you rolled your own, then good luck to you in upgrading PHP!

Interesting thread on integrating Speech to Text with Asterisk and PBX in a Flash

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
An old microphone
Image via Wikipedia

I just wanted to call your attention to this thread on the PBX in a Flash forum:

Exploring Speech to Text

This thread explores the possibility of adding a simple speech to text demo, and also discusses the possibility of transcribing e-mails to text.  It uses Google’s speech recognition service, and it is free to use.  I doubt you would be free to use it in any commercial application, but for those that just like to tinker with new capabilities for your Asterisk server, you might find this interesting.

I haven’t personally tried it yet, but I will say that if you are using some FreePBX based distro other than PBX in a Flash, you may need to remove the calls to the Flite speech synthesizer (or install Flite support).  I hate Flite (I think the voice quality sucks harder than a black hole — okay, maybe I exaggerate a little, but Cepstral voice synthesis is much better than Flite — unfortunately Cepstral is not free) so I’m not going to tell you how to install it.  Flite’s only used in the demo in the first post so if you are trying to do something else (such as attempt voicemail transcription, as discussed in the thread) you probably don’t need it anyway.

What would be nice would be the ability to dial a code, record a short message, and then have a transcription e-mailed to the address you use for voicemail notifications.  THAT is something I’d actually use on occasion!

EDIT: After posting this, I tried a basic installation on a NON-PBX in a Flash system.  Besides removing the references to Flite, I found I had to do the following:

  1. Change ownership of /var/lib/asterisk/agi-bin/speech-recog.agi to  asterisk:asterisk
  2. Install the perl modules mentioned in the “use” statements in /var/lib/asterisk/agi-bin/speech-recog.agi
  3. Install flac (some users may also need to install sox, but I had installed that previously).

Create an “Unmount” service in Mac OS X

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

I have been having a problem with a couple of different USB devices that I occasionally connect to my Mac.  I would attempt to eject them and they would immediately remount themselves.  Therefore, it was almost impossible to do a “clean” disconnect of the device.  If you’ve had this problem you’ll know exactly what I’m talking about, and if you haven’t then you don’t need this article.  If you choose to use the information here, bear in mind that even though it worked for me I have no idea what it will do on your system, so use at your own risk or don’t use it at all!

I found that I could “Unmount” rather than “Eject” the devices using Disk Utility and then they would not automatically remount, but it was a bit of a pain to have to go to Disk Utility every time I wanted to unmount a device.  Automator to the rescue! Here are the three steps to create and use an “Unmount” service in OS X:

1. Fire up the Automator application and when it comes up, tell it you want to create a Service:

2. Create an Automator workflow exactly as shown here (click on the image to enlarge it).  Note that the top part must say “Service receives selected Folders in Finder” and after that there is one step, “Run Shell Script”, in which you’ll pass input as arguments. In the text field simply put hdiutil unmount $1

Save the workflow using an appropriate filename (I suggest “Unmount”). It will be saved in your ~/Library/Services/ directory.

3. To use the service, open your /Volumes directory in Finder and select the volume you want to unmount, and right-click on it (or however you bring up the context menu in Finder on your system). Near the bottom you should see a menu selection for “Services” and in a sub-menu you should find your “Unmount” service:

Click on that and your volume should be unmounted (if you have Hardware Growler installed from any version of Growl, including the free forked Lion version, then you should get a Growl notification of the unmount). I will note that this has no error checking other than that built into the command-line hdiutil program, so while it probably won’t hurt anything if you try to unmount something that’s not unmountable (such as a file), I’d still try to be careful.

If you have a problem with devices that refuse to unmount the then you could use the same procedure to create a “Force Unmount” service. I’d still create the regular “Unmount” service as shown above, but if you sometimes have the problem that the device won’t unmount the normal way then simply follow the above steps again except name the service “Force Unmount” and add the -force flag, like this:

hdiutil unmount -force $1

Or if eject normally works, but sometimes you want to force it, you could create a “Force Elect” service using:

hdiutil eject -force $1

I do not guarantee anything with regard to the use of the -force option (I read about it here), so if you go that route and lose data, don’t blame me.  As I said, you use this stuff at your own risk.

Happy unmounting!  And if this doesn’t work for you the way it worked for me, I’ll tell you up front that I have no clue why, and that’s partly because I don’t understand why a plain old eject attempt fails on some systems (as I say, eject actually does work, but then the device immediately remounts).  It’s all a mystery to me!

Links: OS X Notifier App Growl Goes Closed Source, but a free forked version (that works in Lion) is available

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

Here’s a few links on this issue:

OS X Notifier App Growl Goes Closed Source (Slashdot)

Episode 47 – Fork You Growl! Interview with Perry Metzger (from The Basement Coders Developer Podcast — if you care at all about Growl you should listen to this, preferably before spending any money on their allegedly broken App).

[growl-discuss] Growl 1.2.x for Lion source for XCode 4.1 (including a fixed HardwareGrowler)

Patched version project page on bitbucket

Download page for forked version

Growl-1.2.2f1.dmg direct download link (if it doesn’t work check the link above — there may be a newer version).

EDIT: Link to Growl Source Installation information for Growl 1.3 — it appears that after the Slashdot article was published, the Growl developers decided to release the source to Growl 1.3 (making the headline of the Slashdot article and this article inaccurate in the process).  However, this does not mean that the problems with the new version have been fixed (as of the date of this article) — it probably only means that they didn’t like the bad publicity about not releasing the source and decided to address that issue, in an attempt to blunt some of the criticism.

I’m presenting the above links so that anyone interested can check them out (and so I can find them again in the future). I will just say that I generally agree with the sentiments expressed in the podcast. I think it’s really underhanded when a project that has been free for years (and has accepted contributions of both cash and code from folks that probably thought it would be free forever) tries to go commercial, and it’s even worse when the commercial app doesn’t work as well as the previous free version.  And I won’t even get into the issue of the censorship, because the Growl developers have the right to censor whomever they want in their forums, but in this case it sure sounds like they were trying to deprive their users of the knowledge that someone else had fixed their buggy code and made it freely available.  If they choose to do that, then it’s up to others (like you and I) to let Growl users know that an alternative exists.

I hope that either the forked version gains acceptance (and exposure, since few people seem to know about it at the moment) or the original Growl developers see the error of their ways sooner rather than later. What IS it with developers turning greedy lately?  Keep in mind that had Growl not existed (and worked so well in its previous free incarnation), it’s quite likely that the Apple folks would have developed their own notification system and made it a component of OS X.

EDIT:  Two things you should know about Growl 1.3 before you fork over your two bucks:  First, due to App Store requirements, it no longer installs as a preference pane in System Preferences – it’s now an application (the podcast explains this in more detail).  And second, “Growl 1.3 and later do not have update checkers built into them, so you will need to keep up with when releases are put out”, according to the Growl Source Installation page.

Full disclosure:  I also censor comments — see my comment policy in the right sidebar — but it’s generally because they are spam or include one or more links that I consider spam, or because someone is being rude and nasty.  You can call me all the names you like, but I’m not going to approve such garbage for others to read.  However, there are right reasons and wrong reasons to censor comments or to ban a user, and I’ll leave it to the reader to decide (after listening to the linked podcast, which I strongly recommend before you form any strong opinions on this) whether the Growl folks should have banned Mr. Metzger.

How to install the BIND DNS Server using Webmin, so Asterisk extensions (hopefully) will work even when your Internet connection fails

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

If you run Asterisk you may have encountered this issue: Your Internet connection goes down, and so does your ability to call from extension to extension, even between extensions on your local network. This is a long-standing bug in Asterisk (exactly the sort of bug that drives people to try alternatives such as FreeSWITCH) but let’s say that for whatever reason you need to stick with Asterisk, so you’d like to find a way to make that bug go away.  Without going into all the technical details, the reason that calls fail is that Asterisk can’t access a DNS server.  I’ve read several reports that say the easiest solution is to install the BIND DNS server  on the same machine as your Asterisk server.  If you are also running Webmin on the server, installing and configuring BIND is a relative piece of cake.  So here’s how it’s done.  Please note that most of the images below can be enlarged by clicking on them, and that I have installed the StressFree theme in Webmin, so if it looks a little different from what you’re used to seeing, that’s probably why.

To start with, log into Webmin, click on “Servers”, then click on “BIND DNS Server” (if you don’t find it there, try looking in “Un-used Modules”):

Webmin Servers page — click on "BIND DNS Server"

Assuming you have not previously installed BIND, you’ll get a screen like this.  Just click where it says “Click here”:

Webmin BIND DNS Server error page — click where it says "Click here"

You will then see this screen come up as BIND is installed. Just let it run to completion and (assuming it installs successfully) click on “Return to BIND DNS Server” at the bottom of the page:

Webmin "Install Package" page — click on "Return to BIND DNS Server"

Next, because you don’t yet have an /etc/named.conf file, you’ll see this page.  Click the button for “Setup nameserver for internal non-internet use only” (don’t worry, we’ll fix it in the next steps), then click the bar that says “Create Primary Configuration File and Start Nameserver”:

Webmin — click "Setup nameserver for internal non-internet use only"

At this point BIND is installed and running, but it probably isn’t doing what you want it to, and your system isn’t using it. So the first thing we need to do is tell it where to go when it needs to do a DNS lookup. You should be seeing a page that looks like this — click on “Forwarding and Transfers”:

Webmin BIND DNS Server page — click on "Forwarding and Transfers"

When you get to the following screen, check “Yes” next to “Lookup directly if forwarders cannot?”  You also need to enter one or more addresses of DNS servers that BIND can access when it needs to pull a DNS record.  You might want to give some thought to which DNS servers you want to use, and in what order, before you start entering them. You can enter up to three IP addresses of DNS servers, and then click “Save”. This will throw you out to the previous screen, and if by some chance you want to enter even more DNS servers, you can click on “Forwarding and Transfers” again to come back and enter up to three more servers, until you are finished.  In this example, I have already entered the IP addresses of my router’s DNS Server as the top priority pick,  followed by two Google DNS Server addresses.

Webmin — BIND DNS Server — Forwarding and Transfers page

Once you have done this, you are through configuring BIND directly, but there are two more things we need to do. The first is to make sure that the BIND server starts each time we restart the machine. To do that, go to Webmin’s “System” page and then click on “Bootup and Shutdown”:

Webmin System page — click on "Bootup and Shutdown"

This is a long page so I’m not showing all of it — what you have to do is find the entry for named and check the box next to it:

Webmin Bootup and Shutdown page — check the box next to "named"

Then go to the bottom of the page and click “Start on Boot”:

Bottom of Webmin Bootup and Shutdown page — click "Start on Boot"

At this point BIND is running, and should be using the correct DNS servers, and is set to start at bootup, but your server still isn’t using it for its DNS queries. To get it to do that, go to Webmin’s “Networking” page and click on “Network Configuration”:

Webmin Networking page — click on "Network Configuration"

Once on the Network Configuration page, click on “Hostname and DNS Client”:

Webmin Network Configuration page — click on "Hostname and DNS Client"

Once on the Hostname and DNS Client page, what you need to do is make the first entry in the DNS Servers list 127.0.0.1. If you trust BIND to always be operating, that’s the only entry you need. I didn’t quite trust BIND that much (actually, what I didn’t trust was my ability to set this up correctly) so I set the DNS server in the router as the secondary DNS address. You could use any DNS server as the secondary, or you could choose to just enter the 127.0.0.1 address to use BIND and let it go at that. Personally, I feel a lot more comfortable having a “fallback” DNS. Don’t forget to click “Save” when you are finished making changes here:

Webmin Hostname and DNS Client page - 127.0.0.1 must be first DNS server

That’s all there is to it, as far as I know (if you think I’ve missed anything or done something wrong, the comment section is open!). If you’re like me, the next question you will have is, “How do I know it’s working?” And the easiest way to do that is to go to a Linux command prompt and “dig” some site you have not been to recently twice in a row. Here’s an example, using cnn.com — the part we are interested in is in red:

dig cnn.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> cnn.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8274
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 13, ADDITIONAL: 9

;; QUESTION SECTION:
;cnn.com.                       IN      A

;; ANSWER SECTION:
cnn.com.                287     IN      A       157.166.224.25
cnn.com.                287     IN      A       157.166.224.26
cnn.com.                287     IN      A       157.166.226.25
cnn.com.                287     IN      A       157.166.226.26
cnn.com.                287     IN      A       157.166.255.18
cnn.com.                287     IN      A       157.166.255.19

;; AUTHORITY SECTION:
.                       76691   IN      NS      i.root-servers.net.
.                       76691   IN      NS      j.root-servers.net.
.                       76691   IN      NS      k.root-servers.net.
.                       76691   IN      NS      l.root-servers.net.
.                       76691   IN      NS      m.root-servers.net.
.                       76691   IN      NS      a.root-servers.net.
.                       76691   IN      NS      b.root-servers.net.
.                       76691   IN      NS      c.root-servers.net.
.                       76691   IN      NS      d.root-servers.net.
.                       76691   IN      NS      e.root-servers.net.
.                       76691   IN      NS      f.root-servers.net.
.                       76691   IN      NS      g.root-servers.net.
.                       76691   IN      NS      h.root-servers.net.

;; ADDITIONAL SECTION:
b.root-servers.net.     386178  IN      A       192.228.79.201
d.root-servers.net.     402826  IN      A       128.8.10.90
d.root-servers.net.     230000  IN      AAAA    2001:500:2d::d
f.root-servers.net.     370827  IN      A       192.5.5.241
g.root-servers.net.     463754  IN      A       192.112.36.4
h.root-servers.net.     374116  IN      A       128.63.2.53
h.root-servers.net.     517382  IN      AAAA    2001:500:1::803f:235
j.root-servers.net.     185528  IN      A       192.58.128.30
j.root-servers.net.     578747  IN      AAAA    2001:503:c27::2:30

;; Query time: 26 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Sep 16 12:45:41 2011
;; MSG SIZE  rcvd: 512

# dig cnn.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> cnn.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8277
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 13, ADDITIONAL: 9

;; QUESTION SECTION:
;cnn.com.                       IN      A

;; ANSWER SECTION:
cnn.com.                223     IN      A       157.166.255.19
cnn.com.                223     IN      A       157.166.224.25
cnn.com.                223     IN      A       157.166.224.26
cnn.com.                223     IN      A       157.166.226.25
cnn.com.                223     IN      A       157.166.226.26
cnn.com.                223     IN      A       157.166.255.18

;; AUTHORITY SECTION:
.                       76627   IN      NS      c.root-servers.net.
.                       76627   IN      NS      d.root-servers.net.
.                       76627   IN      NS      e.root-servers.net.
.                       76627   IN      NS      f.root-servers.net.
.                       76627   IN      NS      g.root-servers.net.
.                       76627   IN      NS      h.root-servers.net.
.                       76627   IN      NS      i.root-servers.net.
.                       76627   IN      NS      j.root-servers.net.
.                       76627   IN      NS      k.root-servers.net.
.                       76627   IN      NS      l.root-servers.net.
.                       76627   IN      NS      m.root-servers.net.
.                       76627   IN      NS      a.root-servers.net.
.                       76627   IN      NS      b.root-servers.net.

;; ADDITIONAL SECTION:
b.root-servers.net.     386114  IN      A       192.228.79.201
d.root-servers.net.     402762  IN      A       128.8.10.90
d.root-servers.net.     229936  IN      AAAA    2001:500:2d::d
f.root-servers.net.     370763  IN      A       192.5.5.241
g.root-servers.net.     463690  IN      A       192.112.36.4
h.root-servers.net.     374052  IN      A       128.63.2.53
h.root-servers.net.     517318  IN      AAAA    2001:500:1::803f:235
j.root-servers.net.     185464  IN      A       192.58.128.30
j.root-servers.net.     578683  IN      AAAA    2001:503:c27::2:30

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Sep 16 12:46:45 2011
;; MSG SIZE  rcvd: 512

Notice how on the first run, it takes 26 msec to do the lookup, because BIND doesn’t have that address cached yet, whereas on the second run it only takes 1 msec to do the lookup!  Could that perhaps improve system performance?  I’ll bet it could! And the SERVER line tells us that it is indeed using our BIND server (127.0.0.1) – if it were using, say, our router’s DNS server then that line would show this:

;; SERVER: 192.168.0.1#53(192.168.0.1)

The idea here is that when your Internet connection takes a dive, Asterisk will still be finding a working DNS server and therefore won’t tank.  That, at least, is the theory I’ve seen on several web sites.  The ONLY thing I am showing here is how to set up BIND using Webmin, and I won’t even guarantee that I’m doing that 100% correctly.  I definitely do not guarantee that it will actually work as intended — you’ll have to test that yourself.  Doing a real test would mean disconnecting your cable or DSL modem, etc. from your router for several hours or days to see if the phones continue to work, and in most households or businesses that idea will go over like a lead balloon.  However, feel free to give it a good test if you like and report the results in the comments.

You may wonder why I selected “Setup nameserver for internal non-internet use only” in the fourth screenshot.  Obviously, that description is not entirely accurate.  The real difference is that if you select that instead of the default “Setup as an internet name server, and download root server information”, it won’t create a “root” DNS zone, which you simply don’t need for this application.  You can use the other option if you want to, but it will download additional information and increase the complexity of your setup.  Either way, you should be able to access the Internet, because we set up DNS forwarding.  If by some chance this BIND server is going to act as a nameserver for your entire network, and you don’t mind the additional traffic and complexity (and it’s the additional traffic that scares me the most, since I have no idea what it’s actually downloading nor how often it’s doing it), then by all means feel free to use the second option.  All I will say is that I used the first. and it works fine, and I’ve seen at least one instance where this same thing is set up using a method other than Webmin, and except for the order of statements it uses an /etc/named.conf file that is identical to what Webmin produces when configured as I have shown here (in other words, no “zones” at all).  I’m just waiting for some Linux purist to say this isn’t the “right” way to do this but keep the goal in mind here — all we are trying to do is work around a bug in Asterisk that should have been fixed years ago, not set up a DNS server to feed an entire subnet.  But again, you can feel free to use whichever of the options you like — it should work either way.

(By the way, if after reading the above you have “setup remorse” — you know, that feeling you get after you’ve installed something that you should have picked a different option — you can get a “do-over” by simply deleting or moving/renaming /etc/named.conf.  If you then exit Webmin’s BIND module and come back in, it should see that named.conf doesn’t exist and start you over at the fourth screen shown above.  Of course, you will lose anything you have already configured from within that module.  If you originally selected the option to download the root server information, I think that’s at least partly stored in the file /etc/db.cache, so you could move or remove that file to make sure it’s not used, however I’m not sure if any other files are or were also downloaded.  That particular file is very small so I’m not worried about that one per se, it’s just that the way things are worded on a couple of pages I read, I don’t know if that’s all it downloads, or if at some point in the middle of the night it rises up and tried to cache all the DNS information for the Internet, or just exactly what it does.  Sometimes I wish people would just give a sentence or two of additional information, so you have a better idea of what’s the right thing to do when you’re setting up something like this.)

Now, if you are a True Linux Geek who somehow stumbled across this article, and are disappointed that it isn’t much more complicated, I’ll refer you to this page.  If you can figure all THAT out, you should be getting paid the big bucks as the networking expert that you are! 🙂

A real help for Linux users with bad memories: Aliaser — take control of your aliases on Linux

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
Tux, the Linux penguin
Image via Wikipedia

Here’s a program that may be useful for those of you who, like me, sometimes find ourselves at a Linux command prompt trying to recall the syntax of a command we use frequently (because, you know, it would never have occurred to the designers of Linux to actually implement commands with names that have a clear meaning in plain English):

Alias are a great tool to help increment your productivity on the terminal with bash (or any shell program you’re using), but usually we are too lazy to think at what are the most common, or long commands that we use frequently and prepare an alias for them.

And so someone has done a small piece of software to do this job: aliaser

Aliaser helps you identify frequently typed commands and creates bash aliases for them. Aliaser analyses your bash history and helps you identify commands that you use frequently.

Full article (with installation instructions) here.

One thing they forgot to mention is that once you’ve added an alias, it won’t actually be available for use until you log out and then log back in.  Also, you can delete the aliaser file and temporary directory from your /tmp directory once installation is complete.  If you ever want to uninstall aliaser, just remove the three lines added to your .bashrc file, remove the ~/.aliaser directory, and remove the /usr/bin/aliaser file.

One way I find this useful is to make commands I can’t remember into ones that that I can remember.  For example, I did this:

aliaser add processes “ps awx”

The Linux purists are probably rushing to comment that I just turned a six character command into a nine character one.  Yes, BUT, I can actually remember the word “processes”, whereas I cannot remember the options I need to use after “ps” to get the output I want. The designers of Linux seem to not realize that some of us users have really bad memories.  Another use for this is turning arcane Linux commands into the equivalent Windows commands that you’re familiar with.  You could do this:

aliaser add dir “ls -al”

So that when you type “dir”, you get a directory listing similar to what you are used to.

If you can’t even remember the aliases you’ve created (yeah, my memory really is that bad some days), just use aliaser show to see all the aliases you’ve added.

The Linux equivalent of Little Snitch, ZoneAlarm, and similar per-application firewalls?

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.

EDIT: This article is very old and outdated. For more current information, see OpenSnitch: The Little Snitch application like firewall tool for Linux.

If you are a Mac user, you’ve probably heard of Little Snitch.  It’s a commercial (as in, not free) program that lets you allow or deny connections to the Internet from individual applications.  One reason for using such a program is to detect software that should have no reason to connect to the Internet nevertheless attempting to do so.  For example, you download a free screensaver (dumb move to start with) and it sends all the personal information it can find on you to some group of hackers on the other side of the world.  A program like Little Snitch would let you know that the screensaver  is trying to connect to the Internet, and allow you to deny that connection.  In the Windows world, I believe that ZoneAlarm has a similar capability, and it’s also a commercial (as in, not free) program.

Leopard Flower personal firewall for Linux OS screenshot
Leopard Flower personal firewall for Linux OS screenshot

It appears that these is a similar program for Linux users, and it IS free!  It’s called Leopard Flower and it’s described as a “Personal firewall for Linux OS (based on libnetfilter_queue) which allows to allow or deny Internet access on a per-application basis rather than on a port/protocol basis.”

Looking at the screenshot it appears to have very much the same per-application blocking functionality you’d get in one of those other programs.  I have not personally tried it yet, but I wanted to create a post about it so if someday in the future I am trying to remember the name of this program, I’ll know where to find it (yes, this blog does sort of serve as my long-term memory!).  🙂

Since this article was originally published, I have been made aware of another similar application called Douane: Linux personal firewall with per application rule controls – here are a couple of screenshots:

Douane personal firewall for GNU/Linux screenshot
Douane personal firewall for GNU/Linux screenshot
Duane configurator screenshot
Duane configurator screenshot

The only downside to this one is that as of this writing the only available package is for Arch Linux but if you want to try to build it for a Ubuntu or Debian system, they provide a page showing the needed dependencies.

There is an older similar program called TuxGuardian but apparently is hasn’t been updated since 2006, so I have no idea if it will even work with current versions of Linux. And as for you Android users, try the NoRoot Firewall app.

If your Linux-based PC with NVIDIA graphics started booting to a black screen or text only, here is the fix — maybe!

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
Image representing NVidia as depicted in Crunc...
Image via CrunchBase

I’ve seen this happen several times now on Ubuntu-Linux based systems that have NVIDIA graphics.  What happens is that “Update Manager” pops up and tell you there are updates for your software, and you accept them.  It then tells you that your system has to be rebooted.  And when you do that, you get no video, or text only.  What probably happened was that the updates you installed included an update to the Linux kernel, and the NVIDIA graphics driver currently installed on the system was compiled against the OLD kernel.

Note that this generally can only happen if you manually updated the NVIDIA graphics driver at some point. If you always installed it from the standard repositories for your distribution, you’ll probably never see this issue. So a word to the wise — when you finally get around to doing an upgrade of your Linux distribution, try to avoid manually installing the NVIDIA graphics driver. Instead, let the distribution pull it from its repository. After that, you should not have this issue in the future. By the way, if you currently are running Ubuntu, we recommend upgrading to Linux Mint rather than a newer version of Ubuntu. Linux Mint is very similar to Ubuntu, but leaves out some of the things that users seem to hate about newer releases of Ubuntu. More to the point, they are not currently talking about switching their base graphics system from the X window server system to a new display manager, which I have a feeling might cause problems for some NVIDIA graphics users.

But if you’re not yet ready to do a full reinstall of Linux, the fix for this problem is easy IF you had the foresight to set up SSH access to your Linux system BEFORE the trouble started.  If you didn’t, and you’re not a true Linux geek, you may be kind of screwed.  So if you’re reading this and your system is working fine, and you haven’t yet set up SSH access, you may want to do that.  There are several sites that tell you how to do that; here are two that I found using Google:

Basic SSH Setup On Ubuntu 10.04 Lucid Lynx Using OpenSSH Server
SSH—OpenSSH—Configuring

If you didn’t do this beforehand, you may still be able to do it if you can get to a command prompt.

Anyway, the actual fix is to (re-)install the latest NVIDIA driver for your system. They will be compiled against the new Linux kernel and then everything should work fine. To find the correct NVIDIA driver, go to the NVIDIA Driver Downloads page, and use the dropdowns to select the correct driver for your system.  Download it to your local system, then upload it to your Linux PC (if you have SSH access working then you can use an SFTP client, such as WinSCP or Transmit, to upload your driver file).  Once you have it on your PC, from a command prompt navigate to the directory where you put the driver and then change the permissions to make it executable:

sudo chmod +x driver_upgrade_script_filename

Now try running the script (it should have a .run extension):

sudo ./driver_upgrade_script_filename

It should not complain that the Gnome Display Manager or KDE Display Manager is running (if it were, you wouldn’t be in a state of near-panic right now), but if you were just doing a regular update you’d have to do this when the GDM/KDM is stopped. For a guide that covers that scenario, see How To Install Official Nvidia Drivers in Linux, or just know that to stop the display manager,

sudo /etc/init.d/gdm stop

should stop the Gnome Display Manager, or if you’re using KDE then the command would be

sudo /etc/init.d/kdm stop

Most sources I’ve seen suggest that you answer yes to any questions the installer may ask. The only one I’d be cautious about is letting it create a new xorg.conf if you are using a customized one (which you may well be if you’ve used any of my previous HTPC-related articles). If you have edited xorg.conf, then I’d make sure you at least have a backup before letting the installer create a new one, so you can revert back to your custom one (or compare the two and insert your customizations into the new one) if necessary.

Under Ubuntu, you may get a message similar to “Provided install script failed”. That will happen every time you update the NVIDIA driver this way and it is normal. Just ignore it and continue the installation. If you get “Error locating kernel source”, run  sudo apt-get install kernel-source  from the command prompt, then run the driver upgrade script again.

When the installer has successfully finished, reboot the system and when it comes back up, hopefully you should be happy again!

Recent Posts

Recent Comments

Archives

Categories

Meta

GiottoPress by Enrique Chavez