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. ;)

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!

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: Ubuntu Font Private Beta Testing

ubuntu-font-private-beta-testing

With so many people talking about the new Ubuntu Font that’s soon to be released to the public for beta testing, I thought I would take the opportunity to post a quick and easy guide to testing these fonts before everyone else does!

Preview of the new Ubuntu Font in action..

If you’d like to test these fonts, then you need to follow these instructions exactly (since the ppa is “private”). I found other site instructions a bit confusing, so if you follow my directions you should have these installed effortlessly and pain free in no time.

Install

  1. With your LaunchPad.net account, go to the following “Kubuntu Users” link and Join their team:
    https://launchpad.net/~kubuntu-users
  2. Now open a new tab and navigate to the following link. Once there, you should see the PPA listed as “ppa (ppa:ubuntu-font-beta-testing/ppa)” in your list and it may be the only one. There should be a link labeled “View” to the far right of it, click it.
    http://launchpad.net/people/+me/+archivesubscriptions
  3. The link that you just opened when clicking view should list software sources for this PPA that are unique to you. Open your software sources list file and copy these two source lines to the bottom, save and close (using the following command to open the sources).
    sudo gedit /etc/apt/sources.list
  4. Add the PPA key so the package is authenticated properly when you install:
    sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 42F834EC
  5. Update your software sources. Your new access to the private PPA may take between 5-15 minutes before its processed, so if you see errors for this software source in the terminal, be patient and try updating again in a few minutes.:
    sudo apt-get update
  6. Install the font:
    sudo apt-get install ubuntu-private-fonts
  7. Now that the fonts are install, apply them by right clicking on your Desktop -> Change Desktop Background -> Fonts (tab):

Applying the new font..

You should now have the new font installed. Good luck and enjoy!

Improved Thumbnails In Nautilus

This is how your images look by default.

If you’re using Ubuntu 10.04 or newer then you’ve probably seen the borders around your thumbnail pictures and movies.

This is how your images look by default.

You may like them with a thick white border, but if you’re looking for something a little sharper then give my thumbnail frame tweak a try!

This is how they look with my tweak!

The image that you’ll be downloading to use from me gives the thumbnails a drop-shadow effect and gives them a bit of a 3D stylish feel rather than a rounded clunky feel.

Open a terminal window and copy/paste the following commands to install or remove.

How to Install

  1. wget http://a.imageshack.us/img135/8666/thumbnailframe.png
  2. sudo mv thumbnailframe.png /usr/share/pixmaps/nautilus/thumbnail_frame.png
  3. killall nautilus

Restore to original

  1. wget http://a.imageshack.us/img651/5790/thumbnailframey.png
  2. sudo mv thumbnailframey.png /usr/share/pixmaps/nautilus/thumbnail_frame.png
  3. killall nautilus

Enjoy the new style thumbnails if you like them! This was brought about by a thread at UbuntuForums.org entitled “Changing the Nautilus ugly thick white border for thumbnails“. You can post either here or at the forums for help or general friendly comments!

How-To: Fix Your Ubuntu Boot Screen

If you’re using Ubuntu 10.04 or newer and have installed the proprietary Nvidia or ATI video drivers then you likely know what I’m talking about.

The nice Ubuntu boot screen that you saw during the installation is now a low quality image and the resolution is wrong. Fortunately for you and I, there is a fix for this written by Marius Nestor at Softpedia.

I’ve taken the liberty to implement his steps in a single script that makes the work on your end a much easier task. Only use this script if you have not already attempted to follow Marius Nestor’s tutorial.

Warning: Use this script at your own risk.

Steps

  1. Download the zipped script and extract it: plymouth-resolution-fix.sh.zip
  2. Open a terminal window and navigate to the directory containing the script.
  3. Enter the following command to make the script executable:
    chmod +x plymouth-resolution-fix.sh
  4. Enter the following command to run the script (followed by your password):
    sudo ./plymouth-resolution-fix.sh

