Debugging PHP in Ubuntu using Eclipse

This guide walks you through the necessary steps to configure the Eclipse IDE for PHP debugging. This can be very handy, especially when you’re trying to resolve an issue in a complex PHP application or plug-in.

Things you’ll need

  • Eclipse
  • Eclipse PHP Development Tools (PDT)
  • Xdebug
Assumptions
This article assumes that you are configuring Eclipse and Xdebug for development on a localhost web server. If you are not, be sure to make appropriate adjustments to accommodation your needs. Likely the only changes you will need to make will be differences in connecting to your server verses localhost.

Quick Overview

For those that are unaware, Eclipse is a very popular IDE for developing in Java. However, Eclipse is much more powerful than that and can in fact easily be used for developing in many other languages including PHP.

Xdebug is a brilliant debugging extension designed for use with PHP. Once configured, Xdebug will allow you to remotely connect to your web server… or in my case connect to my development localhost web server. Rather than using crude echo and logging techniques to debug your PHP code, Xdebug allows you to literally step through and inspect values and function flows in real-time.

If you’ve ever scratched your head at a PHP script and thrown in dozens of echos or logging statements to track the execution path then you’ll really come to appreciate the benefits of using Xdebug.

Configuring Eclipse and Xdebug isn’t difficult. In fact its painless with the correct steps on hand. That’s where this guide comes in. I found myself coming across incomplete or outdated forum posts and stackoverflow questions, so I thought I’d post what worked for me.

If you already have Java and Eclipse installed, then just jump ahead to installing and configuring the PHP Development Tools and Xdebug.

Install Eclipse

This will install ~118 new packages, assuming you’ve not already installed some of them, and will total around 255 MB that need to be downloaded.

  1. Open a terminal and enter the following command to install Eclipse:
    sudo apt-get install eclipse

     

  2. After the download completes, open Eclipse to confirm that it installed correctly. Leave it open for our next install.

Install PHP Development Tools (PDT)

  1. If you don’t have Eclipse open at this point, open it up.
  2. Navigate through the menus to: Help -> Install New Software…
  3. You will be prompted with a new window asking you to select a site or enter the location of a site. You should be able to drop down the list of sites and find one labeled “–All Available Sites–“. Select this option and wait for the list below to populate.

  4. Scroll through the list until you find a category labeled “Programming Languages” and click the arrow to expand this list.

  5. Continue to scroll through the Programming languages until you find a item labeled “PHP Development Tools (PDT) SDK Feature” and check the box to the left.

  6. Click Next and continue throw the installation. You’ll have to select that you agree to the terms of installing this software.
  7. After the installation has completed, you will be asked to restart Eclipse to apply changes. Go ahead and restart Eclipse, then move on to the next install.

 

