Archive for Linux

Link: A New Project To Run Mac OS X Binaries On Linux

This falls into the category of “I wonder why no one ever thought of this before” — it seems to me that since OS X and Linux are both based on Unix (more or less), it would be easier to make OS X software run under Linux than Windows software.

While there is the Wine project to run native Windows binaries on Linux (and other platforms), there’s a new open-source project that’s emerging for running Apple OS X binaries on Linux in a seamless manner.

It is The Darling Project that’s set out to achieve binary compatible support for Apple OS X / Darwin applications on Linux. …

More here:

A New Project To Run Mac OS X Binaries On Linux (Phoronix)

By the way, I think they need a logo.  I suggest Tux the penguin hugging a heart with an apple stem coming out of the top.  I would suggest Tux hugging an actual apple, but you-know-who would probably sue.

Comments off

Oh, FusionPBX, how you vex me

Reinstalling any piece of software is never fun, but that’s especially true when you are starting over from scratch with a piece of software that seems to take forever to install. And when you get to almost the end of the process and then f–k it up, that really doesn’t make your day.

I decided to reinstall FusionPBX because I regretted a couple of choices I had made during the initial install. I realized that I would rather use Apache than the default Nginx for serving web pages, and also that I’d prefer to use MySQL rather than SQlite for the database. It was the latter choice that got me into trouble. Near the end of the install, this screen appeared (click on it to enlarge the image):

I especially want you to note the last few lines of the above image, which tell you what to do on the second page of the web-based part of the installation, which looks like this:

Note that the two fields mentioned at the bottom of the first image are the bottom two fields on this image.  So I filled in just those two fields, but not Database Name, Database Username, or Database password, because the first screen didn’t tell me to and because I didn’t know what I was supposed to put in those fields.  I figured that if I was missing something necessary, it would tell me and return me to that page and let me enter the missing information.  Oh, how foolish of me to think that!

What actually happened was that it printed out a screen with nothing but a bunch of MySQL error messages, and if I tried to use the back button in the browser to go back and try again, it the gave me a page with nothing on it but the background (no login screen).  After a couple of hours effort, I was well and totally screwed, and basically had to go back and start from scratch, because I had no idea how to recover from this.

My biggest complaint about FusionPBX is that they assume far too much knowledge on the part of the user, and often it’s knowledge that the user would have no way to obtain.  I couldn’t find anything on their wiki about what needed to be entered on the above screen when installing FusionPBX and MySQL, nor could I find anything that worked on how to recover from a bad install (removing config.php, as suggested on one page I found, did NOT do it because apparently the MySQL part of the installation had been partially, but not completely finished).

So if you noticed that I sort of stopped posting articles about FusionPBX, it’s because I am just finding that everything I try to do is taking me far too long, and I just get tired of all the assumptions of what I should know, when the fact is that I don’t know and the documentation doesn’t tell me what I need to know.  As I write this I am tired, and not just a little ticked that this install blew up in my face, so to speak.

Of course, if anyone had this issue before and it had been documented in an online forum, I could (hopefully) find that by using a search engine and perhaps have found out what was supposed to go in these fields.  But if someone asked in IRC and it was explained to them, well, that explanation is gone forever, and at the times when I try to do things like this IRC always tends to be like a ghost town.

EDIT: I submitted an “issue” about this, and was a little perplexed by the response posted by FusionPBX author Mark J. Crane:

Certainly this can and will be improved as time permits. Priority of database support in FusionPBX is in this order PostgreSQL, SQLite, and MySQL. The order of ease if use is SQLite, PostgreSQL, MySQL. Native support in FreeSWITCH is SQLite and PostgreSQL was recently added and MySQL is unlikely to get native support in FreeSWITCH because the libraries to do it are GPL however it is still possible to use via ODBC.

As I said before this will be improved as time and resources allow.

