How To Allow Applications Back Into The The Notification Area In Ubuntu 11.04

Posted May 7th, 2011 (Updated 29 Oct 2011) in Linux

One of my last niggling issues with Ubuntu 11.04 is, as you’d expect, another remnant of Unity carried over to the Ubuntu Classic desktop. This remnant is the notification area (or ‘Systray’ to you Windows converts) not allowing all applications access to it. Below is the line you’ll need for bringing Ubuntu back to the 21st century:

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

Thanks to the good fellows at Web UDP8 for this little piece of magic.

PS. It appears the VLC icon STILL does not always appear. There’s a question posted on the VLC forums about this issue and it looks as though it’s due to an incompatibility between QT4 and Gnome. Stay tuned for further developments on this issue.

Read More »

Save Firefox 4 Tabs on Close

Posted May 7th, 2011 (Updated 29 Oct 2011) in Uncategorized

It seems firefox 4 has stupidly removed the option to save tabs on exit however there’s a way to get this very useful functionality back. Here’s how:

  1. Type about:config in the URL/Location/Address bar and press the Enter key
  2. Accept the warning message (promise to be careful)
  3. The preferences page/list will open
  4. Filter = browser.tabs.warnOnClose
  5. If its value is set to false, double-click on it (in the lower panel) to toggle its value to true
  6. Repeat steps 4 and 5 for these following 3 preferences also:
    • browser.warnOnQuit
    • browser.warnOnRestart
    • browser.showQuitWarn

Taken from mozilla support. A big thank you to user Helper7677 for this solution!

Read More »

Why I Hate Unity

Posted April 30th, 2011 (Updated 30 Jan 2015) in Linux

Note: Also see the followup to this post: How to Make Ubuntu 11.10 More Usable

So my previous post How to Move App Menus Back Into Their Windows in Ubuntu turned out a little more bitter than even I had first intended. As a result I think it’s only fair I give a few more reasons as to why I have such a strong dislike towards Unity.

Let me preface this post by saying that I was actually quite looking forward to Unity. It looked relatively promising (although I was slightly worried about reports it wasn’t as customizable as Gnome) and after I ended up liking icons on the left when thinking I wouldn’t, I was determined to give Unity a fair go. I would also like to say that many of these issues will probably be sorted out in later bug fixes and updates – but that does not help me right here right now on my shiny new Ubuntu install a few days after release.

So here it is: a ‘by no means complete’ list of reasons using Unity is not a good idea at this point in time.

Read More »

Use .htaccess to Block Pages Based on IP

Posted April 29th, 2011 (Updated 29 Oct 2011) in Uncategorized

Due to the antics of some douchebag (IP address 109.120.34.16) I’ve had to look into blocking pages based on IP address with .htaccess files. This may come in handy to others out there so I figured I’d write up my findings.

To block everyone except specific IPs here’s what you’ll need (more info):

order deny,allow
deny from all
allow from <ip address>

To apply this restriction only to specific files, wrap the above code in the <File> tag:

<Files wp-login.php>
	order deny,allow
	deny from all
	allow from <ip address>
</Files>

Thanks to user NuclearMeltdown on the #httpd channel on Freenode for his assistance.

Read More »

How to Move App Menus Back Into Their Windows in Ubuntu

Posted April 28th, 2011 (Updated 29 Oct 2011) in Linux

You’ve recently upgraded to Ubuntu Natty and discovered that Unity is crap. Don’t worry – you’re in the vast majority. One of the many issues with this disastrous attempt at a shell is that it moves application menus into a global menu in the top panel. This may be useful for small screens – but for the other 99% of the market it’s just downright frustrating.

After a bit of searching I came across this post describing how to banish the global menu back to the warped hell from whence it came. You want to remove the indicator-appmenu package.

This is but one of a great many great challenge you’ll face if you decide to continue on with Unity. Good luck…and may God have mercy on your soul should you choose to stick with it.

Read More »

Fix Firefox Language for Google.com on Ubuntu

Posted April 28th, 2011 (Updated 29 Oct 2011) in Linux

OK so this is an issue I’ve had for a very long time now (since Firefox 4 beta) whereby Google keeps defaulting to a strange language and seemingly completely ignoring my preference for English:

Incorrect language on google.com in Firefox 4

 

The reason for this is a bad language string in Firefox’s settings. You can fix it by doing the following:

Edit - Preferences 
Content - 
Choose... (under Languages)

You’ll see the following language:

chrome://global/locale/intl.properties

Delete it. It’s wrong and it’s causing you problems. Once deleted, time to add your language of choice:

Select Language to add... -
<pick your desired language>

You should now be greeted with a much easier to read google index page!

