Friday, 30 December 2011

Sound Blaster Audigy on Ubuntu

I had problems getting my Sound Blaster Audigy to output any sound on Ubuntu. My desktop has an AMD/ATI Radeon HD card that has HDMI (which means there's some sound capabilities that make things more confusing) and a web cam that has an in built microphone, also making things more complicated.

Now on to the fix:

First, we need to install gnome-alsamixer

If you like the terminal, type

sudo apt-get install gnome-alsamixer

...Or use Ubuntu's software center or your favourite package manager (such as Synaptic) to get that step done.

Then, find and run it:

Now choose the tab labelled something like "SigmaTel…" and
Enable/check the box beside the text "Audigy Analog/Digital Output Jack":

...And now your sound should be working again!

Credits go to my source:

Which 11.10?

Just thought it may be useful to someone... If you're into Linux, you may feel confused with the latest changes in our good old desktops. Gnome 3, Unity, etc.

For what is worth, I'm using Xubuntu 11.10 on my netbook (Asus EeePC 1015PX)
and Ubuntu 11.04 (64 bit version) on my desktop (Phenom II quad-core rig I assembled myself). I love the fact that I can choose Gnome 2 (Ubuntu classic) at login, as shown by this screenshot:

If you have any question, post them on your comments. I'll be glad to answer them, as soon as I have the time.

Friday, 23 December 2011

Sun Java on Ubuntu 11.10

Decided to 'fork' my previous post because since Ubuntu 11.10, Sun/Oracle Java has been removed from Canonical's partner repository. Fortunately, Roberto Ferramosca is providing the appropriate packages in his personal package archive (PPA).

So open your terminal, and let's go:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin sun-java6-fonts

And that's it. Hope it's helpful. Now if you want to ensure Sun's JRE & JDK are the default, type in the terminal:
sudo update-alternatives --config java
and select your preferred alternative from the list. To select a Java compiler, type
sudo update-alternatives --config javac
Now on to the testing. You should get the version numbers of the currently installed and default runtime and compiler by typing (in the terminal):
java -version
javac -version

Sunday, 4 September 2011

Windows, Java and Geany

One of these things that happen in the worst possible moment...

If you want to use the nice and simple Geany IDE under Windows, I'd recommend you to install all the programming languages before you install Geany.

In my case, installing Java and then Geany didn't work at all. Geany wasn't able to compile or execute my Java code. Even after uninstalling and reinstalling both Geany and Java in all possible combinations.

Hope this warning will help someone out there.

Note: Newer versions of Geany have been released, they may have overcome this problem, but I still install Geany after JDK (Java Development Kit) to avoid issues.

Ubuntu 11.10 Beta

I'm curious, so I downloaded Ubuntu 11.10 Beta and tested the live CD.

What I can tell you is that Unity keeps getting better (I'm not a big fan, though, I prefer the good old Gnome, xfce and lxde), the interface looks more polished, and improved.

Ubuntu Classic is gone, though. That's what I didn't like. So we'd have to install another desktop if we wanted options. From the terminal (or Synaptic, which isn't on the live CD either, so you'd have to install it, too) try:
sudo apt-get install lxde
Of course lxde there could be replaced by xfce or gnome, lubuntu-desktop, xubuntu-desktop.

Friday, 22 July 2011

Ubuntu 11.04 Unstable?

After using Ubuntu 11.04 for a while, on different PCs (desktop, netbook), I noticed some unexpected behaviours (slowdowns, crashes, screen garbage). This most likely is a problem of proprietary drivers (nVidia, ATI/Radeon) and Compiz (the 3D compositing window manager).

The solution, although not the most popular, is simple: when you log in, select Ubuntu Classic (no effects), and you'll have a fast, responsive and stable Ubuntu Linux system. I'm not fussed about losing the eye candy, and have no problem waiting for the next release (11.10), anyway.

Thursday, 7 July 2011

Classic scrollbars in Ubuntu

Thanks to Andrew from Web Upd8, here's a way to disable Ubuntu 11.04's weird scrollbars and revert to the "old" ones. It's a terminal hack, so you need to open it and type the two lines below to make it work. You may or may not have to restart your computer to finalise the changes.
sudo su 
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

Natty Narwhal's new scrollbar...


Tuesday, 28 June 2011

Delete USN Journal

Well, this is a technical one. If you're running Windows, you'll notice that defragmentation can sometimes become a pain because of USN journals. Here's how to remove it, using the Command Prompt (Terminal):
Of course you may replace C: for whatever journaled drive you want


Monday, 27 June 2011

Firefox 5 Released

Yes, Firefox 5 is out! Download it here, unless you are using Ubuntu 11.04.

If you are a running Natty Narwhal, all you need to do is run the Update Manager, and that's it!


Tuesday, 3 May 2011

Sun Java as default in Ubuntu

If you're using Ubuntu  11.10 (oneiric ocelot), please check this entry. Since 11.10, Sun/Oracle's Java JDK has been removed from all (Ubuntu/Canonical) repositories.

Just to summarise the information I got from

in order to get Sun's Java Development Kit (JDK) up and running under Ubuntu (I'm using 11.04).

You may use Synaptic (the package manager) to add the "Canonical Partners" repository, reload, then find and install sun-java6-jdk.

Otherwise, open a terminal session and type the following:
sudo add-apt-repository "deb maverick partner"

sudo add-apt-repository "deb natty partner"

...depending on whether you have Ubuntu maverick (10.11) or natty (11.10). Then add:

sudo apt-get update
sudo apt-get install sun-java6-jdk
In case you had OpenJRE, OpenJDK, GCJ or similar (free, OSS Java alternatives) already in your system you may want to ensure Sun's JRE & JDK are the default. Still using the terminal, type:
sudo update-alternatives --config java
and select your preferred alternative from the list. To select a Java compiler, type
sudo update-alternatives --config javac
Now on to the testing. You should get the version numbers of the currently installed and default runtime and compiler by typing (in the terminal):
java -version
javac -version
...and that should be it.

I'd recommend you to use Geany as a source editor/IDE.

Sunday, 1 May 2011

Hack your Ubuntu 11.04

Yes, the new Ubuntu is here!

So it's time to tweak it and personalise it, of course.

I'm quite short on time, so I'll be brief. will do what I can to revisit this post and make it more visual and detailed.

This is what I usually do right after I install Ubuntu:

{ Switch the window buttons back to the right hand side }

press ALT+F2 and type gconf-editor
Press Enter and navigate to /apps/metacity/general/button_layout
Change the button_layout to :minimize,maximize,close

More on:
Top Things to do after installing Ubuntu 11.04 Natty Narwhal

{ Go back to the classic Ubuntu, with Gnome desktop }
"...logout and then after clicking on your username, select Ubuntu Classic Desktop at the bottom of the login screen." Thanks Scottlinux!

[ Optional ]
In the Terminal, type:
sudo apt-get install mc build-essential gnome-themes gnome-themes-extras gnome-themes-more startupmanager shutter

Saturday, 23 April 2011

Python 2.7 Mac OS X uninstall

The complete list is documented at The following steps are done inside a terminal session and assume you know how to use the command line. All the terminal command lines below are single lines, even if they appear as two lines in your web browser or this blog post.

To completely remove Python 2.7 from my Mac OS X 10.6:

Remove the entry from the PATH variable by reverting my .bash_profile, edit or delete the file:
nano .bash_profile (remove the PATH lines added by the Python installer, they are commented, so you'll se them easily)
Remove the Python 2.7 framework:
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
Remove the Python 2.7 applications directory
sudo rm -rf "/Applications/Python 2.7"
Remove the symbolic that point back to the 2.7 framework in /usr/local/bin:
Find them with the following ls command, then remove with sudo rm -rf like in the previous steps.
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'
In my case, I typed the following commands following the output of the previous ls line:
cd /usr/local/bin 
sudo rm -rf 2to3 idle idle2.7 pydoc pydoc2.7 python python-32 python-config pythonw pythonw-32

Information taken from:
Credits to the users listed there, especially Ned, who answered the question in such a clear and concise way.

Python on Macs

If you need or want to install and use the latest versions of Python (2.7.1 and 3.2 at the time of writing this post) on Mac OS X, please make sure you read the following web page that contains essential information on what do download and install in order to have a better experience.

In a nutshell:

Do not use IDLE or tkinter with the Python 3.2 64-bit/32-bit installer for Mac OS X 10.6 unless you can install ActiveTcl 8.5. Otherwise use the 3.2 32-bit-only installer instead.

Do not use IDLE or Tkinter with the Python 2.7.1 64-bit/32-bit installer for Mac OS X 10.6. Install the 2.7.1 32-bit-only installer instead.

Do not use IDLE or Tkinter with the Apple-supplied Python 2.6.1 in Mac OS X 10.6. Install a newer version of Python 2.6 or later.

Python's integrated development environment, IDLE, and the tkinter GUI toolkit it uses, depend on the Tk GUI toolkit which is not part of Python itself. For best results, it is important that the proper release of Tcl/Tk is installed on your machine." (IDLE and tkinter with Tcl/Tk on Mac OS X)

Wednesday, 26 January 2011

Power Supplies

Power Supply Units, or PSUs, are among the most important components of a computer.

It's not the most famous item, though, with processors, memory, motherboards, graphic cards and hard drives/solid state drives fighting for the spotlight...

Anyway, here are a couple of links that validate both my experience, observation, and yes -- blunders, too.
Titles should be self-explanatory.

Hope you find these links useful!

Saturday, 1 January 2011

Disable hibernation in Windows 7

Great tutorial, short and sweet. Why would you want to disable hibernation? To save hard disk space. If your computer has 4 Gb of RAM, the system will create a 4 Gb file in order to be able to hibernate.

Therefore, you'd want to disable hibernation especially if you have a desktop computer and/or don't need to use the hibernation feature, which is mainly aimed at laptops.

In a nutshell, you just need to run the command prompt as administrator(AKA elevated command prompt, see screenshot at the end of this post) and type
powercfg -h off
and then press Enter. That's all, folks!

Right-click on the Command Prompt icon and left-click on "Run as administrator"

Algorithms and Abstract Data Types HL

Resources about various algorithms - Higher Level:  - various algorithms (sort, binary search) and pr...