Be patient for this script to complete, it will let you know when it is. After its complete, simply reboot your computer to verify the results.

To Revert these Changes

If you’d like to undo these changes, you can download the following script and run it the same as you ran the first one. This will undo the changes made.

Linux: Things I’m Looking Forward To

Closed source Skype 2.1.0.81 in Ubuntu 10.10.

Open Sourcing Skype

Skype is already available in Linux and usually works well. However, Skype to due to release an open source client (keeping the back-end closed source). Fortunately for Linux users, this means that you will likely get to use only one messenger client such as Empathy or Pidgin without ever opening the old Skype client and still have your Skype buddies listed in Empathy or Pidgin.

Closed source Skype 2.1.0.81 in Ubuntu 10.10.

While the announcement was released in November 2009, there is no expected date of arrival. So unfortunately, Linux users could be waiting anywhere from a few more weeks to a few more years.

I’m looking forward to never having to launch the Skype client again and simply using Empathy alone to chat and call all of my Skype friends!

Dropbox 0.8.x

Anyone who has ever used Dropbox knows that it is dang good at what it does. You need something backed up? Drop it in your Dropbox folder and forget about it.

Current Dropbox 0.7.110 in Ubuntu 10.10.

Experimental builds of Dropbox 0.8.x have been in the works since February 2010 and appear to be progressing nicely.

With Dropbox 0.8.x, we will gain a new feature called “Selective Sync” which will enable you to pick which files and folders from your Dropbox to sync, giving you more overall control.

Dropbox 0.8.x also  brings a wealth of performance improvements to the table. With faster startup times and lower memory consumption when idling, this update is sure to be well received. File attributes are now noted and properly synchronized, so if you make a script executable on one computer it will be updated on all others as well. This is very handy for Unix/Linux users.

Rhythmbox Last.fm Plugin Updates

Being a Last.fm user myself, I find myself scrobbling a lot of music and very few options to manage my profile. I’d love to see this plugin integrate the ability to “Love” and “Unlove” tracks that you are playing from Rhythmbox itself.

Rhythmbox + Last.fm plugin in Ubuntu 10.10.

According to OMG! Ubuntu!, a developer by the name of Jamie Nicol will be improving this plugin in the  Google Summer of Code event. The details of what will be improved with this project are vague to say the least, but very promising.

Ubuntu 10.10 Sound Indicator Applet

The sound indicator applet is receiving an update which will manage to bring all of your sound controls into a clean and simple menu.

Case scenario mockup (image source).

With this project well underway, you are already able to view what’s playing in Rhythmbox and pause/play the song from the menu. The artist, title and album are also implemented, leaving album art, playlists, back and forward controls, and a song progress bar to be anticipated.

Windicators (aka Window Indicators)

Windicators, as Mark Shuttleworth describes them, are indicators located in the top right side of a Window’s title bar that indicate specific states of applications that users should be alerted of.

Mockup of Windicators for Ubuntu 10.10

From the mockup, you can see that Windows producing sound will likely have per app volume control windicators. Those dealing with stores and shopping carts will feature a shopping cart windicator to help you manage and navigate what you’ve stored away to buy.

I’m really hoping that this Windicator will be used in applications such as web browsers and the Ubuntu Software Center (which, by the way I think should be renamed to the Ubuntu App Store) so that web sites like eBay or Amazon and the Software Center can take advantage of this feature.

Theme enhancements for Maverick

There are a number of theme enhancements that are set to land in Ubuntu 10.10 and will help to polish the user interface.

One improvement will be closer maximize and minimize buttons. The improvement, as I image it, can be seen below, but is not meant to represent a final product in any way.

Closer max/min buttons mockup.

Scrollbar steppers don’t appear clickable. One design I’ve been hoping for, but have yet to see anything implemented, is some nice themed steppers. Nicer of course than my crude artistic example below. ;)

