Jul 17

~$ man woman
No manual entry for woman

Hmmm…

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

written by Hodge \\ tags: ,

Jun 16

I’ve been wanting to set up a virtual host, with mod_rewrite on my system for a while, so I could have a local copy of my blog with Permalinks, for playing around, and despite a few hiccups, have finally got round to setting it up and implementing it successfully.

Apache Software Foundation Logo

Creating a Virtual Host

Note: The Apache installation in Ubuntu is actually controlled by the file /etc/apache2/apache2.conf with /etc/apache2/httpd.conf being a secondary config file loaded after apache2.conf. It’s advisable to leave apache2.conf alone, and make any server-wide changes to httpd.conf. The Ubuntu Apache installation also goes a step further by allowing site-specific configuration files, which are located in the directory /etc/apache2/sites-available. One already exists, and is called “default”, which controls the web root, /var/www. To activate any new sites created in this directory, we just create new file in this directory, then create a symbolic link to it in the /etc/apache2/sites-enabled directory. When Apache starts, it scans the apache2.conf, httpd.conf files, and also the /etc/apache2/sites-enabled directory for any links to config files in /etc/apache2/sites-available. If the link isn’t there, the configuration isn’t loaded.

For this tutorial, we’ll be creating a new config file in /etc/apache2/sites-available and activating it by creating to it in /etc/apache2/sites-enabled - apache2.conf and httpd.conf will not be touched.

Ok, I wanted to create a Virtual Host called 64bitjungledev.com, and also be able to view the site on my local installation when I point my browser to 64bitjungledev.com. The first thing I did was create a directory for the new Virtual Host to reside in. I was feeling particularly lazy, so just created it in the /var/www directory, and changed the owner of the new directory to my user name and group (so I could add/edit files etc.) I know, I know, I should create it in my home directory - but everything with “/var/www/ can be substituted for “/home/USERNAME/html/”. Anyway, in a Terminal, I executed:

sudo mkdir /var/www/64bitjungledev
sudo chown myuser:mygroup /var/www/64bitjungledev

Then, I created a new config file in the /etc/apache2/sites-available to contain the configuration information for my new Virtual Host. In a Terminal, I executed the following:

cd /etc/apache2/sites-available
gksu gedit 64bitjungledev.com

This creates a new file called 64bitjungledev.com in the directory and opens it in a text editor. In this new file, I dumped:

<VirtualHost *>
ServerName 64bitjungledev.com
ServerAlias www.64bitjungledev.com
DocumentRoot /var/www/64bitjungledev
DirectoryIndex index.php
<Directory /var/www/64bitjungledev>
AllowOverride all
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from 127.0.0.1
</Directory>
CustomLog /var/log/apache2/64bitjungledev.com-access.log combined
</VirtualHost>

This is basically telling Apache that we want it to host a new site, called 64bitjungledev.com, and all it’s files will be located in /var/www/64bitjungledev. “Allow from 127.0.0.1″ tells Apache that only my computer can access it, and “AllowOverride all” tells Apache that the site can use .htaccess files that contain Apache declarations that can override these settings. The CustomLog declaration is telling Apache to create an access log file for this site in /var/log/apache2/64bitjungledev.com-access.log and the “combined” tells it to include two extra fields of information in the log file - The “Referer” (sic) HTTP request header, and The User-Agent HTTP request header. Probably superfluous considering all trafic will be refered from my local machine, and the only agent accessing the site is Firefox! You can change “combined” to “common”, which doesn;t include these two fields.

Anyway, I digress… There are two methods to enabling the new site - create a symbolic link in /etc/apache2/sites-enabled to this new file, or, have Ubuntu do it for us:

cd /etc/apache2/sites-available
sudo a2ensite 64bitjungledev.com

Will do exactly the same as:

sudo ln -s /etc/apache2/sites-available/64bitjungledev.com /etc/apache2/sites-enabled/64bitjungledev.com

To disable the site, we can run:

sudo rm /etc/apache2/sites-enabled/64bitjungledev.com

Or:

sudo a2dissite 64bitjungledev.com

The result is the same. In order for the URL 64bitjungledev.com to work in my browser, I just had to change the hosts file, so my computer looks for 64bitjungledev.com on my machine as opposed to looking it up via DNS:

