Linux Mint Maya with Cinnamon 1.6 – Add additional media apps to the sound applet

I am a recent convert over to Linux Mint from Mac OSX.  After running OSX on my converted windows PC for 4 years, I got tired of not being able to update it so I figured I would take another run at Linux on the Desktop.

Linux Mint ships with their “cinnamon” desktop, which is a modified version of Gnome3.  After updating to the latest release of Cinnamon (1.6), I have been tweaking the GUI.  One of the “panel” applets Mint ships with is the Volume control applet, which also lets you launch different system media players.  Mint seems to ship with the basic media apps and uses Banshee as its default MP3 player.  

My primary media apps are Pandora and Songbird at the moment.  I am a paid Pandora user, so they give you access to their “desktop app” which runs via Adobe Air.  Here is a little tutorial on adding these 2 apps to the “Launch” area of the sound applet.  

First, you can install Sondbird using : sudo apt-get install songbird 

Pandora is a little more difficult, see this link on Installing Adobe Air – once this is installed, you can double click on the Pandora.air file and it should install properly.  

Adding these to the sound applet requires editing the javascript file that drives the applet, this is located at /usr/share/cinnamon/applets/sound@cinnamon.org.  In a terminal window,  

First we need to figure out the name of the pandora launcher file, which I believe gets set up with a unique id for each user.  

cd /usr/share/applications

glaw@mint : /usr/share/applications $ ls com.pandora*

com.pandora.desktop.fb9956fd96e03239939108614098ad95535ee674.1.desktop

cd /usr/share/cinnamon/applets/sound@cinnamon.org

sudo cp applet.js applet.js.orig 
sudo vi applet.js

Look for the line:

let compatible_players = [ “clementine”, “mpd”, “exaile”, “banshee”, “rhythmbox”, “rhythmbox3”, “pragha”, “quodlibet”, “guayadeque”, “amarok”, “googlemusicframe”, “xbmc”, “xnoise”, “gmusicbrowser”, “spotify”, “audacious”, “vlc”, “beatbox” ]

and update it to look like this:

let compatible_players = [ “clementine”, “mpd”, “exaile”, “banshee”, “rhythmbox”, “rhythmbox3”, “pragha”, “quodlibet”, “guayadeque”, “amarok”, “googlemusicframe”, “xbmc”, “xnoise”, “gmusicbrowser”, “spotify”, “audacious”, “vlc”, “beatbox” , “songbird” , “com.pandora.desktop.fb9956fd96e03239939108614098ad95535ee674.1” ];

It looks like since the default launcher for songbird is simply called songbird.desktop, we do not need any special value here, but substitute your unique pandora launcher file name (minus the .desktop) above.  
Save the file, and then logout or resart Cinnamon.  You should have Pandora and Songbird on the sound applet menu now ūüôā

WordPress – using short codes within 404 page

Just a trick I just figured out РI installed a sitemap plugin for wordpress and wanted to drop the rendered sitemap into my 404 page.  The short code for the plug was [ slick-sitemap ].  So, in my 404.php page within my theme directory, I just added this :

<?php echo ¬†apply_filters(‘the_content’,'[slick-sitemap]’);?>

 

that’s, well, slick ūüôā

 

Facebook plugin FAIL

So I was reading about facebook releasing their official wordpress plugin the other day, so I figured I would try it out on one of my sites – http://diabetesbattle.org

Instant failure ;

Fatal error: Call to undefined method Facebook::get_loggedin_user() in /home/diabetesbattle.org/wp-content/plugins/wp-facebookconnect/fbconnect.php on line 48

My top 5 wordpress plugins

404 Redirected Рcoupled with SEO Ultimate, allows you to catch 404 errors (ie Рoutdated bookmarks) and link them to the correct content.

Akismet Рcomes bundled with wordpress and for good reason.  Best anti-spam tool I have found for wordpress.

Better WordPress Minify  Рawesome at reducing the number of HTTP requests your site generates.  combines all JS into 1 <javascript> tag, and all css into a single tag.

Contact Form 7 Рsimple contact form to email processing plugin

 SEO Ultimate РThis one is helpful, not just for SEO but for general site management.  Has a 404 tracker as well as allows you to defined per page custom titles, meta descriptions, and keywords.

 

Midori Browser – Moving the New Tab button

I am running the Midori browser inside of Cygwin-X at work.  This allows me to browse and download within Cygwin easier, as well as bypass some of the security imposed on the network at work.

One thing I have found that I absolutely hate is the order Midori puts its task buttons in. ¬†The first button on EVERY other browser is Back – Midori uses “New Tab” ¬†– WTF?! ¬†I find myself clicking “New Tab” meaning to go back. ¬†This has got to go!

I found that the easy fix for this is by editing the configuration file.  On Cygwin this file is located in .config/midori/config

Make sure you exit out of Midori, then open the config file in vi.  The line to look for is toolbar-items=.  I moved TabNew from the first entry to the last.  Saved the file and then restarted Midori.

 

Upgrade your ESXi vmtool isos

Need to update the vmtools in your ESXI 4.0 server?

You can download the ESXI 4.1 ISO updates free from VMware. Log in/Register at https://www.vmware.com/tryvmware/index.php and then look for “VMware Tools CD image for Linux Guest OSes” and download the ISO image.

You will have need to enabled SSH on your ESXi host before this – as well have enough disk space to accomodate this file. The new linux.iso is more then 2X the old and I had to pull all of the unused iso’s (linux.iso, freebsd.iso, netware.iso, solaris.iso, and winPre2k.iso) off my ESXi host to make room.

Once I have replaced linux.iso with the new file, a new file signature also needs to be generated.

I did not find the original private key this was signed with, but its easy to generate a new private/public key pair and resign all iso’s if needed.

You will find the iso images in the following directory:

/store/packages/4.0.0/vmtools

Using openssl you can generate the private key:

openssl genrsa -out tools-priv.pem 2048

using the private key you just generated, we can now recreate the tools-key.pub that ESXi verfies the iso images against:

mv tools-key.pub tools-key.pub.orig
openssl rsa -in tools-priv.pem -pubout -out tools-key.pub

Now we can recreate the linux.iso.sig

openssl dgst -sha1 -sign tools-priv.pem < linux.iso > linux.iso.sig

Now you should be able to install/upgrade all of your Vmtool’s with this latest and greatest version.

WordPress – Squash Spam Comments

A quick and easy way to squash the damn WordPress Spam bots.

 

First step is to turn off comments on all of your posts using the following SQL query:

UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’;

* Note you may have to adjust the wp_posts table name to suit your install.

Second step:

The default comment and ping status is open on all new posts – change the default to ‘closed’ with the following 2 queries:

alter table wp_posts change comment_status comment_status varchar(20) default ‘closed’;
alter table wp_posts change ping_status ping_status varchar(20) default ‘closed’;

Again, you may need to adjust the wp_posts table name to your install.

 

 

Where were you?

Where were you?

We were sitting watching some country music awards show the other night and Alan Jackson came on and sang part of his “Where were you (when the world stopped turning)” song.¬† Hearing that song always brings me back to¬† 9/11/2001 and the events of that day.

Continue reading