Mockup of a clicked or hovered stepper.

Also mentioned is “Changing GTK to allow for a rounded stepper,” which is why I rounded the button in the mockup (if you click to view the larger version).

There are several other changes to be made for the theme, but as far as I’ve seen they’ve yet to appear in updates.

Compiz 0.9

One of my favorite features in Ubuntu is desktop effects which are powered by Compiz. It seems like compositing windows managers have been changing at an incredibly unpredictable rate since I first started using Linux.

I first started using Beryl to get cool effects for the desktop way back in the early stages of Ubuntu. Soon after, Compiz-Fusion became the next big thing. This developed as a bit of a merge between Compiz and parts of Beryl.

Not long thereafter, various Compiz related branches were merged and the project became known simply as Compiz again. What’s cool about this is that in the merge, Compiz was being ported from C to C++ (also known as Compiz++) giving it a large number of benefits (that I won’t get into here).

Ubuntu 10.10 using the Cube in Compiz.

The good news is that Compiz 0.9 unstable has been released and is ready for regression testing! Hopefully it won’t be a great deal longer before Compiz 0.9 matures and is released into the wild.

Vavle’ Steam Client

If you don’t already know about Steam, according to Wikipedia it’s “a digital distribution, digital rights management, multiplayer and communications platform developed by Valve Corporation.”

The Steam client..

Its been rumored that the Steam client will be coming to Linux, but all we can do is wait in anticipation and see what happens.

Steam recently became available to Mac users, so it may not be too far fetched. If it does come to Linux then it will bring a plethora of games to the platform that would have otherwise never been available.

Here’s to hoping that someday soon I will be able to play Counter-Strike: Source without booting up into Mac or Windows (or using Wine).

Ubuntu Boot Screen Fixes

While there are ways to fix the boot screen yourself, I tend to prefer them just working automatically. This isn’t the case in Ubuntu 10.04 if you’re using the nVidia or ATI video drivers.

Ubuntu 10.04 Boot Screen

Being only in Alpha 2, Ubuntu 10.10 still uses the boot screen of 10.04 as pictured above. While this is a very nice boot screen, it does have several problems.

As I said earlier, if you’re using nVideo or ATI drivers then you’ll have problems where the boot screen’s resolution is horribly wrong and your boot screen looks more like a crash.

Ubuntu is on the track of speeding up boot times, but if your system hasn’t booted before the animated dots make their cycle then you get to see it again. While this isn’t a horrible failure, its still a very unpolished design and desperately needs some attention. Still worse, the shutdown screen uses the same animation which gives it the illusion of loading, not unloading.

Grub Boot Loader

I’m hoping that if they take the time to address the boot screen that they will also take time to polish the boot menu for dual booting users. In its textual state it looks like something straight out of the days of DOS, and since Ubuntu is “Linux for Human Beings” I would say its time to ditch the textual Grub interface and move on to a polished Burg menu…based on Grub, but graphical.

Get Your Last.fm Wallpaper From Wallpaperfm

An example from my Last.fm account in Collage mode.

If you have an active Last.fm account and like to switch up your wallpaper from time to time then you’ll love Wallpaperfm!

Example from my Last.fm account in Collage mode.

This python script, by Koant, has been around since at least 2008, but I’ve only recently stumbled across it. It’s easy to start using and is available for Windows, Mac and Linux users!

I’ll help you get started in Linux since that’s what I’ve set it up on. If you need more help or want more configuration options you should look to the information that Koant has posted on his website.

Install

  1. cd
  2. mkdir wallpaperfm
  3. cd wallpaperfm
  4. wget http://ledazibao.free.fr/wallpaperfm/wallpaperfm.py
  5. chmod a+x wallpaperfm.py

Create Your Wallpaper

  1. ./wallpaperfm.py -u YOURLASTFMUSERNAME