I hate to say it but I’m starting to more and more think that this author just doesn’t get it. When you are a user and you are following an “Easy Install” script and it offers you three choices for database server, you assume all three are pretty much equally supported unless there is some statement to the contrary. Here he’s making it sound like MySQL is a low priority and not fully supported, but he’s not at all addressing the fact that the Easy Install script offers all three as choices, yet if you pick MySQL it will not work and will screw up your installation. “Time and resources” were available for someone to put it into the “Easy” install script as a choice, but not to make it actually work, and this response suggests that the author really doesn’t care all that much if you have problems. Maybe it would take a lot of time and effort to make it work, but I’ll bet it would not take a lot of time to remove the MySQL choice from the Easy Install script until it does, which is something an author might do if he were the slightest bit considerate of his users.

F—k it. I’m through with FusionPBX. It’s just not ready for “users” yet. I’m not saying it won’t work well enough for some people, especially the types that still look upon software installation as a challenge or a game, where part of the “fun” is getting it all to work. But if you’re expecting to just install and go, and have everything work as it should, you might be sadly disappointed.

Comments (6)

Installing FusionPBX successfully — Part 2: Installing FusionPBX

Continued from Installing FusionPBX successfully — Part 1: Installing Debian Linux

I apologize that these are so hard to read unless you click on them, but I’ll try to put the pertinent points in text.

This is the login screen you get once the Debian installation is complete and the system reboots:

To get the FusionPBX install started, enter

sudo apt-get install subversion

Since this is the first time you are using sudo, you’ll be asked to enter your password:

When that operation finishes, enter

sudo svn checkout /usr/src/install_fusionpbx

sudo chmod 755 /usr/src/install_fusionpbx/

sudo ln -s /usr/src/install_fusionpbx/ /usr/local/bin/

sudo /usr/local/bin/ install-both user |tee /tmp/install_fusion.log

IMPORTANT: Instead of that last line, if you want to have fewer pauses in the script than the number shown below, you might want to try this instead, but if you use this option, you need to manually change the variables in the script (use sudo nano /usr/local/bin/ and look at the top of the file; the variables to be edited are quite obvious.  For the database I strongly suggest that you select SQlite, which is the default, unless you want a botched installation — see my comments below).  You might also add more modules (if you need/want them) in the defines section. See the comment by soapee01 in the comments section:

sudo /usr/local/bin/ install-both auto |tee /tmp/install_fusion.log

I’m told that by using “auto” instead of “user“, the script will have fewer pauses where you are asked to press “ENTER”, but you do have to manually edit the script first. I didn’t know that at the time, so I went with the first option:

When you get to this point, you might question whether you are running the wrong script. You aren’t; there’s only one script for both Ubuntu and Debian, so answer y:

If you are doing a brand new install as we are doing here, then you just downloaded the latest install script, so answer y when asked if you want to continue. Otherwise the script will abort and you will just need to start over:

This is the first of several places where the script will stop and ask you to press ENTER. Presumably you won’t see most such screens if you run the script in auto mode:

This is the part that got me. “Press ENTER to continue (check for errors)” — you see this a lot, and honestly I probably wouldn’t know an error unless it printed blinking red text saying “THIS IS AN ERROR”.

“Press ENTER to continue (check for errors)” again…

And again…

And again…

And again…

And again…

And again, after some attempt to display something unreadable in large ASCII art…

And again…

And again (by about this point you start to wonder if it will ever end)…

And again…

And again (just shoot me now)…

FINALLY, an actual question, asking if you prefer Apache or Ngnix.  When I did this, I couldn’t care less, and Ngnix is the default, so I accepted that. But now I realize that this may have been the wrong choice, if only because you can’t use .htaccess files to secure Ngnix.  If I ever do this again, I’ll choose Apache:

Oh no, we are back to this again…


Can I get a robot that will just press ENTER for me?

And finally another actual question, asking whether you want to use MySQL, PostgreSQL, or SQlite. Since SQlite is already installed and required, why would I want a second database? Well, I might if I were running a system with a higher number of users or phones (see soapee01′s comment in the comments section), or if I plan on adding any software that depends on MySQL.  The default is to use SQlite, so I accepted it, but there have been a couple of times when I wished I had chosen MySQL.  Then again, when I tried doing a reinstall and choosing MySQL, it turned into a disaster that basically meant I had wasted a couple hours of my life (see Oh, FusionPBX, how you vex me for the details, but I’ll warn you ahead of time that I was not in particularly good humor when I wrote that).  If you don’t need anything more than SQlite, pick that, but if you do need something more than SQlite then I would personally avoid FusionPBX until they can get their documentation and the instructions given in the install script to match reality, unless you don’t mind the frustration of doing the installation process multiple times until you get it right.

