Thursday, October 21, 2010

Installing Synergy on Ubuntu 10.10

Synergy is a great program that lets you share your keyboard and mouse between multiple computers.  It's a must have if you have multiple computers on your desk and has some great features like a shared clipboard so you can cut and paste text from one computer to another.  If you haven't used Synergy before it's works like a normal multi-monitor setup except when you move your cursor off the edge of your screen you are controlling a different computer.  A good example is when I have my laptop at work I put it next to my desktop machine and have synergy set up so that when I move the cursor off the right hand side of my screen the mouse and keyboard attached to my desktop are now moving the cursor and typing on the laptop.  For this to work you need to have both computers connected to a network and Synergy installed.

One of the best things about Synergy is that it is cross platform and works with Linux, Windows and OSX.  The easiest way to use Synergy on Ubuntu is to install QuickSynergy which provides a GUI for managing screens and connections.

The QuickSynergy UI on Ubuntu 10.10

There are two ways to install QuickSynergy, either open the Ubuntu Software Center and search for "synergy" or type the following at the terminal:

sudo apt-get install quicksynergy

The QuickSynergy icon will now appear in your "Accessories" menu.

I have also written up a guide to installing QuickSynergy in Meego:

Monday, October 18, 2010

Installing Apache, MySQL and PHP5(LAMP) on Ubuntu 10.10

Setting up LAMP(Linux + Apache + MySQL + PHP) stacks is something I do quite often and in Ubuntu 10.10 it's really easy.  Just open a terminal and type:

sudo apt-get install tasksel

and then:

sudo tasksel install lamp-server

and that's it, you will be prompted to enter information during the installation such as MySQL password etc. during the installation process.

To check apache is up and running visit in your browser.

Note: the default web root is /var/www

Some other useful stuff:

I always need to use CURL too, to install CURL for php just type this:

 sudo apt-get install php5-curl

and mod rewrite for apache:

sudo a2enmod rewrite

After installing mode rewrite or CURL you need to restart apache like this:

sudo /etc/init.d/apache2 restart

Sunday, October 17, 2010

Install Modern Warfare 2(MW2) on Ubuntu 10.10 with Steam

Installing Call of Duty:Modern Warfare 2(MW2) with Steam is very simple in Ubuntu 10.10.  I assume that running the standard MW2 installation in Wine will also work fine but seeing as I am a Steam user I decided to take the extra step of installing MW2 via Steam.  Everything works great too, I am running the game at 1920x1080 with no lag or choppiness.  The installation is basically the same as the Windows installation except for the extra step of installing Wine.

Step 1: Install Wine
To install steam and play the game you will need to first install Wine.  To install the latest version of Wine simply open the "Ubuntu Software Center" and the search for "wine" and the install "Wine Microsoft Windows Compatibility Later(Beta Realease)".

Installing Wine via the Ubuntu Software Center

Step 2: Install Steam
To install  Steam just head over to the steam website and download the Windows installer.  After you have downloaded the installer you need to give the file execute permissions before you can run it so just right click the file and go "Properties" -> "Permissions Tab" and then check "Allow executing file as program".  Now just double click the installer and the Steam install wizard will appear and you can just follow the steps as you normally would

Steam running in Ubuntu 10.10 with Wine

Step 3: Install MW2
This step is pretty damn easy, just install MW2 via Steam like you would normally on Windows and then you are good to go.  Note: the installing DirectX step of the MW2 installer took a while to complete, don't worry it works just give it a few minutes.

MW2 running like a dream on Ubuntu 10.10
So that's really it, super easy and working perfectly.

I'm really pleased with the performance of MW2 using Wine and Steam, up until now I have kept a dual boot with Win7 for playing games but now I can finally do away with Windows altogether.

Wednesday, October 13, 2010

Calibrating Touchscreen in Ubuntu 10.10

After installing Ubuntu 10.10 on my Asus eee T91 I was pleased to notice the touchscreen was working out of the box.  Unfortunately the calibration was off and I could not find the calibration utility.

These instructions are now deprecated and I recommend using the xinput_calibrator utility which can be found here:

This old method is left here for reference only.

I was able to successfully calibrate my screen using the following method:

Open a terminal and type the following:

xinput list

You should see something like this:

⎡ Virtual core pointer                     id=2 [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer               id=4 [slave  pointer  (2)]
⎜   ↳ IDEACOM  IDC 6680                       id=8 [slave  pointer  (2)]
⎜   ↳ IDEACOM  IDC 6680                       id=9 [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad               id=13 [slave  pointer  (2)]
⎣ Virtual core keyboard                   id=3 [master keyboard (2)]
    ↳ Virtual core XTEST keyboard             id=5 [slave  keyboard (3)]
    ↳ Power Button                             id=6 [slave  keyboard (3)]
    ↳ Sleep Button                             id=7 [slave  keyboard (3)]
    ↳ USB 2.0 Camera                           id=10 [slave  keyboard (3)]
    ↳ Asus EeePC extra buttons                 id=11 [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard             id=12 [slave  keyboard (3)]

Note where it has the first "IDEACOM  IDC 6680", that's your touchscreen.  There should be an id in the second column ie. "id=8"

pass the id into the next command(I'm using 8 as the example)

xinput set-int-prop 8 "Evdev Axis Calibration" 32 300 7900 400 7800

That should have set your screen calibration, the last 4 values are the actual calibration numbers.  You may need to tweak these numbers for your monitor, so just fiddle with the values and rerun the command  until you are happy with the calibration.

At the moment you will lose your calibration when you reboot so to make it permanent do the following:

sudo gedit /etc/X11/Xsession.d/98x11-common_touchscreen

Paste you calibration command from the step above into the file and save.

This will run the command on bootup so your calibration is now set.  If anyone finds a better way to do this please post a comment.

These instructions were adapted from posts on this thread on the Ubuntu forums:

Note: I have been experiencing a bug using the touchscreen where every 4th press or so it seems to register as a drag operation rather than a click.  If anyone finds a solution to this please post a comment.

Monday, October 11, 2010

Installing Elegant Gnome on Ubuntu 10.10

One of my favourite things about Ubuntu is the ability to customize the UI and installing Elegant Gnome is one of the first things I do after a fresh installation.  Elegant Gnome is a theme pack that gives your desktop a very slick look(compared to the default theme) including matching Firefox and Chrome themes and an awesome icon set.

My netbook with Elegant Gnome showing the nautilus theme, also using Docky

To install this theme in Ubuntu 10.10 just do the following:
Open a terminal and run the following commands:

sudo add-apt-repository ppa:am-monkeyd/nautilus-elementary-ppa

sudo apt-get update && sudo apt-get upgrade

nautilus -q

sudo add-apt-repository ppa:elegant-gnome/ppa && sudo apt-get update

sudo apt-get install elegant-gnome ttf-droid

then go Applications -> Accessories -> Elegant Gnome and select install pack

After reboot go to System -> Administration ->Update Manager and update otherwise nautilus UI will be missing icons.

Adapted from the 10.04 instructions found here:

Fixing Docky compositing error in Ubuntu 10.10

After installing Ubuntu 10.10 on my Asus eee T91 with the GMA500 drivers and no compiz enabled  I installed Docky and received the following error:

"Docky requires compositing to work properly. Please enable compositing and restart docky."

To fix this error type the following at the terminal:

gconftool-2 -s --type bool /apps/metacity/general/compositing_manager true

then restart Docky.

Here's one I prepared earlier, running with the new GMA500 PPA and no  Compiz

Note: If you are wondering about the theme and icons check out my post on installing Elegant Gnome here.

Sunday, October 10, 2010

Installing gma500(poulsbo) drivers in Ubuntu 10.10

To install the GMA500 drivers on your Ubuntu 10.10 Maverick Meercat install do the following:
Open a terminal and type:

sudo add-apt-repository ppa:gma500/ppa && sudo apt-get update

sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config

then reboot.

Your screen resolution should now be correct.

NOTE: using the gma500(poulsbo) with Ubuntu is not recommended for new Ubuntu users as you will not have the full Ubuntu experience due to the proprietary nature of the drivers.  Please understand this is not an Ubuntu issue but is related to copyright and intellectual property rights associated with this chipset.  If you are a new Ubuntu user and want out of the box support for the gma500 Jolicloud does a pretty good job.

Hope this helps.

I also recommend checking out my guide to installing Elegant Gnome a great theme for Ubuntu.