That’s the most basic set of options you can use to create your wallpaper (which you will find after running the script in the “wallpaperfm” folder that was created).

There are three options for the type of wallpaper created:

1. Tile

Albums are packed in side by side.

2. Glass

A few albums are highlighted on a glassy surface.

3. Collage

Albums are meshed together in a dreamy design.

To specify one of these modes, simply run the wallpaper script with the mode flag set to your choice.

  • ./wallpaperfm.py -u YOURLASTFMUSERNAME -m collage

There are plenty of other settings you can specify such as size, canvas size, filename, profile period, final opacity, cache, excluded albums, local copy, etc.

Suggestions and Ideas

User Interface and Packaging

I’m sure that this script could be simplified further for Linux users (and more specifically, Debian/Ubuntu users) if a user interface were created. It actually seems like a rather simple task since the parameters for the script are well bounded.

Adding this interface to an installer package would also be a very simple task and would most likely get more attention to such a neat tool!

Cron Jobs, Regularly Updating Your Wallpaper

Another thing, if your music preferences are constantly changing like mine, you may be interested in updating your wallpaper in regular intervals. To do this you can setup a Cron job that runs in the background.

While this may sound difficult and confusing, its really not at all and this helps explain a lot. I can even walk you through the steps.

  1. sudo apt-get install gnome-schedule
  2. Open the application (in Ubuntu) through the Applications menu -> System Tools -> Scheduled tasks.
  3. Click the New button and select the Recurrent task type.
  4. Give the task a description.
  5. Enter the command that runs your script. If you followed the steps above then it should be something similar to:

    /home/YOURUBUNTUNAME/wallpaperfm/wallpaperfm.py -u YOURLASTFMUSERNAME -m collage -f /home/YOURUBUNTUNAME/wallpaperfm/wallpaper

  6. Set the Time & Date option to hourly, daily, weekly, or monthly.
  7. Click the “Add” button to add it to your list of Scheduled Tasks and you’re done!

Have any other suggestions or tips? Leave ‘em in the comments!

Linux: Time Delayed Screenshots

A little while back I ran into a problem in Linux and wanted to take a screenshot of it. In most cases you can simply press the “Print Screen” key on your keyboard and move on.

In other cases its not so simple. Often times, when you want to take a screenshot of a menu, you’ll find that the screenshot tool cannot be called while the menu is open. You can get around this problem in most cases by installing Shutter.

While Shutter is a great tool with some very handy features for screenshots, it also doesn’t always work or is unable to capture some things (as far as I’ve found).

One solution that is very simple to use is a simple command line (link sent to me from a friend). If you hate command line tricks then you can easily make a Gnome button for this as well. ;)

The menu that I was trying to grab a screenshot of was an Opera sub-menu from the O-menu icon (can’t remember which one for sure, but probably the Bookmarks sub-menu). Print Screen wouldn’t work, Shutter complained that it couldn’t detect any open or focused menus, so I resorted to the following:

$ gnome-screenshot --delay=10

Basically, this command calls the same program that is called when you press Print Screen, but since you’re adding a delay (10 seconds in this case) it has already been called before you open the menu..which rules out the problem of your keyboard Print Screen key not working.

While this seems to be a very simple command, which it is, I’ve benefited from it several times already. So if you ever find yourself having trouble capturing a particular screenshot, just pop open a terminal and use this delayed command!

If you’re looking for for an easier method and don’t mind a permanent button in your Gnome panel, just do the following:

  1. Right click your panel and select “Add to Panel…”
  2. “Custom Application Launcher” should be the first option in the list that comes up. Select it and click the “Add” button at the bottom.
  3. Leave the “Type” as Application.
  4. You can name this launcher anything you wish, maybe something like “10s Delayed Print Screen”.
  5. Copy the command that I mentioned above into the field labeled “Command”. You can change the value from 10 to anything you want or need.
  6. You can copy the name text into the “Comment” field as well since this is what you will see when you hover the button.
  7. You could optionally edit the icon if you wanted, but its not necessary. Click close and you’re done.