Finally you get to the point where you need to go to the web-based GUI and enter some information. It will display this message, and wait for you to use the browser to complete the installation:

When you get to this screen on your browser, the Username and Password are probably the only things you need to fill in (and maybe change the Database Type if you selected something other than SQlite). BE CAREFUL when you fill these in – if you make a typo and don’t notice it, you will not be able to access the GUI and will probably need to restart the installation from scratch! So take a careful look at what you have entered, and make use that you actually typed what you think you’ve typed before clicking on “Next”:

On this screen, you will most likely only want to click “Next”, which completes the installation:

The install is finished, and you are returned to a command prompt:

The browser will go to a login screen:

And that completes the FusionPBX installation. It’s not difficult, but there is sometimes a considerable amount of time between the prompts to press ENTER, so most people would tend to wander off and do something more interesting, only to come back later and find it sitting on the next prompt to press ENTER. In my opinion, the Wiki page containing the instructions should advise inexperienced users to run the script in auto mode rather than user mode. I was going to go in and add something to that effect, but something is broken in the registration process and I could not complete a registration for the Wiki. I’m told the Wiki was recently moved to a new server, and apparently the configuration got messed up a bit.

After completing the installation this way, FusionPBX actually seems to run without errors. Configuration via the web-based GUI doesn’t appear to be difficult, although there are a couple of “gotchas” if you are attempting to connect to an Asterisk server (it works, but the configuration involves a couple of non-obvious things that are probably just differences between FreeSWITCH and Asterisk). Since I am just getting started with this and only working on it in my spare time, I’ll try to cover those in my next article.

By the way, if you ever want to upgrade FusionPBX to the latest version and you have installed it essentially the same way I did, there are a couple ways to do it. Probably the easiest way is to go to the Linux command prompt and issue these commands:

cd /var/www/fusionpbx
sudo svn update

It should show you a list of added and updated files, followed by “Updated to revision nnnn.” (where nnnn is the revision number).

The other option is to run this command:

sudo /usr/local/bin/ upgrade-fusionpbx auto

If you ever want to upgrade FreeSWITCH, you can do this, BUT AT YOUR OWN RISK. I temporarily broke a working system doing this, so if you don’t have the skills to troubleshoot a broken installation then don’t do this, at least not without making a full system backup first. That said, if things don’t work immediately after the upgrade (or even after a system reboot, for that matter), don’t immediately panic – it seems that it may take a few minutes for everything to start working again.

sudo /usr/local/bin/ upgrade-freeswitch auto
sudo /usr/local/bin/ fix-permissions auto
sudo service freeswitch restart

Note that the use of “auto” at the end of the above lines will skip many of the pauses and prompts to press ENTER.  If you really want those, substitute “user” for “auto“.

A word about firewalls:

The Easy Install script did not appear to install a firewall, though in theory it probably should have. It does install Fail2Ban, but if there’s no firewall that doesn’t help much. To see if the firewall is running, enter

ufw status

from the Debian or Ubuntu Linux command prompt. If it shows you a list of firewall rules, then it is installed. But if you get a “command not found” message, then you will need to install it using:

apt-get install ufw

Then you need to add the firewall rules. Go to the Ubuntu Firewall page on the FusionPBX wiki and enter the lines in both text boxes, in the order shown, except for the last one (don’t enter the ufw delete 3 line).

If you know what you are doing you can modify those rules as necessary. In my experience, after making any changes to the firewall you may need to restart Fail2Ban (service restart fail2ban). I’m still not quite sure how all this works, since my experience with Linux firewalls is entirely with iptables on CentOS, and even then I generally use Webmin to do my firewall configuration. So, if you see any holes in this strategy, or anything else that needs to be done to tighten up the firewall or make Fail2Ban work as it should, please leave a comment in the comments section!

Configuring E-mail if you elected to install a mail server during Debian installation in part 1:

To configure e-mail if you elected to install a mail server when installing Debian, from a Linux command prompt run:

sudo dpkg-reconfigure exim4-config

How you answer the questions will depend on your installation, and what you want the mail server to do. If you only want to use it to send mail to the Internet (for example, voicemail notifications/recordings), AND your server is on a fixed IP address, you can probably select “internet site; mail is sent and received directly using SMTP” on the first screen, and pretty much accept the defaults from there (this may or may not work if you are on a dynamic IP address — some hosts will reject your mail in that situation). I don’t advise using your PBX server to also handle general e-mail traffic but I suppose that if you have low volumes of voice and mail traffic, you might get away with it.

Limiting access to Apache:

If you installed Apache as I suggested, perhaps you would not like the entire world to be able to get to the login screen of your PBX.  There is a way to limit access to certain IP address, but I will tell you right now that most of the methods you see on the web won’t work.  In particular, using a .htaccess file won’t work (there may be a way to make it work, but I have read those are rather insecure anyway) and in my experience, modifying httpd.conf (which has nothing in it to begin with) doesn’t work (you will either block everyone including yourself, or no one).  What DID work for me was adding lines similar to these to the top of /etc/apache2/apache2.conf (before the initial comments):

<Location />
Order Deny,Allow
Deny from all
Allow from
   <— localhost address
Allow from   <— an individual IP address
Allow from   <— a range of IP addresses

The above took me THREE hours to figure out, primarily because most of the pages obtained from Google gave other advice that did not work. And people wonder why I do not enjoy trying to figure out these puzzles. All you Linux people who would say that doing something like this “builds character” or “is a good learning experience” can go stick your heads in a bucket of shit and then go jump off a high cliff!

Comments (12)

Screenshot comparison of four Linux-based PBX GUI’s – Extension options

This is not really an article, I’m just posting it here for future reference.  It’s a screenshot comparison of four currently available and free web-based PBX GUI configuration programs that run under Linux, concentrating on the individual extension options.  If an extension needed to be created to expose more options, I did that, though it’s still possible I may have missed something.  Also these images are cropped to try to keep them somewhat readable, which means that in some cases the Submit or Apply Changes, etc. button at the bottom of the page, as well as side menus and some graphics are omitted.  Click on any image to enlarge.  The first two are from FreePBX, the third from FusionPBX (after the “Show Advanced” button is clicked), numbers 4, 5, and 6 are from (2600Hz), and the last one from FreeSentral (yes, that really is all the options there are for an extension, unless there is some super-hidden menu that I didn’t find).








Comments (4)

If you are a Ubuntu user and you value your privacy or security AT ALL, go read this NOW!

This is a REALLY big deal for anyone that is the slightest bit protective of their privacy or security, or that doesn’t want to be a potential victim of identity theft.  Seriously, if you use Ubuntu version 12.10, don’t do another single thing on your system before you go read this.  And if you use an earlier version, do NOT upgrade to 12.10, at least not until this situation is rectified.  I’d say now is a very good time to check out other popular Linux distributions (feel free to leave suggestions in the comments).

Ubuntu has a bigger problem than its Amazon blunder (InfoWorld)

Comments (7)

Google Voice finds another way to screw with (some) Asterisk users

Picture of Western Electric model 66A3A DTMF (...

Image via Wikipedia

If you are using Asterisk or another software PBX to connect to Google Voice, and you or some of your users are using VoIP adapters, you may be familiar with a phenomenon called “talkoff”, where the human voice somehow creates a sound that the adapter confuses with a touch tone digit, so it actually sends a touch tone digit. This was more of an annoyance than anything until recently, when Google Voice found a way to use it to make people think their calls were being bugged! Well, I’m sure that was not the intent, but it sure was the effect!

See, Google Voice turned on this new feature, that you might have noticed in a message in your Google Voice portal (if you ever log into the Google Voice web site, that is):

Yes, you can now record calls at any time by pressing “4″ on your phone’s dialpad – but take a wild guess which touch-tone digit is commonly created when “talkoff” occurs?

So, out of the blue, both the caller and the called party hear an announcement that their call is being recorded.  They have no idea where it came from, or who’s doing the recording (the recording doesn’t mention Google Voice).  This typically results in a very strong desire to immediately terminate the call by both parties!

So how do you disable it?

Google Voice settings page - uncheck "Call Options"

Go to the Google Voice “Settings” page, click on the “Calls” tab, uncheck the box next to “Call Options” (while you are there you may want to enable Global Spam Filtering, if it’s not already checked, but that’s entirely up to you), and then click the “Save Changes” button.  That will turn off the “press 4 to enable recording” feature (and may just save your marriage or your current relationship)!  :)

