Archive for the 'Linux' Category

iPhone 3g Jailbreak 4.2.1 SpringBoard crash and Linux mount

December 09th, 2010 | Category: iPhone,Linux,Ubuntu

After updating to 4.2.1 and untethered jailbreak via redsn0w on my iPhone 3g, I had two major issues. The first issue has to do with multitasking. The springboard would crash when using the fast switching. This was fixed by changing the following lines in /System/Library/CoreServices/SpringBoard.app/N82AP.plist

<key>opengles-1</key>

to

<key>opengles-2</key>

The next problem was mounting my iPhone in Ubuntu Linux. The error message will contain something about a timeout. If this is happening you probably need to re-pair the device by doing the following via the libimobledevice utils:

idevicepair unpair
idevicepair pair
idevicepair validate
10 comments

Apache Phusion Passenger: Apache 2 not found

December 06th, 2010 | Category: Development,Linux,Rails

This may be pretty basic, but figured it may be useful to others. According to the passenger docs, it will look for Apache in the $PATH environment variable. So to fix the Apache 2 not found error, you first need to find the install location. A very helpful command is “whereis” that comes standard on most *NIX systems. If you have whereis installed copy/paste the following into the command line

APACHE_PATH=`whereis apache | awk '{ print $2 }'`

That will set APACHE_PATH to the path returned from whereis. Before you continue, please make sure the path was set properly.

echo $APACHE_PATH

If everything looks good, update the $PATH environment variable.

export PATH=$APACHE_PATH/bin:$PATH

Then check path to ensure it was updated

echo $PATH
No comments

Ubuntu 10.10 Thunderbird 3.1.6 LastPass addon disables password manager

November 05th, 2010 | Category: Linux,Ubuntu

In my quest to find a good password solution, I tried LastPass. This was a very intrusive password manager on both Firefox and Thunderbird. I promptly removed it after about a day of use. However, removal of the addon left traces of itself throughout my settings. It completely disabled Thunderbird’s integrated password manager. I was lucky enough to find an article at mozillaZine with details on how to re-enable this feature.

Here are the details from their site:

No checkbox to remember passwords

It can happen that you will find no checkbox in Thunderbird to remember passwords. To change this, you will need to edit the prefs.js file, located in the Thunderbird profile folder.

1. Close Thunderbird and open the prefs.js file in Notepad or another editor (make a backup copy of prefs.js first, as a precaution).
2. Find the following line: user_pref(“signon.rememberSignons”, false);
3. Change the value from false to true.
4. Close the Notepad or editor window and save changes.
5. On the next startup of Thunderbird you should find the checkbox for remembering the password in the password manager.

Instead of editing prefs.js, you can change the same setting via about:config.

While editing prefs.js, I found lots of settings that LastPass left behind. Also, in Firefox “about:config” shows the same situation. All in all, LastPass was a horrible solution. I changed to using FF and Thunderbirds built in password manager with a master password.

1 comment

Solr 1.4 Upgrade P2 – Out with Rsync CollectionDistribution in with JavaReplication

March 03rd, 2010 | Category: Development,Linux

Solr 1.4 made replication from Master to Slave servers a whole lot easier.  Before solr1.4 we were using rsync via the snapshooter and snappuller scripts As seen here.  This method worked OK, but intermittently we would see the snapshooter or puller fail for various Java reasons (Memory usually).

Please see Solr Java-Based Replication for setup overview.  I will cover specific modification I had to make compared to what is in their documentation.  In my solrconfig.xml on my Master server, I have the following:

<requestHandler name="/replication" class="solr.ReplicationHandler" >
      <lst name="master">
          <!--Replicate on 'startup' and 'commit'. 'optimize' is also a valid value for replicateAfter. -->
          <str name="replicateAfter">startup</str>
          <str name="replicateAfter">commit</str>
      </lst>
  </requestHandler>

Then on the slave servers, I have:

<requestHandler name="/replication" class="solr.ReplicationHandler" >
      <lst name="slave">
          <!--fully qualified url for the replication handler of master . It is possible to pass on this as a request param for the fetchindex command-->
          <str name="masterUrl">http://{solr_host}:{solr_port}/solr/${solr.core.name}/replication</str>
          <!--Interval in which the slave should poll master .Format is HH:mm:ss . If this is absent slave does not poll automatically. 
           But a fetchindex can be triggered from the admin or the http API -->
          <str name="pollInterval">00:00:30</str>
          <str name="httpReadTimeout">10000</str>-->
       </lst>
  </requestHandler>

Substitute {solr_host} and {solr_port} with your specific settings. IMPORTANT: Note the ${solr.core.name} variable.  This makes it so the slaves will poll from the correct MultiCore path on the Master server.

3 comments

Ubuntu Intrepid Sound Juicer MP3 support

November 15th, 2008 | Category: Linux,Ubuntu

After upgrading to Intrepid Kaudiocreator was no longer available, so I decided to give Sound Juicer a try. When I went to the preferences to change the encoding to MP3, I found that it was missing. So I clicked edit and found that the option was there for MP3 output. Turns out the option will not show up until you install this package – gstreamer0.10-plugins-ugly-multiverse. So just type the following and your set.

sudo apt-get install gstreamer0.10-plugins-ugly-multiverse
1 comment

My simple ruby backup

November 04th, 2008 | Category: Development,Linux

After using a Linux dev laptop for almost a year, I went back to a MacBook Pro for work. I had forgotten the pains of finding a good backup solution for a Mac. I needed something that would incrementally back up my work laptop and my home Linux box to the same external hard drive. After trying various solutions(Time Machine, CCC, iBackup, etc), they all seemed to either not work at all or hog up way too much room on the drive. So I decided to just write my own backup solution using Ruby and Rsync.

This initial release is very basic and only requires you have ruby and rsync installed. It supports Mac or Linux and can back up to any drive that supports hard links (ext2, ext3, hfs, hfs+). Future releases will include integration with s3 as well as Cron scheduling. For now I just wanted to share this with others having similar gripes.

Steps to getting up and running:
1. Download Ruby Backup Zip or Ruby Backup tarball.
2. Extract the contents of the above package.
3. Edit the backup_settings.yml.sample file and save it as backup_settings.yml
4. run the script via “ruby ruby_backup.rb” or “./ruby_backup.rb”

1 comment

VIM tricks: comment block of code

October 16th, 2008 | Category: Development,Linux

A friend of mine (Shovan) was asking how to comment out a block of code using VIM. This can easily be done using the “Visual Block” feature of VIM. To enter visual block mode use “Ctrl + v”. At this point you can use “j” or “k” to highlight the lines in which you want to comment out. Then use “Shift + i” to enter insert mode. Type the respective comment character (# for ruby and bash, // for php), then hit “Esc” to exit insert mode.

No comments

Ubuntu SVN cannot set LC_CTYPE locale

September 08th, 2008 | Category: Linux,Ubuntu

I ran into this error on a fresh Ubuntu Hardy server I set up hosting a SVN repository.  The error messages may look like the following:

 
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_US.UTF-8
svn: warning: please check that your locale name is correct

This won’t cause any problems with the functionality of Subversion, but it gets annoying.  So the problem is that the LANG that is specified (in my case en_US.UTF-8) isn’t installed.  So, to install it do the following:

 
apt-get install language-pack-en-base

This will ask you if you want to install language-pack-en also, so say yes to the prompt.  Then you will be set.  If you language is something other than English “en”, then install the appropriate locale package.

4 comments