gksu gedit /etc/hosts

I changed the line

127.0.0.1 localhost

to:

127.0.0.1 localhost 64bitjungledev.com www.64bitjungledev.com

Saved, and closed the file. Now, I had to restart Apache for the new changes to take affect:

sudo /etc/init.d/apache2 reload

I created a test file in the document root:

gedit /var/www/64bitjungledev/index.php

Containing the old faithful:

<?php
phpinfo();
?>

and pointed my browser to www.64bitjungledev.com. Success! Now for mod_rewrite…

Enabling mod_rewrite

First, to enable the Apache module, mod_rewrite (which is disabled on a default Hardy install), I had to create a symbolic link to the module file, so in a Terminal, I ran:

sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

The Apache installation in Ubuntu has many different configuration files, and uses this modular approach to activae/deactivate them. The rewrite.load file simply contains the load module declaration which would normally be placed in the httpd.conf file:

$more /etc/apache2/mods-available/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

When Apache starts in Ubuntu, it checks the /etc/apache2/mods-enabled directory for links to available modules, and loads the modules it finds. Creating the link above can also be achieved by running:

sudo a2enmod rewrite

which is basically a short-cut approach to creating the link in /etc/apache2/mods-enabled, similar to the a2ensite used above - and, similarly:

sudo a2dismod rewrite

will have the same effect as:

sudo rm /etc/apache2/mods-enabled/rewrite.load

That’s pretty much it. The only additional thing I had to do, was make a slight change to the /etc/apache2/sites-available/default file, which, as mentioned above, is the default Apache configuration file for /var/www. So, I opened it up:

gksu gedit /etc/apache2/sites-available/default

And changed the “AllowOverride” declaration to “all” for both the / and /var/www directories. I just needed to restart Apache once again:

sudo /etc/init.d/apache2 reload

Testing mod_rewrite

Before going ahead and installing a local copy of 64bitjungle, I wanted to test if the system was working. I needed two files for this - a .htaccess file, and a PHP file. The .htaccess file contains the test RewriteRule for Apache to process the URL redirection of “clean” URLs to the PHP script, so that www.64bitjungledev.com/xyz/somedata will actually point to www.64bitjungle.com/thescript.php?thevariable=somedata. So, in a Terminal, I created the .htaccess file first:

gedit /var/www/64bitjungledev/.htaccess

And wrote a simple Apache RewriteRule, in addition to telling Apache to switch on the rewrite engine:

<IfModule mod_rewrite.c>
RewriteEngine On
#test rule
RewriteRule ^xyz/([^/\.]+)/?$ thescript.php?thevariable=$1 [L]
</IfModule>

This is basically telling Apache to switch on the RewriteEngine if mod_rewrite is loaded. The rather scrappy-but-suffices-for-testing RewriteRule basically tells Apache to “grab every character in the clean URL after xyz/ and store it in a temporaty variable, then forward it to thescript.php with thevariable set to the stuff just stored”.

A very simple PHP script can be written and used to test if the data is being passed properly:

gedit /var/www/64bitjungledev/thescript.php

which can contain simply:

<?php
echo $_GET['thevariable'];
?>

After restarting Apache, pointing my browser to www.64bitjungledev.com/xyz/DoesItWork now outputs “DoesItWork”, www.64bitjungledev.com/xyz/anything1234 ouputs “anything1234″ etc. The fun just doesn’t stop…!

With mod_rewrite successfully installed, and working for this new domain, I can now install a local version of 64bitjungle.com to play with. I haven’t actually done that yet though…

References:

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

written by Hodge \\ tags: , , ,

May 31

The webcam (Acer Orbicam) on my Acer Aspire 5052 has been somewhat of a bane - with no drivers available, it has been one of the last stumbling blocks of getting all of my hardware working in Linux (the Ubuntu 8.04 Distro, Hardy Heron, in my case). That is until I ambled across, quite by accident, the Microdia Google Group. These guys are the epitome of Open Source development in action - a group of widely distributed people who are collaborating to solve a common problem: to get the Microdia webcams supported under Linux. And they’re doing a fantastic job so far.