Comments (2)

To the developers of Ubuntu Linux: Please stop pushing updates that break our video drivers!

"XBMC needs hardware accelerated OpenGL rendering" error

In the past couple of years I’ve helped install Ubuntu Linux on four HTPC systems, three of which were Acer Aspire Revos (two are still in use), and the fourth an ASRock Vision 3D. On each of these we’ve had a recurring problem where Ubuntu pushes an update to Linux (which appears in the Update Manager along with other updates) and then you start having video problems, or problems with your HTPC software.  In the most extreme cases, Ubuntu appears to not boot at all – you simply get a black screen.  In reality it has booted and you can SSH into it from another machine (assuming you’ve had the knowledge and foresight to enable SSH access), but the graphic display manager isn’t working, so you either get a blank screen or just text.  In less extreme cases, it will still boot into the desktop but when you try to run your HTPC software (such as XBMC or Boxee), it won’t start.  Instead it may fail with a message similar to “XBMC needs hardware accelerated OpenGL rendering. Install an appropriate graphics driver”.

The problem always seems to be the same and it’s the one I wrote about in the article, If your Linux-based PC with NVIDIA graphics started booting to a black screen or text only, here is the fix — maybe!  I suggest you read that article BEFORE you have the problem!  It’s just getting REALLY annoying to encounter this issue every few weeks, and while it’s happened so often that I now know the drill to fix it, I can imagine that it probably sends new Ubuntu users into full panic mode (I know it really freaked me out the first time I encountered it).

This is not an uncommon problem either. Putting the phrase “XBMC needs hardware accelerated OpenGL rendering” (including the quotes) into Google brings up “About 2,500 results” as I write this. To me that indicates that about 2,500 people, give or take a few, have had this issue hand have been frustrated enough to have posted something somewhere on the Web about it. There are doubtless thousands of others who searched on the phrase and found enough information to fix the problem. And it’s NOT what I’d call an easy fix for someone unfamiliar with using the Linux command line or working outside the Ubuntu GUI.

Every so often I read one of those articles about how the new versions of Ubuntu are so easy to use that even your grandmother could use it. Bzzzzzt! Sorry, that’s wrong, not as long as shit like this happens. Unless you have a very uncommon grandmother, she is probably not going to be able to figure out how to download and reinstall a video driver.

The solution is simple: If you can’t push out Linux upgrades that don’t break our video drivers, then stop pushing out Linux upgrades! Or else, figure out or to make it download and upgrade the video driver at the same time. Or at the very least, pop up some kind of warning message if someone is about to do any update that will likely break things, and give them the option to permanently exclude such updates.

And I don’t want to hear any crap out of anybody about how it’s stupid to install updates if you don’t know what they do. Ubuntu pushes out these updates via their Update Manager software, which pops up and basically nags the user to install the updates. You can close and ignore it, of course, but every so often it will keep nagging you to install the updates.  Users coming from another platform (particularly Mac users) will probably assume it’s okay to install all offered updates.  I just question the wisdom of pushing out Linux kernel updates this way — those are in a totally different category than, say, an upgrade to a new version of Firefox, and yet the user is not in any way warned that a kernel update is a pretty serious upgrade that could cause breakage.

P.S.  Please do NOT get the idea that I am any kind of expert in this stuff.  If you leave a comment asking for help in fixing your system, it’s probably going to sit there like a big old smelly dog turd on the lawn, with no replies at all, unless I or a reader just happens to know the answer, which is rather unlikely!  There are much more appropriate forums for requesting help — please use one of those.

Comments (2)


Get every new post delivered to your Inbox.

Join 136 other followers

%d bloggers like this: