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

http://www.webupd8.org/2011/03/install-java-in-ubuntu-1104-natty.html
and
http://ubuntuforums.org/showthread.php?t=471488

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 http://archive.canonical.com/ maverick partner"
or

sudo add-apt-repository "deb http://archive.canonical.com/ 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 http://bugs.python.org/issue7107. 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 smtpd.py smtpd2.7.py


Information taken from:
http://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4
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.

http://www.python.org/download/mac/tcltk/

In a nutshell:

"Important
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

http://www.sevenforums.com/tutorials/819-hibernate-enable-disable.html

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"

Thursday, 30 December 2010

Flash for 64 bit Linux

Short post. If you're using a Linux distro for the x64 (x86-64) architecture, this page from Adobe Labs has all the info and istructions you need to install it.

I've tried it and works very fast! So far, haven't had any problems with it.


The way I've done it is to extract the libflashplayer.so from the file (i.e. flashplayer10_2_p3_64bit_linux_111710.tar.gz, just right click on it and choose 'Extract here') and then move it to the /usr/lib64/mozilla/plugins/ folder via the following terminal commands:
cd ~/Downloads
sudo cp libflashplayer.so /usr/lib64/mozilla/plugins/
Of course this is assuming you downloaded the file to your home folder's Downloads folder (the usual case). If you're using Konqueror, you may need to add the Flash plugin by going to Settings>Configure Konqueror>Plugins (last item), then select the Plugins tab, and click on the "Scans for plugins" button.

*Notes*
  • The Adobe Labs link was updated as the preview of  the 64-bit Adobe Flash Player Square is now available for Linux, Mac OS X, and Windows).
  • More information is available at this Ubuntu Documentation page (removal of non-64 bit Flash plugins, alternative way of installing it, and such)

Hope this helps.

Optimise Windows 10/11

How to optimise your Windows setup Just in case you need it. If you want a safe and conservative approach, just disable the background apps ...