Note: I should first mention that the drivers are still heavily under development, and although they are not (at least for my webcam) to the point where they can be used for Skype, for example, major progress has been made, and there is now finally communication with my webcam, to the point where I can successfully output video to mplayer. Therefore, this post is not quite yet a HowTo on getting a Microdia webcam fully function, but a step towards helping people installing and testing the drivers under development.

So, here’s how I’ve got to the stage of seeing myself in mplayer…

Information Gathering

Firstly, I had to determine i) whether or not my Webcam was in fact a Microdia camera, and ii) the model number, so in a Terminan, I ran:

lsusb

Which output, amongst other information about the rest of my USB devices:

Bus 003 Device 002: ID 0c45:6260 Microdia

confirming that my Acer Orbicam is a Microdia device. The two hex values 0c45:6260 represent the Vendor ID and Product ID respectively - 0c45 being Microdia, and 6260 the Product itself. In order to create my meagre contribution to the Microdia Group, I had to gather some more information about the device’s bridge and sensor. Firstly, I needed the USB Device Descriptors, which were obtained by running:

sudo lsusb -d 0c45:6260 -v > ~/Desktop/0c45_6260_device_descriptors.txt

I then needed to discover the Bridge and Sensor types, which thankfully could be found in the Windows driver file, snp2std.inf:

%USBPCamDesc% = SN.USBPCamVGA,USB\VID_0c45&PID_6260 ; SN9C201 + OV7670ISP

Which tells me:
Bridge: SN9C201
Sensor: OV7670

The full guide to gathering information for your webcam can be found at the Microdia group, here.

Driver Installation

The driver code is controlled by git, which I installed by running:

sudo apt-get install git-core gitk git-gui git-doc curl

Also, before downloading and installing the drivers, I ran:

sudo apt-get install kernel-package linux-source build-essential

To grab the Linux source etc. Once finished, I created a directory to set up my local git repository and downloaded the driver code:

cd ~/Documents
mkdir webcam
cd webcam
git clone http://repo.or.cz/r/microdia.git

The final command executes git, and tells it to clone the remote repository. The files are downloaded to a sub directory called microdia, from which I ran the rest of the commands:

cd microdia

In my case, I also needed to switch to the experimental branch of the code, since the patches for the 6260 are applied to the experimental code, not the main code (this step may not be required for other devices - check the microdia group):

git checkout --track -b v4l2-experimental origin/v4l2-experimental

The current patch (as of 31/05/08) for the 6260 camera can be found in this thread. I downloaded the patch to the microdia directory, and applied it to the code (this step is NOT required if you don’t have a 6260 device - check the group discussions for other patches, if required):

git apply 0001-Added-support-for-6260-YUYV-and-more-verbose-debug-m.patch

then compiled the code:

make

I received an error, but it’s not important:

make: ctags: Command not found
make: *** [ctags] Error 127

Once compiled, the module can be inserted to the kernel for testing:

sudo insmod ./microdia.ko

I received the following error:

insmod: error inserting ‘microdia.ko’: -1 Unknown symbol in module

so had to run the following first:

sudo modprobe videodev
sudo modprobe compat-ioctl32

and then I could insert the module:

sudo insmod ./microdia.ko

Finally, to test, I ran:

mplayer tv:// -tv noaudio:driver=v4l2:width=640:height=480:outfmt=yuy2:device=/dev/video0:fps=30

you may need to change /dev/video0 to /dev/video1 - also, if you don’t have mplayer, it needs installing:

sudo apt-get install mplayer

The only thing is… it’s currently a mirror image, hehehe:

References

  1. Microdia, Google Group
  2. How to gather information on your webcam
  3. Using git with Microdia
  4. Testing the Microdia driver
  5. PATCH: v4l-experimental support for 6260 (3rd try) Thread
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Technorati

written by Hodge \\ tags: , , ,

May 25

CHM IconAs most people know, CHM (Microsoft Compiled HTML Help) is a proprietary format, and not supported by default in Linux. Thankfully, there are several options available for viewing CHM files, and even converting them to another format - such as HTML and PDF.

Viewing CHM Files

The simplest method for dealing with CHM files is to download and install a CHM Viewer, for example gnochm or xchm, which under Ubuntu/Debian can be installed via a Terminal:

sudo apt-get install gnochm

or

sudo apt-get install xchm

or via the Synaptic Package Manager, by searching for “gnochm”, or “xchm”. Once installed, CHM files will automatically open within the CHM Viewer.

Converting CHM Files

My prefered method for dealing with CHM files, is to convert them to a more universal format, such as HTML, or even PDF, and there are a couple of ways, and several different tools for accomplishing this.

Conversion Method 1: CHM -> HTML (-> PDF)

HTML IconFirstly, it is possible to simply decompile the CHM file into component HTML files, which can be opened in any web browser. These HTML files may then optionally be transformed into a PDF document. In order to do this, two main packages (with dependencies) need to be installed - chmlib, and htmldoc:

sudo apt-get install libchm-bin htmldoc

The first part of the process calls upon chmlib to essentially decompile the CHM file, and save the new files to a specified directory, for example:

extract_chmLib my_chm_book.chm htmloutputdir

This will pull apart the CHM file, and store all the new HTML files within the “htmloutputdir” directory (within a sub-directory called “final”). If desired, htmldoc can be called upon to convert the HTML files into a single PDF document. Running

htmldoc &

from the Terminal, opens up the htmldoc GUI from which the HTML files can be selected for input, the output formatted, and PDF document generated. The htmldoc website has extensive documentation which covers this process, but for converting to PDF, I find the next method much easier!

Conversion Method 2: CHM -> PDF

PDF IconA tool written in Python, called chm2pdf, essentially cuts out (for the user) the intermediary processes above. It sits as a layer on top of chmlib and htmldoc, automating most of the conversion work, and as such also requires chmlib, htmldoc and additionally pychm (Python binding for chmlib) in order to execute. chm2pdf can be downloaded from the website and compiled/installed manually or, in Ubuntu, installed from the repositories. To install it, and the required additional applications, in a terminal run:

sudo apt-get install libchm-bin htmldoc python-chm chm2pdf

chm2pdf is a command line tool, and in most cases, the default options work for me (outputting an A4 PDF document, with ToC, images, links etc.), and is as simple as running:

chm2pdf --webpage my_chm_book.chm

from the directory where the CHM file is located. This converts the file (to HTML - these files are stored in the /tmp directory), and generates a PDF document with the same name, with the ToC, Index, links, images etc. all intact. Running either:

man chm2pdf

or

chm2pdf --help | less

will output the manual and help pages, both of which contain a wealth of information and command options to perfect and tweak the CHM to PDF conversion process.

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

written by Hodge \\ tags: , , ,

May 21

While aimlessly wandering the web yesterday, I happened upon a rather cool little plugin for Eclipse, called AnyEdit tools, which adds a bunch of useful tools to the context menu of the Eclipse editor, and also to the output consoles, main menu and editor toolbar. Most interestingly for me, is the addition to the context menu which allows opening an included file from the within Editor, which means I don’t have to search through directory structures in the Eclipse explorer to open a file included in the one I’m currently editing. With AnyEdit tools, I just right-click on the include/require statement, and select “Open file under cursor” (Ctrl+Alt+R does the same), and the file is opened in the editor. Cool.

AnyEdit tools is easy to install - in Eclipse, go to Help -> Software Updates -> Find and Install and select the “Search for ne features to install” option. Click on “New Remote Site”, and add “AnyEdit tools” as the Name, and http://andrei.gmxhome.de/eclipse/ as the URL and click OK. Tick the box next to the new site, and click Finish. Once the update site has been contacted, and the plugin list retrieved, expand the AnyEdit tools -> Eclipse 3.3 plugins, and select AnyEditTools 2.0.2. Click Next, accept the agreement, Next, Next, Finish. Once dowloaded, the Update Manager asks to verify the installation - click Install, and that’s it. Eclipse needs restarting to activate the plugin.

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

written by Hodge \\ tags: ,

May 14

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

written by Hodge \\ tags: ,

May 13

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

written by Hodge \\ tags: , , ,

May 12

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

written by Hodge \\ tags: , ,

May 11

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

written by Hodge \\ tags: ,

Apr 30

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

written by Hodge \\ tags: , , ,

Webloogle Blog Directory