Enjoy!

Want cool desktop stats? -> Conky!

ubuntu-conky-example-1

Have you ever wanted to have awesome looking stats on that rest on your desktop and don’t interfere with your work flow? If so, you’ll probably love this nifty little application.

Example of a basic Conky setup.

Its called Conky and it can give you stats or information on practically anything imaginable. Its also easy to install!

Conky is by no means a new application and there are in fact hundreds of Conky configuration files scattered across the Internet that you could use to customize the way yours looks. With a good basic guide and some helpful tips on auto-starting Conky, I’ve thrown together a quick installation and setup guide with pictures! ;)

Typically when you install an application such as this, you want it to auto-start. Auto-starting this application isn’t as trivial as most applications so I’ll walk you through that as well. I’ll assume your using Ubuntu of some sort, but if you’re not don’t worry…you can still install Conky with alternative steps and setting it up should not differ.

Install

  1. Open the “Ubuntu Software Center” application (also known as “Add/Remove” in older versions) and search for Conky. If its not listed then you may need to find a package online.

    Find and install the Conky option entitled something along these lines: “highly configurable system monitor (all features enabled)“.

  2. Create a file labeled “.conkyrc” in your home directory (usually saved as /home/username/.conkyrc) and make sure to include the period at the start. This will make the conky settings file hidden when you casually open your home folder so its not in your way. You may need to go to View -> Show Hidden Files or press Ctrl+H to view the file to edit it later.

    Open the “.conkyrc” file in a text editor of your choice.
    Paste the linked snippet into your “.conkyrc” file.

  3. Create a file labeled “.startconky.sh” in the same folder as the previous file making sure to include the period at the beginning and the file type at the end.

    Open the “.startconky.sh” file with your favorite editor. Paste the following snippet into your “.startconk.sh” file:
    #!/bin/bash
    (sleep 5s && conky) &


  4. Save both files and close the file editor you were using. Now right-click on the “.startconky.sh” file and click Properties and select the Properties tab. Make sure you check the option to “Allow executing file as program” then click close.
  5. Go to your startup applications program or System -> Preferences -> Startup Applications and add a new application with the command option as “/home/username/.startconky.sh” where user name is your home directory…as follows:
  6. Click Save! Now the next time your restart your computer you’ll have some awesome stats that appear on your desktop!

Ubuntu 10.04 and LifeCam VX-1000

If you’re using the same web cam that I’m using, the Microsoft LifeCam VX-1000, then you may already be familiar with the difficulties involved in the process of getting this web cam to work in Ubuntu…or rather, the difficulties that were involved.

After countless days spent and hours wasted over the past 4 months that I’ve owned this web cam, I had not been able to find a solution to see it work even once.

The problems I ran into were that the few solutions for this camera were specifically for 32-bit Ubuntu, while I’m using 64-bit Ubuntu.

Typically these days, this type of problem isn’t architecture specific in Linux, which means that fewer people have to battle the problems that are unique to x86_64 platforms. In my experience with Ubuntu, x86_64 application/firmware support 4 years ago was a joke. Today, x86_64 support is commonplace and practically a standard.

After upgrading to Ubuntu 10.04, I was able to see this support change yet again! Without configuring anything in Ubuntu 10.04 x86_64 the video feed from my web cam was working flawlessly (I tested using Cheese 2.29.90)!

There is the small matter of getting the mic on the web cam to work, but for now I’ve got an old mic that plugs into the ports from the motherboard. So I will have sound, just not through the web cam just yet. Hopefully I can find a solution to this as well, in which case I will be sure to link you to. ;)

In the future, I’d also like to submit a patch or hack to enable the LifeCam Call Button like I did previously in Windows 7 so that you can configure what the button should do…take a picture, video, start a call or chat, etc.