Install XDebug

  1. Open a terminal and enter the following command to install Xdebug:


    sudo apt-get install php5-xdebug
     

  2. After installation completes, there are a couple of files that need to be configured. If you copy and paste the commands below, make sure to check that the quotes that are copied over are regular quotation characters, as they may cause problems if they are not.
    1. sudo gedit /etc/php5/conf.d/*xdebug.ini 


      zend_extension=/usr/lib/php5/20100525/xdebug.so

      xdebug.remote_enable = 1
      xdebug.remote_handler = “dbgp”
      xdebug.remote_host = “localhost”
      xdebug.remote_port = 9000 

    2. sudo gedit /etc/php5/apache2/php.ini 

      Scroll to the bottom and add:

      zend_extension=/usr/lib/php5/20100525/xdebug.so

  3. Restart your Apache server so that the new PHP configuration settings are loaded.

    sudo /etc/init.d/apache2 restart

  4. Confirm that your Xdebug installation was successfully loaded by creating a simple PHP file called “phpinfo.php” and placing it in the public root of your Apache web server. Be sure to include the following in your file, save it then navigate to it in your browser:

    <?php phpinfo(); ?>

  5. After loading the php info page, search for “xdebug”. If you find it listed, then you have successfully installed and configured Xdebug. If not, check back over the steps listed above or consult Google.
Configuring your Eclipse project to connect to Xdebug
After you’ve finally gotten everything installed, you’re probably anxious to start debugging. You’re not far off. The only thing that’s left is to import your PHP script or site and establish a Debug Configuration for your project.
To import a site, simple select: File -> New -> Project… -> PHP -> PHP Project. This will open a new window where you can open PHP files from and existing location. Assuming this location is in your public root directory in Apache, you can work with these scripts in real-time.
After importing these existing files, right click on your new project and select: Debug As -> Debug Configurations…
Make sure that you’ve selected Xdebug as the Debugger type. Click Apply and then Debug. This will open a “Debug” perspective in Eclipse, allowing you to view variables and stack traces live. Assuming you’ve created a breakpoint or selected to break at the first line of the file, you should now see your PHP script paused waiting for you to debug!
Tip: If you’re planning to debug a large project such as a WordPress, phpBB, vBulletin or any other large web application, pointing the Debug Configuration to your index.php makes debugging much easier.
Done
Congrats! By now you should be beginning a new road to a much easier life of PHP development.
If you have any questions, comments or suggests feel free to let me hear them below! I’ll try to help where I can, but I can guarantee I’ll know how to solve any of the issues you may encounter. ;)

Making CSS UL Menu’s Browser-Consistent

If you’ve ever made a web site and wanted it to look consistent from one browser to the next, then you’re well away of the difficulties that are involved. Fixing these sorts of styling issues can be a major annoyance, however, I like to hunt down issues on my own pages from time to time and stand up to the challenge.

One issue that I can across today was dealing with horizontal menu positioning using unordered lists (<UL>) and some positioning. The positioning wasn’t consistent between browsers or even operating systems.

The bad

I started by opening the affected page in multiple browsers (Internet Explorer, Safari, Chrome, Opera & Firefox) on multiple computers (Mac, Linux & Windows) and getting some initial comparisons. There were 3 different variations and (oddly enough) the same browser didn’t necessarily render the same on a different operating system. So there I was. A puzzle… and I like puzzles.

Some of the first things that I inspected were font sizes and families. It occurred to me that different operating systems may differ in fonts, so it seemed like a good starting point. I tested this by forcing a common font: Arial. That wasn’t the problem. The inconsistencies remained consistent.

I also checked into the possibility that the <UL> or <A> elements were applying different heights. Typically anchor elements, <A>, use a display style of inline. If you’re implementing a menu similar to mine then you’re likely applying a block style, which permits better dimension definition of the element. Forcing height on these elements also did not resolve the issue.

I was running out of ideas, but then it hit me. Line-Height. While the other styles appeared to be consistent between browsers and operating systems, there was one style that I’d previously worked with and knew was certainly NOT consistent: line-height.

The good

After forcing a consistent line-height in my CSS, all browsers suddenly began respecting my intended styling. Sigh of relief.

On that note, its worth bringing up the success that browser competition has brought to HTML and CSS rendering standards over the past few years. The push for the fastest and most capable browser has brought a scattered group of browsers a little closer and the result is that we get to enjoy dealing with fewer and fewer bugs.

While your average Joe web developer may have dug around for hours for this issue to no avail, I must say… I thought it was nice to face such a subtle issue rather than being forced to use some crazy IE specific hacks like for legacy IE.

Ubuntu Software Center vs. Mac App Store

As many of you may already know, Mac OS X now comes installed with a “Mac App Store”. Ubuntu also comes installed with an “Ubuntu Software Center”. Both of these applications serve the same general functionality in very similar formats, but I’m going to take a look at what needs to be improved in the Ubuntu Software Center.

First off, lets take a look at both of these applications from a first impressions point of view. Its pretty obvious at a glance that the user interface of these applications are eerily similar. It’s also pretty obvious that one app has received a little more attention to detail and aesthetics.

First Glance

The Mac App Store features a rolling banner at the top which highlights new or popular items. This is something that Ubuntu has not adopted. Not that its necessary, but it’s certainly a nice touch.

Both applications feature a “What’s New” and “Top” section, but in Ubuntu the presentation is… well, lacking to say the least. You can probably see a different in the thumbnails above with the polished Mac App Store that seems to just pop and the Ubuntu Software Center that just seems dull and with little focus.

I seem to recall mention of Ubuntu trying to improve the quality of application icons and screenshots. This could go far for improving application presentation! As Ubuntu is increasingly becoming more and more popular, the need for a matured and polished software center is greater than ever.

Now lets look at what kind of information and selling points the Mac App Store offers when you select an item that you may be interested in installing.

Mac App Store – Application Profile Page

The Mac App Store shines with its prevalent display of the item’s icon, a well written brief description and most importantly a screenshot gallery. While a short description of the application is an obvious requirement, the screenshot gallery may be the single best-selling point for an application. These screenshots have the power to showoff not only how nice your application is, but more importantly what it can do! It seems that authors tend to pick a handful of well-chosen screenshots to give a thorough glance at the features and functionality available.

Some other nice details that the Mac App Store offers include information about the author and their website, the application’s version and release date, and of course a customer review section. The review section is just like any other review section, though it does provide a nice break down of the ratings. It’s easy to see the overall rating of an application as well as how many users rated it a one star, two star, three star, etc.

Now lets take a look at what we get from the Ubuntu Software Center.

Ubuntu Software Center – Application Profile Page

The Ubuntu Software Center has actually evolved a great deal over the past couple of years. Just like the Mac App Store, Ubuntu offers a prevalent application icon, a brief description and, when available, a screenshot. However, the simple presentation of these three important details is somewhat lacking.

As mentioned before, it’s not uncommon to find an application with a very poorly created icon. You may also, at times, run into the issue of a poorly written description or find an application with no screenshot available. Even when you find an application which has all the above, you’re only presented with one screenshot which opens in a new window and not simply featuring the larger view from within the software center itself.

Some improvements that I’d personally like to see would be an implementation similar to the gallery in the Mac App Store. I’m not saying I’d like for Ubuntu to clone the Mac App Store, but its clear why improving this feature would be very beneficial for the Ubuntu Software Center.

It would also be nice if the Ubuntu Software Center would pull screenshots of these applications (possibly from their own servers) that are taken in the Radiance or Ambiance theme. I’m sure it can be a little confusing for some when they see a screenshot with a non-default theme applied to it. This is a change that Ubuntu should consider for user familiarity and consistency.

Other important details that the Ubuntu Software Center offers include the application version, a “People Also Installed” section and user reviews. While the availability of the application version is certainly great, the complex versioning system that is so often used in Linux may make it useless for some. I understand the Chromium Web Browser version 18.0.1025.168~r134367-0ubuntu2, however, many people may find this less than ideal.

As for the user reviews, Ubuntu has done a nice job of making it easy to review and contribute to the success or demise of any given application. I’d still like to see a break down of the rating for each level like the Mac App Store does.

Now lets talk a little about some very poor user interface designing…

Ubuntu Software Center – Interface Design

What happens when you view a category or perform a search in the Ubuntu Software Center? Simple, you get a list. What kind of list you may ask? A very space inefficient list that leaves the user endlessly scrolling through results while appearing to be a half-assed implementation.

Mac’s approach to situations such as displaying categories or search results is to throw the results into a table-like layout. While this is a nice implementation, it’s not necessarily the best. There’s one thing that I know for sure though, and that’s the fact that Ubuntu’s current implementation just doesn’t cut it.

Other weaknesses in the design of the Ubuntu Software Center can be attributed to lack of visual divisions between applications in a list or important application details, poor color contrasts, inconsistent styling and a general feeling of the overall application’s color being desaturated.

As far as the poor color contrast, there are many areas throughout the software center that could benefit from adjusting the colors to focus the important content, make it stand out and shine, and make the less important details fade into the background. This technique helps to remove the feeling of having such a cluttered interface while retaining all the same information.

Conclusion

While Mac has always had the edge on other operating systems as far as offering a polished user interface, Ubuntu has come a long way and will continue to improve. Unfortunately, for the last few releases, Ubuntu has been overly focused on their Unity environment and this has left a lot less time for them to spend on improving other very important aspects of the operating system… such as the software center.

That being said, the Ubuntu Software Center certainly is a very usable tool and is much better than it has been in the past. One great thing about open source is the ability to take a bit of code, improve it and then release it as potentially a better alternative. That’s just what happened when Linux Deepin released the Deepin Software Center.

Lets just hope that the Ubuntu developers have taken note of this and will continue to strive for the best possible Linux experience.

Create a Bootable Windows 7 x64 Install Flash Drive from 32-bit Windows

Creating a bootable Windows 7 x64 flash drive from within a 32-bit install of Windows is not as straight forward as it may seem. I recently had to go through this process myself, so I’ll document the steps below.

Things you’ll need

  1. Windows 7 x64 disc image
  2. Windows 7 USB/DVD Download Tool
  3. 32-bit bootsect.exe

Create the installer

  1. Install the Windows 7 USB/DVD Download Tool.
  2. Extract the 32-bit bootsect.exe file to the directory that the Windows 7 USB/DVD Download Tool was installed to. This is usually something like “C:\Users\username\AppData\Local\Apps\Windows 7 USB DVD Download Tool“.
  3. Run the Windows 7 USB/DVD Download Tool and select your Windows 7 disc image. Follow the remaining steps in this tool and your image should be created successfully!

If you’ve followed these steps and your flash installer was created successfully then your next step is to, of course, install Windows 7! Don’t forget to change your boot options to load from USB!

This information is scattered on the web and slightly detailed on the Windows 7 USB/DVD Download Tool page, but I was not able to find a guide laid out as simplified as the one I’ve provided above. In most tutorials they suggest that you download the entire 32-bit iso in order to get the 32-bit bootsect.exe application, but I’ve made that step a lot less troublesome. Hopefully this has helped you!

What do you install in your Ubuntu?

I’ve been keeping lists for a few years of the applications that I install every time I do a fresh install of Ubuntu. I recently made a new list for Ubuntu 11.10

  • Cheese
  • Chromium Web Browser
  • CompizConfig Settings Manager
  • Dropbox
  • EasyTAG
  • Enable Commercial DVD Playback
  • FileZilla
  • Geany
  • Opera Web Browser
  • RapidSVN
  • Spotify
  • The GIMP
  • Ubuntu Restricted Extras
  • VLC
  • Wakoopa

The applications that I install haven’t changed a whole lot over the years, but it leaves me wondering what applications make the cut for others!

 

Submitting Anonymous Usage Statistics

Banshee Media Player Usage Statistics

Being a software developer myself, I tend to pay attention to application functionality and options a little more than the average end user. I’ve noticed that over the last few years when I encounter an option to ‘submit anonymous usage statistics’ I gladly and immediately enable it.

Knowing that you can gain valuable information about the way your end users are using your product, it makes sense for a software developer to include this option and frankly I’m baffled that its not available in most all applications.

I’d like to use this post for two reasons:

  1. To encourage you and others to consider enabling this option in order for developers to get the accurate information that they need to make their product even better!
  2. To maintain a list of these options in various applications that I stumble upon so others are aware.

As I gradually increase the number of applications, feel free to point out applications that I’ve missed and I’ll add them to the list!

Application List:

 

Adium

 

Banshee Media Player

 

Eclipse

 

Google Chrome

 

Google Drive

 

Google Music Manager

 

Opera

 

Ubuntu Software Sources

 

Google Music Manager

 

 

Using Synergy with Mac and Ubuntu

Ubuntu Linux Hostname from Terminal

This is just a quick guide for those of you who also use both Mac and Ubuntu (or really any flavor of Linux) side by side. If you’re not already familiar with Synergy, it’s a small application that connects your mouse and keyboard to one or more machines for a more continuous experience.

Mac and Linux use a graphical front-end for Synergy known as QuickSynergy. Here’s how to get it configured for use between Mac and Ubuntu…

Hostnames

You can find the hostnames to use simply by opening a Terminal window, or if you’re unsure still, simply type hostname and press enter. ;)

If you used the hostname command in Ubuntu, you probably noticed that the “.local” part is not printed out, but it is necessary when dealing with Mac OS X.

Connecting the Two

After selecting the system you’d like to share, configure the Use or Share tab as necessary similar to the examples below:

After configuring Synergy/QuickSynergy you’re all set to start making your life easier!

Unity Opera!

Unity Opera Tab Count

With Unity in the recent spot light and a little free time on my hands, I decided it was time to dabble with the Launcher API. What better combination that my two favorite pieces of software: Unity in Ubuntu and Opera!

With my Unity Opera script, you’ll be able to get extra functionality for Opera by simply downloading a script and adding it to your Startup Applications list. No technical modifications necessary!

The Launcher API provides four features at the moment: Count, Progress, Urgency, Quicklists.

At the moment I’m only able to implement functionality for three of these, with the exception being Progress. In its current implementation, Unity Opera has the following features:

Count

The total number of tabs you have open appears on the Launcher icon and is updated in real time as you open and close tabs.

One item to note here is that Opera’s Private tabs are not included in this tab count. Since information about these tabs and their contents are not stored anywhere on your computer, Unity Opera has no way of discovering them.

Progress

At this point in time, the progress functionality for this script is not available. Until I find a way to programmatically determine download progress in Opera, I will not be able to implement this.

If you have any information regarding a way to implement this feature then please let me know!

Urgency

When browsing the net, not every link you click on is from inside the web browser. Sometimes you click a link from an instant message, mail client, Gwibber, etc. This is where urgency comes into play.

Typically clicking these links automatically opens the tab in your browser, but it doesn’t always pull you’re browser into focus. When this happens, you may not know which browser the link opened in or if clicking it was even successful.

When Opera is not in focus and a new tab is opened, the Opera icon in the Launcher now enters urgency mode and wiggles onces. An urgency highlight is also applied to the icon and a small attention reminder in the upper left corner until you focus Opera again (this clears the urgency setting).

Quicklists

Previously I shared a tip on how to customize your Quicklists for Opera. That method meant that you had to manually open and edit the desktop file.

This is no longer the case, as these features are already built into Unity Opera.

On top of that, your Speed Dial items are also appended to the Quicklist, making your life that much easier! ;)

If you use Opera’s built in Mail client, also known as M2, then you will see an Opera for Mail, which is intended to open M2 directly. At the moment, this feature doesn’t work as intended, but hopefully in due time it will.

Download Unity Opera

Unity Opera is written in python and can easily be updated and maintained. I suggest you save and extract it to your Home directory and use it there, but you are free to place it anywhere you wish.

Download

Running Unity Opera

You can run Unity Opera in one of two ways:

1. The easiest way in my opinion is to simply add it to your Startup Applications.

To do this simply open your dash and search for ‘Startup Applications‘. Once there, click ‘Add‘ and fill in the blanks!

To run Unity Opera on startup, I place the script in my home folder. You can place it where ever you wish, but if you pick a place other than your home folder then you will need to provide a full path the script in your startup command.

An example of what I use is as follows:

python unity-opera.py

2. The other option is to open a terminal when you want to use this script and run the command above.

Options

This script has several options. For help and more information type:

python unity-opera.py –help

This script accepts two optional args:

1. Opera Channel: This is used for setting Unity Opera to run against regular Opera and the new Opera Next channel. By default, if you exclude this arg, Opera is set as the browser to run against. Examples of this command include:

python unity-opera.py opera

python unity-opera.py opera-next

2. Enable features: This is used to enable specific features. You can enable only basic quicklists [q], quicklists with Speed Dial entries [qs], tab count [c], urgency notification [u], and progress [p].

As mentioned before, progress is not functional at the moment, but I’ve built the script with this feature ready to include as soon as I find a way. ;)

This second argument requires the use of the first argument. Examples of this command include:

python unity-opera.py opera -qs

python unity-opera.py opera-next -qsu

Troubleshooting

If you experience trouble with this script, please try running it from a terminal to see if there are any errors output to the console. If so, copy and paste these in the comments below and I will take a look at them.

Quicklists for Opera in Unity

Opera Extended Unity Menu

Thanks goes to Jorge Castro and a recent post of his about Quicklists in Unity.

After reading his post and seeing how easy it was to add new Quicklist entries, I decided to give it a go with Opera.

As you can see, my efforts were successful, but there are many more list items you could add to customize Opera’s Quicklist to suit your needs.

Get It for Yourself

If you’re using Ubuntu 11.04 with Unity and want to customize this menu for yourself then just follow follow these simple steps.

1. Open a terminal and type the following (and enter your password when prompted):
sudo gedit /usr/share/applications/opera-browser.desktop

2. Scroll down to the bottom of this open file and paste the following:
X-Ayatana-Desktop-Shortcuts=NewTab;NewPrivateTab;NewWindow;Mail;

[NewTab Shortcut Group]
Name=New Tab
Exec=opera -newtab
TargetEnvironment=Unity

[NewPrivateTab Shortcut Group]
Name=New Private Tab
Exec=opera -newprivatetab
TargetEnvironment=Unity

[NewWindow Shortcut Group]
Name=New Window
Exec=opera -newwindow
TargetEnvironment=Unity

[Mail Shortcut Group]
Name=Mail
Exec=opera -mail
TargetEnvironment=Unity

3. Save and close the text editor. You may need to restart Unity or your computer before changes take effect.

Customize your Quicklist

If you’d like to add more items to the Quicklist, simply add a shortcut name for it in “X-Ayatana-Desktop-Shortcuts" and create a "Shortcut Group" for it.

A couple of things that I considered adding were Gmail and Google Reader so that they simply open in new tabs. I’m sure you can find other useful shortcuts to add or maybe even more Opera command line options!

Remove your Changes

If you don’t like the Quicklist items that you’ve added, all you need to do is open the opera-browser.desktop file and remove the lines that were added. Save, close and voila.

Conclusion

Quicklists are great, but they would be more useful with Opera if we were able to select from a list of open or recent tabs.

The new tab and window shortcuts that I’ve added are enough for me at the moment, but I would really love to see them added by default in the near future!

How to setup and use Tor Anonymity in Ubuntu

tor-vidalia-control-panel-ubuntu-11-04

Just before the new year, I saw a news article by Wired that highlighted flaws found in the Tor Anonymity Network. I had never used Tor, but I knew what it was, the benefits it could provide, and a bit about how it worked.

With a little free time on my hands I decided to set it up and see what all the fuss was about. At the time I was installing the Tor components in OS X, but I was curious about installing it in Ubuntu and the resources and instructions that I came across were not as straight forward as they could have been. That is where this post comes it, to provide a simple step by step guide with no fuss.

What is Tor?

This is how Wikipedia explains Tor:

Tor is a system intended to enable online anonymity, composed of client software and a network of servers which can hide information about users’ locations and other factors which might identify them. Use of this system makes it more difficult to trace internet traffic to the user, including visits to Web sites, online posts, instant messages, and other communication forms. It is intended to protect users’ personal freedom, privacy, and ability to conduct confidential business, by keeping their internet activities from being monitored.

What does it look like?

Tor itself doesn’t have a graphical user interface (GUI), but there is an application known as Vidalia which provides a nice and simple user interface for controlling all of your Tor needs.

When installing Tor in Ubuntu, you will need to install 3 components: Tor, Polipo, and Vidalia. Tor and Vidalia should now be obvious to you (since I’ve explained that Vidalia provides a GUI to Tor).

Again, according to Wikipedia here is what Polipo is:

Polipo is a fast and lightweight, forwarding and caching proxy server, SOCKS proxy and computer software daemon.

Install Tor in Ubuntu

This is really quite simple and I could easily provide a simple bash script to automate all of this for you, but that would mean that I would have to maintain it and that you wouldn’t learn anything. ;)

For simplicity, I will write this guide assuming you are using Ubuntu 10.10, aka Maverick. If you’re using a different version, make sure you change the necessary bits below.

  1. Open “Software Sources,” select the “Other Software” tab, click the “Add” button at the bottom and paste the following:

    deb http://deb.torproject.org/torproject.org maverick main

    Click “Add Source,” then click Close. When it asks if you want to Reload, click yes and ignore any errors for now.

  2. Open a Terminal and add the Tor Repository keys and update Apt:

    gpg –keyserver keys.gnupg.net –recv 886DDD89
    gpg –export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add –
    sudo apt-get update

  3. Install Tor, Polipo, and Vidalia:

    sudo apt-get install tor tor-geoipdb polipo vidalia -y

    When prompted during the installation of Vidalia, select the option to permanently replace (or however it is worded).

  4. Download a pre-made config file for Polipo:

    wget https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:/build-scripts/config/polipo.conf
    sudo mv /etc/polipo/config /etc/polipo/config.bak
    sudo mv polipo.conf /etc/polipo/config

  5. Now Stop and Restart both Tor and Polipo for safe measure:

    sudo /etc/init.d/tor stop
    sudo /etc/init.d/polipo stop
    sudo /etc/init.d/polipo start

    Open the application Vidalia when you would like to connect to the Tor network. If you want it on by default, you can always set Vidalia to autostart with your computer.

  6. All thats left is to configure your Applications to use the Tor proxies! If you don’t adjust the network settings of your applications to use the Tor proxy settings then you’re not using Tor at all. You can confirm that Tor is indeed working by visiting the Tor detector page.

If you run into issues for any reason, check back through the steps listed above. If that still doesn’t fix them, you might check the Community Ubuntu Documentation on Tor page or the official Tor for Linux/BSD/Unix page.

Configuring applications to use the Tor proxies

There are 2 types of configurations for Tor:

  1. HTTP or HTTPS – Typically used for web browsers such as Opera, Firefox, Safari, Google Chrome, etc.

    Host: 127.0.0.1
    Port: 8118

  2. Sockets – Typcially used for instant messaging applications such as Trillian, Digsby, MSN, AOL, Empathy, Pidgin, etc.

    Host: 127.0.0.1
    Port: 9050

Nearly any application that allows you to adjust network settings by using proxies can make use of the Tor Anonymity Network. Configuring your application of choice is a matter of selection to use HTTP or Sockets.

If you’re unsure, use trial and error. ;)

A great note that I came across on the Community Ubuntu Documentation page for Tor that I think everyone should read carefully before using Tor is as follows:

What’s the use of having Tor and Privoxy setup without enabling your new anonymous proxy in your common web applications? At this time Tor only supports HTTP and HTTPS traffic, but still recommends using Tor in your browser’s proxy settings for all protocols as a hidden image link can give away your IP address if linked to an image on an FTP site.

Conclusion

Hopefully by this point you’ve successfully configured Tor for all of your anonymity needs. Will Tor works great, it only works great if you’ve configured it correctly.

Some Tor connections may be slower than others. If you’re experiencing a connection that is simply too slow for your needs or if you need a new ip address so you can get that file from RapidShare without having to wait for an hour, simply open Vidalia Control Panel and click “Use a New Identity.”

Remember that Tor can be used for Windows and Mac, and is more straightforward to install for them as well.

While there have been a few flaws exposed, as mentioned before, I would tend to think the risk of being identified over Tor is very low since the attacks would have to occur on the same network that you’re connected to. I typically only use Tor at public internet access points (which is where these attacks would be most likely to occur), but it can be very handy in many situations and will likely continue to be on the list of my apps to install for a long long time.

Opera 11 in OS X

mac-browser-comparisons

This is a post that I started a couple of months ago, but finally just got around to revising (since Opera 11 has since been released) and finishing. Hopefully its all in tact. ;)

Being fairly new to Mac OS X, I was excited to install Opera and see how it compares to the default browser Safari as well as others such as Firefox and Google Chrome in terms usability and appearance.

While I hadn’t used Mac OS much since version 9 and then briefly OS X (with my old iBook before it died), I did remember that Opera didn’t exactly have the most elegant user interface. Nor did most other third party web browsers that I tested at the time. Then again, OS X wasn’t as refined then as it is now either. Keep in mind, these are my opinions and you are free to have your own. ;)

I was happy to find that Opera seems to have the most natural feeling user interface when compared to Firefox and Google Chrome, using Safari as the standard since most die-hard Mac users are likely familiar with it the most.

While I didn’t capture Safari in a view where the tabs are visible, the image above is a decent comparison of the browsers’ default address bars and navigation buttons.

As you can see, the buttons, address box and search box in Opera mimic those found in Safari quite well and are not much of a change at all for any ex-Safari user. The tabs used in Opera are also very similar to those found in Safari (pictured below), with the most significant exception being that they are flipped vertically and placed above the address bar (in Opera) rather than below (like in Safari).

While some people may prefer Firefox or Google Chrome over both Opera and Safari, the point remains that their designs are inconsistent with the overall look and feel of the OS in general. That’s not to say that Opera doesn’t have some inconsistencies of its own. There are a few of them, but most of what I’ve found are minor detail tweaks that are needed to perfect the skin.

Just to mention a few things that are stand out to me, the “New tab” icon size should be decreased slightly, retaining the Opera style while removing the unnecessary bold touch. If you compare this button to the same button found in Safari you’ll notice that Opera’s approach is a bit too bold and that changing this makes it more elegant looking (in my opinion of course).

The borders for the navigation buttons, address box and search box should all be slightly adjusted to match the colors used for these in Safari. There are slight inconsistencies among these, with disabled button borders being darker than enabled button borders.

Another inconsistency with Opera is that text boxes in the address bar are not highlighted with a blue glowing border when they are focused…as they are in Safari, Firefox and Google Chrome. Its difficult for me to see if this is advantageous or simply an oversight, however, the “pro-integration” side of me certainly thinks this should be fixed to match the behavior of other browsers in OS X.

Various icons throughout the user interface need to be desaturated to remove color for consistency. An example of this can be found in the address box with the drop down icon. If you look close, the drop down icon is actually blue whereas other similar icons, like the drop down icon in the search box, are gray scaled. This is also a bug I’ve seen in the Windows and Linux skins, but the OS that demands attention to detail is likely the one that this is most noticeable on.

The Speed Dial page, though it was “invented” before the other spin-offs, now uses a darker background that makes it feel a bit more familiar to Safari’s implementation. I find this to add to the integration effect, whereas previous Speed Dial background images felt out of place. On the other hand, Opera doesn’t boast comparatively appealing 3D thumbnails or features to those found in Safari. Instead, the Opera Speed Dial packs in a redundant search box and no immediate method of searching through your history (visually at that!) or displaying your top visited sites automatically.

With a default Speed Dial tab open, knowingly or not, you’re looking at three different ways of searching the Internet…all with the same available list of search engines. You can search from the address bar by simply prepending your search terms with a specific search engine “keyword”, from the dedicated search box in the address box or from the additional search box in the Speed Dial. If I had any influence on this design, I would remove both dedicated search boxes and make the address box smarter and more visually suggestive of performing a search when it is in use.

While I’m suggesting changes to the Speed Dial tab, why not take advantage of Opera’s ability to generate thumbnails of pages to give the user a visual of the pages they are searching through just like Safari is capable of? With the ability to generate these thumbnails already, there is no reason why Opera shouldn’t implement a similarly more appealing visual search of previously visited sites.

As I said before, all browsers have their problems with UI design and integration, especially in Mac OS X. Of the available browsers for this platform, the one with the most features and the best OS X integration is far and away Opera 11. The performance improvement isn’t bad either, with my test results showing Opera 11 beating out Safari 5.0.3 easily in the SunSpider benchmark. You can take my opinions with a grain of salt if you wish, but you should undoubtedly give Opera 11 a spin if you haven’t already!