468x60

May 14
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I’ve just solved a funky little problem with Compiz and Emerald, whereby Emerald wasn’t used for window decorations, and changing the Theme via the Emerald Theme Manager accomplished nothing - this is after upgrading to Ubuntu Hardy Heron, by the way. If you don’t have Emerald installed, it can be done by running, in a Terminal:

sudo apt-get install emerald

or via the Synaptic Package Manager. The same goes for the CompizConfig Settings Manager:

apt-get install compizconfig-settings-manager

Anyway, the problem boiled down to Compiz not using Emerald for Window Decoration, and was thankfully veyr easy to solve, by pointing Compiz to the Emerald binary. Open up the compizConfig Settings Manager - System -> Preferences -> Advanced Desktop Effects Settings and select the “Effects” category from the left menu. Click on “Window Decoration” from the selectionin the right pane, and for Command, enter:

/usr/bin/emerald

Make sure it’s enabled, and close the CompizConfig Settings Manager. In order for the new settings to take effect, wither restart X by pressing Ctrl+Alt+Backspace, or run the following in a Terminal:

compiz --replace &
emerald --replace &

Now Compiz is using Emerald for my Window Decorations, and I can once again change the Emerald Theme dynamically via the Emerald Theme Manager.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: ,

May 13
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

There are times - many in fact - when I need to find a file, or multiple files containing a particular string. For example, I’m developing a web application, and need to find out which pages call a particular class method, say, all the files which call the getTopTenCDs() method - I can do this by opening a Terminal, and running grep (Global Regular Expression Print), with a couple of options:

grep -r -n 'getTopTenCDs()' /var/www/cdcollection/*

This will return a list of files, and the lines within those files, and the line numbers containing the string ‘getTopTenCDs()’ in the directory /var/www/cdcollection/. The -n option tells grep to output the line numbers, the -r option tells grep to search recursively through the sub-directories too, and * tells it to look in all files - which can be changed to *.php etc: /var/www/cdcollection/*.php

So, the output would be something along the lines of:

/var/www/cdcollection/viewcd.php:192:   $topTen = $cd->getTopTenCDs();
/var/www/cdcollection/sidebar.php:215:   $topTen = $cd->getTopTenCDs();

If I just want a list of files without the lines containing the search string, I can use the -l option:

grep -r -l 'getTopTenCDs()' /var/www/cdcollection/*

which would simply return:

/var/www/cdcollection/viewcd.php
/var/www/cdcollection/sidebar.php

As the name implies, grep uses Regular Expressions, and therefore the search string can contain the usual RegEx operatiors: . ? * + {n} etc. RegEx is out of scope for this post I’m affraid - there are dozens of great tutorials available on RegEx, and applying RegEx to grep.

One final point about grep: if the search string begins with a hyphen (minus sign, or whatever you want to call “-”), the search string needs to be preceded with the -e option:

grep -r -e '-starts with a hyphen' /var/www/cdcollection/*

so that grep doesn’t mistake the search pattern for an option! Forget the -e option, and you’ll get:

grep: invalid option -- $
Usage: grep [OPTION]… PATTERN [FILE]…
Try `grep –help’ for more information.

Also, remember the ever useful pipe | and output to file > commands. If the list printed by grep is huge, you can simply pipe it to more:

grep -r 'getTopTenCDs()' /var/www/cdcollection/* | more

or, if you want to save it to a file to peruse later:

grep -r 'getTopTenCDs()' /var/www/cdcollection/* > ~/grep_output.txt

Always useful.

Finally, remember to take a look at the grep man page:

man grep

Which contains a world of useful information, including a wealth of options I haven’t covered.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: , , ,

May 12
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Skype. Skype, skype, skype… Say it enough times, and it sounds like a nonsensical sound. Mind you, say any word repeatedly, enough times, and it ceases to sound like a real word and becomes gibberish, randomly rolling between toungue and palate like a peanut in a tin can. Try it. “Flannel” is a great word to experiment with, although after 30 seconds of repeating it, you’ll probably question your sanity…

But anyway, this post isn’t about language, it’s about how I got Skype installed, and customized the look and feel of the GUI. I’ll not bore you with the details on what Skype is, and what it does - most people know already, and most likely found this page by searching for “Installing Skype on 64 Bit Ubunutu”, or some such string. If not, you can check out the Skype website.

First things first - as of writing this post, there is no 64 Bit version of Skype available for Linux. Thankfully, it is possible to install 32 Bit applications in 64 Bit Ubuntu with the correct libraries:

sudo apt-get install ia32-libs

ia32-libs is available through the Universe repositories, which can be activated by going to System -> Administration -> Software Sources and checking the “Universe” option.

Having installed the correct libraries, I downloaded the deb package (generic download page here), and saved it to my Desktop. Since it is a 32 bit application, dpkg requires prodding with the –force-architecture and –force-depends options:

cd ~/Desktop
sudo dpkg --install --force-architecture --force-depends skype-debian_2.0.0.68-1_i386.deb

(The current version is 2.0.0.68-1 - if you have downloaded a later version, you’ll need to replace the version number in the file name with the current version. If, like me, you’re lazy, you can copy and paste everything up to and including “skype” then press the Tab key… the Terminal will fill in the rest of the file name).

That’s pretty much it. Skype can be found under Applications -> Internet -> Skype.

Since Skype is a Qt application, it is possible to customise the interface using an application called qtconfig. For Completeness I also installed the msttcorefonts package, which installs a few, well, core MS True Type fonts, such as Times, Courier, etc.

sudo apt-get install msttcorefonts
sudo fc-cache -fv

Running fc-cache will rebuild the Font cache to include the newly installed fonts. Restarting X by pressing Ctrl+Alt+Backspace will also do the trick. With this done, I installed the Qt Config application:

sudo apt-get install qt3-qtconfig

To give the Qt applications a “Gnomeish” look, there is a theme called Polymer available:

sudo apt-get install polymer

With these installed, it is possible to run the Qt Config tool from either System -> Preferences -> Qt3 Configuration, or by executing qtconfig in a terminal. The first tab - Appearance - allows us to select the Polymer theme, by changing “Select GUI Style” to Polymer:

The second tab, “Fonts” allows control over how Qt displays text. Skype can be made more readable and friendly, by increasing the font size to 10 Points, and changing the font family to Sans Serif:

Save the changes with either File -> Save or Ctrl+S, exit, and start Skype (or any Qt application) to see the changes.

That’s it!

References:

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: , ,

May 11
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I noticed today that a bunch of applications, and even some web sites were displaying interesting fonts, making the application/web site unusable and unreadable - most notably QT applications. The text rendered like an interesting cross between Hindu and Arabic. This issue just so happened to crop up shortly after transferring a bunch of fonts over from my Windozzze partition to Linux:

cd /media/hda1/WINDOWS/Fonts
cp * ~/.fonts
sudo fc-cache -fv

Basically, there seemed to be a conflict between the fonts already installed in Linux, and the fonts I had just transferred over. So, I removed all the fonts, and copied over just the True Type Fonts and Open Type Fonts:

cd ~/.fonts
rm *.*
cd /media/hda1/WINDOWS/Fonts
cp *.ttf *.TTF *.otf *.OTF ~/.fonts
sudo fc-cache -fv

So far so good - the funky script has been replaced with readable text. I guess I’ll have to move the rest one-by-one to find the miscreant font…

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: ,

Apr 30
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Azureus LogoI love the fact that a huge amount of the applications I regularly use are available via the package manager, but sometimes, I like to install applications myself. Azureus is one such application - I wanted to install the latest x64 version, and utilise the x64 JRE I had installed for the x64 Eclipse IDE. Of course, it can easily be installed by running

sudo apt-get install azureus

(in Ubuntu) and everything is done automatically. But, this is how I installed it.

I had already installed x64 JRE (see 64 Bit Eclipse: Linux Installation, including PDT, WTP (WST), ATF, and MySQL (SQL Explorer Plugin)), but for the benefit of those who haven’t, don’t want to read that particular article, or just can’t be arsed scanning through it, here’s the procedure again (skip to —END x64 JRE INSTALL— if you don’t want to read this part!)

The 64 Bit JRE can be downloaded here (or use the direct link to the bin file). After the file downloaded to my desktop, I opened up a new Terminal Window (Applications -> Accessories -> Terminal), traversed to the directory I wanted to install it into, moved the file, made it executable, and ran it to install:

cd /usr/java
sudo mkdir 64
cd 64
sudo mv ~/Desktop/jdk-6u5-linux-x64.bin /usr/java/64/
sudo chmod a+x jdk-6u5-linux-x64.bin
sudo ./jdk-6u5-linux-x64.bin

If the “java” directory doesn’t exist by the way, it needs to be created first:

sudo mkdir /usr/java

Anyway, listing the directory

ls

should return

jre1.6.0_05

which is the directory containing the necessary Java binaries.

—END x64 JRE INSTALL—

The 64 Bit version of Azureus (currently v3.5.0.2) can be downloaded here. Once the archive had downloaded to my desktop, I unpacked it:

cd ~/Desktop
tar -xjvf Azureus_3.0.5.2_linux-x86_64.tar.bz2

As usual, I like to put applications (which don’t need compiling and installing) into /opt

sudo mv azureus /opt

Within the /opt/azureus folder, is a shell script for running the Azureus client called, funnily enough, azureus. However, to get it working with the 64 Bit JRE I had installed, I had to make a couple of minor adjustments to the script:

cd /opt/azureus
gksu gedit azureus

Line 5 contains a variable for the Java program directory:

JAVA_PROGRAM_DIR=""

so, I simply inserted the path to the JRE bin directory:

JAVA_PROGRAM_DIR="/usr/java/64/jre1.6.0_05/bin/"

saved the script, and closed the editor. I can now run the Azureus client by running this script:

/opt/azureus/azureus

Alternatively, it can be run from the Applications menu by creating an entry pointing to /opt/azureus/azureus - open System -> Preferences -> Main Menu, highlight “Internet”, and click “New Item”. Enter “Azureus” for the name, /opt/azureus/azureus for the Command, and change the icon to the Azureus logo by clicking on the Icon, and browsing to /opt/azureus/azureus, which will automatically list the images in the folder to choose from.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: , , ,

Apr 30
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I wanted to see if I could take advantage of my Dual Core CPU during boot time, by enabling concurrent init.d scripts, in the hope this could improve (an already pretty fast) boot time. The implementation is pretty simple - first, I backed up /etc/init.d/rc

cd /etc/init.d/
sudo cp rc rc.BAK

then set about editing /etc/init.d/rc

gksu gedit /etc/init.d/rc

Actually, there isn’t much to edit - I just needed to change:

CONCURRENCY=none

to:

CONCURRENCY=shell

on line 24, save the file, and reboot. However, when I rebooted, there was a gnarly error caused by HAL (Hardware Abstraction Layer) failing to initialise. After some digging, I found a bug report, and a solution. The cause of the problem, and the solution is actually quite simple. At run level 2, HAL and DBus are set to start at the same time - in the /etc/rc2.d/ directory, both symbolic links have the same S12 prefix (S12hal and S12dbus):

ls -l
...snip...
lrwxrwxrwx 1 root root 14 2008-04-26 00:52 S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 13 2008-04-25 18:58 S12hal -> ../init.d/hal
...snip...

which causes a problem with concurrent init.d scripts, since they are now executed at the same time. HAL initialises slightly faster than DBus, but requires DBus in order to initialise, hence the “failed to initialize” error. The solution is equally simple. As suggested in the bug report, I changed the execution order of HAL. I had to do this via the recovery console, but so long as you don’t reboot after saving the /etc/init.d/rc file, it can be done via the GUI terminal:

sudo mv /etc/rc2.d/S12hal /etc/rc2.d/S13hal
sudo reboot

This time, there was no problem, and no error, since it ensures that DBus (S12dbus) initialises before HAL (S13hal).

If I still get problems in the future, I can always restore the old version of /etc/init.d/rc:

cd /etc/init.d
sudo cp rc.BAK rc

Coupled with boot profiling, this does speed up my boot time by shaving an extra few seconds away.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: , , ,

Apr 28
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Like most other Ubuntu users, I recently upgraded to 8.04 (Hardy Heron), but numerous power cuts, and a sketchy internet connection screwed up the upgrade process, resulting in a horribly drawn out process of reinstalling a fresh copy of 7.10, downloading and installing the updates, and finally the alternate CD for 8.04… but that’s another story for another time…

During this process, I found that the Ubuntu archive repository, http://archive.ubuntu.com/ubuntu/ was somewhat slower than usual. Thankfully, there are many mirrors available to download from - most are up to date with the latest packages. https://launchpad.net/ubuntu/+archivemirrors has an extensive list, so I looked for one with an “Up to Date” status, and edited my sources.list:

gksu gedit /etc/apt/sources.list

commented out the current archive site:

#deb http://archive.ubuntu.com/ubuntu/ hardy main universe multiverse restricted
#deb http://archive.ubuntu.com/ubuntu/ hardy-updates main universe multiverse restricted

and added the mirror:

deb http://ubuntu.positive-internet.com/ubuntu/ hardy main universe multiverse restricted
deb http://ubuntu.positive-internet.com/ubuntu/ hardy-updates main universe multiverse restricted

After saving the file, and starting the Update Manager, I simply had to click “Check” to retrieve the update information from the mirror. Alternatively, this can be done with the “Reload” button in the Synaptic Package Manager.

Simple, but effective, leading to much faster downloads, and you can always revert back to using archive.ubuntu.com by uncommenting the entries in sources.list, and commenting out/deleting the mirror entries.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: ,

Apr 27
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Sorry if you were expecting a substantial research report, but there really is no need for an in depth technical evaluation and comparison. No need to waste your time with specifications and benchmark results. No funky table with the pros and cons of each operating system. All you need do, is watch the following video.

Even if it’s satire, it’s more than enough reason to switch to Linux…

You need to a flashplayer enabled browser to view this YouTube video

Cringe

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: , , ,

Apr 21
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I love Photography, and any oportunity I get, I try and take photos. I have a great camera, and living in the jungle, fantastic surroundings and photo oportunites everywhere I look. The only thing I’ve been lacking is a digital darkroom for Linux. OK, so we Linux users have GIMP, CinePaint (a fork from GIMP 1.0.4 specifically for photo/movie frame editing), and ufraw - a RAW digital image processor, along with a bunch of other great tools for image processing, but I just wanted to try something more. I’ve tried installing the trial version of Adobe Photoshop Lightroom with wine, but with no success, and as such, have continued my search for a viable Linux based digital darkroom…

A couple of days ago, I set up a makeshift studio at home so I could do a photoshoot of my wife and new baby (well, I say studio - it was in fact a couple of dark blankets I found about the house, no lighting, reflectors, or any of the expensive professional gear!). Once finished, I really wanted to process some of the better shots to send to my family, and so was determined to find something I could install and use on Linux.

Tenacity prevailed, and I finally discovered Lightcraft’s Lightzone - a Java based digital darkroom, with versions available for Mac, Windows and Linux! The Linux version is currently in Beta, but in all honesty, having used it for the past few days, I couldn’t tell. Installation is as simple as you can get - download the archive (registration is required, but it’s worth it), extract the files, enter the new directory, and run the LightZone executable:

tar -zxvf LightZone-3.4.tar.gz
cd LightZone
./Lightzone

After a dialog appears informing how many days of the trial are left, the splash screen displays as the program loads. The GUI is incredibly intuitive, and within minutes, I managed to process a couple of pictures worth sending to my family. When the application first opens, it’s a simple case of using the pane on the left to navigate to a directory containing photos. LightZone automatically generates thumbnails, and a larger preview of the chosen thumbnail with an option to edit. A single click on “Edit” brings up a whole array of processing options to play with.

After a few clicks, and mainly fumbling around the system, I managed to turn this raw image:

into a Black and White 10×8 Portrait that my Mum will love:

I’m incredibly happy with the results of a few minutes clicking and fumbling around an unfamiliar system! If this is what can be achieved by doing so, I’m really looking forward to getting my teeth into the system, and learning it’s many features - HDR (High Dynamic Range) support, Zone Systems, and many more.

Unfortunately however, I only have 9 days left on the Trial, since the Linux version is still in Beta, and therefore not available for purchase. I have no idea how much the Linux version will be when it’s finally released, but the Windows and Mac versions retail at $129.95 for the Basic version, and $199.95 for the Pro version. Unfortunately, both out of my price range for the time being (that’s a hell of a lot of money where I live!), but I’m certainly going to enjoy the Beta version while I can, and dream of when I can afford to buy the Pro version! Still, I’ll see if I can make some time to write a couple of tutorials and post them.

LightZone is a fantastic product. The only thing extra I would like to see, is a 64 Bit version.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: , ,

Apr 14
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I was cleaning up my computer today, and came across an old screen shot on my Windozzze XPoo partition. I took it back in the day, when Gmail was invite only and you had to enter a Captcha type string when you logged in…

 

Gmail Captcha tentshit

Gotta love random strings!

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot

written by Hodge \\ tags: