/usr/lib, can run in to permission issues.I ran in to this issue when running a Ruby on Rails project that uses MySQL.
Library not loaded: libmysqlclient.18.dylib (LoadError)
There are two solutions to this, widely offered online. One is to use the DYLD_LIBRARY_PATH environment variable to point to the MySQL-installed lib folder (e.g. /usr/local/mysql-5.6.27-osx10.8-x86_64/lib). However, that doesn’t work for me (and many other OS X users).
Second is to create a symlink in /usr/lib to the library in the MySQL install folder. However, because of SIP, even root can not add that symlink in /usr/lib. Getting nowhere, quick, with the environment variables, I looked more in to the symlink approach. The good news is that you can temporarily disable SIP to create the symlink. This is not an ideal fix, because of the security risk, but it does work! Here’s what I did.
Cmd+R from boot (until you see the Apple logo)csrutil disable to (temporarily disable SIP), and type reboot to reboot the Mac in to regular modesudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib (note that /usr/local/mysql is in itself symlinked to the install folder (a new install at the time of writing was created in /usr/local/mysql-5.6.27-osx10.8-x86_64 for example)csrutil enable, and rebootThere you have it. Temporarily disabling SIP might not be the ideal solution, but it did get it working again!
One other solution is to use install_name_tool. I couldn’t get it to work for the Rails app (but that might be down to not referencing the right Gem path). I did get it to work for the installed PERL DBD mysql module. Example usage:
sudo install_name_tool -change libmysqlclient.18.dylib \ /usr/local/mysql/lib/libmysqlclient.18.dylib \ /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
That works for El Capitan’s latest (at time of writing) version of PERL (5.18). Use man install_name_tool for the details, but the first line references the system name for the shared dylib, the second line references the actual path to the dylib, and the third line is the path to the bundled dylib you want to update.
You could try the airport-utils package, but that only installs an old, and very incomplete, Java client. If you go that route, be sure to manually run the .jar with a 1.5 jvm. See this write up, for further info. You’ll quickly find lots of issues with this client, however!
Instead, you can run the official Apple software under Wine, with relatively few issues. The trickiest thing is to run under 32bit Wine, and not 64bit (assuming you’re running 64-bit Ubuntu). I run a separate Wine configuration for this to keep it separate from my other Wine-based software.
# 1. Initialise a new Wine configuration (32-bit) in ~/.wine32 WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg # 2. Run the installer (assumed to be in Drive C: of your new Wine folder) WINEARCH=win32 WINEPREFIX=~/.wine32 wine .wine32/drive_c/AirPortSetup.exe # 3. Run the application itself WINEARCH=win32 WINEPREFIX=~/.wine32 wine .wine32/drive_c/Program\ Files/AirPort/APUtil.exe
It’s not the prettiest UI, but I’ve been able to manage the Airport Express, including adding new MAC addresses (“Timed Access”), etc.).
]]>WordPress (the open-source blogging software, rather than the blog hosting service) was still the predominant choice of software used by the winners, illustrating its common use, today, as a content management platform, and not just blogging software. Blacknight still remain strong as a choice of hosting provider, although this year’s web award winners are spread across a lot more hosters/services than the blog awards six years ago.
Here’s a quick infographic with key stats (click for full size). I’ve put the source data up on a Google Sheet for the data nerds.
]]>Here’s a plugin to rectify that. Using keyboard shortcuts <Ctrl> + Left and <Ctrl> + Right (or the associated menu items under the “Control” menu), you can now do just that.
The plugin will seek forward by 10 seconds, and seek backwards by 5 seconds (which is based on my personal media player & DVR usage patterns).
Feel free to contribute, fork, submit pull requests, etc., over on the project page on GitHub. You can report any issues there, too.
Finally, the plugin has no installer, but you’ll find easy install instructions on the project page, as well.
In older versions (that used MD5 hashing), you could simply:
UPDATE wp_users SET user_pass=MD5('my_password') WHERE ID=1;
Now, however, that’s not longer possible. That is a good thing, because passwords are a whole lot more secure now (even if database access is compromised). Now you’ll need WordPress to generate the hashed password for you (at least, that’s by far the easiest approach because password hashing now uses salting as well). I’ve written a simple PHP file that uses WordPress’ own password utility methods to return a hashed password equivalent of the plain text password you typed. You can then use that hash in your direct MySQL manipulation. E.g.:
UPDATE wp_users SET user_pass='$P$BFuCvolvRyjUHu099Nc3PmupPqU6es.') WHERE ID=1;
Usage:
wp-admin/, index.php, wp-config.php, etc.)]]>
Conveniently, someone (shockflash) has packaged Indefero for Ubuntu installation. As of time of writing, these packages were limited to Ubuntu Lucid Lynx v10.04, so there’s a couple of extra steps, but the install process is still relatively painless.
On a basic Ubuntu 12.04 install, I opted to enable the LAMP package set (which installs MySQL, PHP, and Apache web server all needed by Indefero). If you are installing on an existing Ubuntu server machine, you just need to install apache2, mysql-server, and various php5 packages.
sudo add-apt-repository ppa:shockflash/indefero
/etc/apt/sources.list.d/shockflash-indefero-precise.list and change the precise to lucid. This hack just tells apt to use the packages for the older lucid install (as these are the most recent packages available at the moment.apt-get update, or “u” within aptitudeindefero, pluf, and any/all of the 3 other scm-specific packages indefero-git, indefero-hg, indefero-svn, as needed.<your_server_hostname>/indefero/, though you may want to set up a more specific arrangement using virtual hosts, etc.apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName. To fix this, simply fix your apache configuration! If you are not using virtual hosts, you can fix the base Ubuntu install by just adding ServerName <your server hostname> (or even ServerName <localhost>) at the start of the /etc/apache2/apache2.conf# You probably want to remove any existing 'remote' (like GitHub, # Gitorious, or your own SCM hosting). If so... # List any existing remotes git remote # Remove any remote. Likely called 'origin', or whatever # is listed above. git remote rm origin # Now add your Indefero project as a remote git remote add origin git@__YOUR__SERVER__HOSTNAME__:___YOUR_PROJECT_NAME__.git # For example, if your server is 'scm' and your new project is 'test'... git remote add origin git@scm:test.git # Push your repository to its new origin, or home, on Indefero # in the 'master' branch. git push origin master # Thereafter, you can simply push any changes with git push
As the title suggests, if you’re having the same issue I had where Google Calendar seemingly deleted random spaces between words, on an imported calendar (iCal/.ics file) generated by the python icalendar module, then read on!
Versions 3.0 (which is, in itself, recent), and older, of this module correctly wrapped long lines in the generated iCal file. However, they also incorrectly stripped whitespace from the end of lines in that wrapping, or folding, process. The iCal spec does call for wrapping of long lines, and specifically sets out that the next line should start with a space.
So, whilst it looks line a wrapped line has the correct whitespace between words, the first space character of the second/subsequent line isn’t part of the text. The previous line (assuming the wrapping has been performed nicely between two words) should end with a space; which, crucially, was being deleted in error. The result is Google Calendar correctly removes the space at the start of the second line (it being part of the protocol), leaving the last word on line 1 and the first word on line 2 to now be joined. The raw iCal file can be deceiving in that case, trust me!
To fix this, simply update to the latest version (a v3.1.x, or directly from source). If you can’t do that (for reasons other than file permissions!), you can also edit the offending line in icalendar/parser.py. Search for drop_whitespace and change it from True to False. A simple fix, when you know how! If that still doesn’t work, make sure to remove any older/conflicting versions of the module, and to restart the server/script that’s using it.
Update: Of course you were not using the original, and now obsolete, codespeak.net/icalendar/ page, were you? Of course not, but do note it’s now under active development again (with the blessing of original authors) at GitHub.
]]>I’ve recently started using Synergy to control my Macbook from my Ubuntu (10.04, if that turns out to matter!) desktop. However, I use the slim Apple USB keyboard on my Ubuntu desktop (a subject of previous posts here). They key mappings for Alt and Command on my Mac were reversed when I was controlling the Macbook. I.e. the Apple keyboard wasn’t being reported as such to the operating system. Here’s a snippet from the synergy configuration file showing the swap to make the Apple keyboard work as expected on a Mac Synergy client. If you use QuickSynergy, the config file is in ~/.quicksynergy/synergy.conf.
section: screens ubuntu-synserver: macbook-synclient: alt = super super = alt end]]>
My goal was to have Shift+2 give me @, AltGr+2 give me €, Shift+3 give me # and AltGr+3 give me £. Also, of course, the fadas to work on any vowel (including Shift support for upper case). To do this I appended a variant to the end of the existing Ireland “symbols” file, as follows:
/usr/share/X11/xkb/symbols/ie. Older versions of Ubuntu (earlier than 8, I think), has a different file path.partial alphanumeric_keys
xkb_symbols "macie" {
// Fix currency symbols, # symbol and 'fada' support.
include "latin"
name[Group1]= "Ireland - Macintosh";
// Numeric Row 123456789
key <AE02> { [ 2, at, EuroSign ] };
//key <AE03> { [ 3, sterling, numbersign ] };
key <AE03> { [ 3, numbersign, sterling ] };
// Top Row QWERTYUIOP
key <AD03> { [ e, E, eacute, Eacute ] };
key <AD07> { [ u, U, uacute, Uacute ] };
key <AD08> { [ i, I, iacute, Iacute ] };
key <AD09> { [ o, O, oacute, Oacute ] };
// Middle Row ASDFGHJKL
key <AC01> { [ a, A, aacute, Aacute ] };
include "level3(ralt_switch)"
};
You’ll see a comment line for the more accurate keyboard mapping of Shift+3 giving the £ symbol (to closer match the printing on the keys of a UK Apple keyboard). However, I prefer Shift+3 to give # as I’m a programmer; feel free to choose whichever you want (and comment/uncomment as appropriate). Save the file.
/usr/share/X11/xkb/rules/evdev.xml to configure your new variant. Search for Ireland, and you’ll see it has a <variantList> with a bunch of <variant> nodes. You want to add the following XML as a new <variant> node at the end of the others, and before the closing </variantList> tag.
<variant> <configItem> <name>macie</name> <description>Macintosh</description> </configItem> </variant>
So there’s a quick way to get fadas and currency symbols working for your Apple UK USB keyboard on Ubuntu.
UPDATE: Added missing closing XML tags for name/description in snippet above, and fix tag angle bracket mushing by WordPress.
UPDATE2: For Ubuntu 14.04 (using Unity, rather than the Gnome desktop), the same steps 1 to 3, above, apply. To apply your custom layout, you can launch the Dash, and search for “Text Entry”. From there you can add the new layout (the plus symbol, bottom left). Here are three tips if you don’t see your custom layout, or if it doesn’t work as expected when you switch to it:
sudo apt-get install dconf-editor if you need to install it): Navigate to org/gnome/libgnomekbd/desktop and enable the load-extra-items checkbox. Now, close your Keyboard / Text Entry preference panel, and launch it again. Your custom layout should now be available.sudo rm /var/lib/xkb/*.xkmWell, there are a few free options that are easy to use (and phone unlocking software isn’t always easy to use!). I came across Ruchira Sahan‘s blog which details the process, and provides the required software. Basically, you need to generate an unlock code which is based on your IMEI number (a unique code for your modem/SIM card). Software gets that for you, and will unlock the modem for you as well. He details it much better, but a summary of what I did to unlock my Huawei E1752 (an older o2 broadband USB modem) is:
I rarely use my o2 Broadband Modem, now that I have tethering with my iPhone4 (and a plan that includes 2GB of data), but it is handy to have in the laptop bag. It’s much handier to have with a SIM from another network on standby too!
]]>