Here’s hoping this post will make it out in time to save the flood of Ubuntu Natty users on their shiney new Firefox 4 installs :)

Read More »

How to Download Gmail Emails in a Given Label

Posted April 20th, 2011 (Updated 7 Mar 2012) in PHP

EDIT Aug 6 2011: If you’re having trouble connecting to
{imap.gmail.com:993/imap/ssl}
try
{imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}
If you get a ‘Too many incorrect logins’ error, you can unlock your account again here.

I’m a big fan of the Android platform and have been using an application called SMS Backup to send all SMS’s to Gmail for archiving (now replaced by SMS Backup+). To cut a long story short, I needed to download those SMS’s with a PHP script. SMS Backup had uploaded them all under the creatively named SMS label and so I needed a way to download all emails with a specified label. It turned out to be a relatively thing to do once you know what you’re looking for.

A quick Google search (I’m such a fanboy) will lead you to this page where a script is provided to download all email from Gmail using the IMAP protocol:

<?php
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = 'your username here';
$password = 'your password here';
 
/* try to connect */
$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());
 
/* grab emails */
$emails = imap_search($inbox,'ALL');
 
/* if emails are returned, cycle through each... */
if($emails) {
 
	/* begin output var */
	$output = '';
 
	/* put the newest emails on top */
	rsort($emails);
 
	/* for every email... */
	foreach($emails as $email_number) {
		/* get information specific to this email */
		$overview = imap_fetch_overview($inbox,$email_number,0);
		$message = imap_fetchbody($inbox,$email_number,2);
 
		/* output the email header information */
		$output.= '<div class="toggler '.($overview[0]->seen ? 'read' : 'unread').'">';
		$output.= '<span class="subject">'.$overview[0]->subject.'</span> ';
		$output.= '<span class="from">'.$overview[0]->from.'</span>';
		$output.= '<span class="date">on '.$overview[0]->date.'</span>';
		$output.= '</div>';
 
		/* output the email body */
		$output.= '<div class="body">'.$message.'</div>';
	}
 
	echo $output;
}
 
/* close the connection */
imap_close($inbox);

This gets us half way there. Now – to filter by label. As it turns out, this is ridiculously simple. Change the $hostname variable to this:

$hostname = '{imap.gmail.com:993/imap/ssl}SMS';

And with that, ladies and gentlemen, we have a completed script!

…but what if you want to retrieve only your Spam mail (not that you would), your starred mail or your deleted mail? This is also quite possible. After much more Googling I came across this blog post detailing what you need to put in your $hostname. In the instance above, it’d be

$hostname = '{imap.gmail.com:993/imap/ssl}[Gmail]/Trash';

Read More »

Fixing Perl Locale Errors in a Clean Ubuntu Install

Posted April 6th, 2011 (Updated 29 Oct 2011) in Linux

When performing various actions on a clean install of Ubuntu 10.10 on my web server, I kept being presented with the following message:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

After some googling, many people (in this thread http://ubuntuforums.org/showthread.php?t=138022) suggested:

sudo locale-gen
sudo dpkg-reconfigure locales

however the solution that worked for me was:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

You might need to reset your machine before changes take effect:

sudo shutdown -r now

Read More »

Upload to Amazon S3 with Uploadify

Posted March 20th, 2011 (Updated 7 Nov 2011) in Javascript, PHP

Update Jul 02 2011: crossdomains.xml should be crossdomain.xml
Update Jun 29 2011: Updated S3 upload URL – no more security error

If you’ve ever wanted to allow people on your website to upload files to Amazon S3, you’ll know the only real way to do this is with flash – as it allows the client to upload directly instead of funneling all traffic through your server. You could write your own script for this, however there’s already a nifty little prebuilt tool I’m sure you’ve already heard of called Uploadify which can not only do the job for you, it can do so with great flexability.

For the lazy: Download the entire script here

Read More »

Better Doctrine 1 Module for Kohana 3

Posted February 21st, 2011 (Updated 29 Oct 2011) in Database, PHP

NOTE: If you’re looking for the Doctrine 2 modules for K3 see this post.

Download the module here.

I’ve previously written a module for Kohana 3 for Doctrine, as well as drivers for Kohana’s Auth and Session modules, however I’ve finally had the time to merge the three and fix up some longstanding issues present with them; namely the folder structure and lack of PDO support. To make my life a little easier I’ve moved the project to Google Code too.

You can find the project here. It’s got Doctrine 1.23 already in there, you should just be able to drop it in and add it to your bootstrap file. It also includes sample schema and data fixtures for the kohana auth and session modules – they can be found in /models/fixtures.

Good luck!

Read More »

Page 10 of 15« First...89101112...Last »