Thursday, April 5, 2012

Create bootable "live" LInux or BSD usb drives with unetbootin


Unetbootin is a powerful system utility to create bootable usb drives with your favorite distribution(although may not be the latest version). You need at least a usb flash drive with 2Gbytes capacity, but it is better to use 4 Gbytes, the price difference is small enough.

You also need gparted utility to format and partition your drive. If these are not available in your LInux OS, install them using your software package installer system or if you have moderate skills, download, compile and install from sources. You can install apt-get and synaptic, we wonder why Ubuntu removed this from their newest distribution.

Insert your usb drive, saving important files to your hard disk. Then use gparted to format using "ext2" if you want to try Puppy LInux. Otherwise you can also format using MS FAT32 so you can even save files readable in Windows!

Issue df in the command line after using gparted. Your usb should be detected, usually the drive is accessible using the name /media. For example, my pqi branded usb is readble/writable as /media/d32b6e24-c9dd-4073-8f24-63981d635de1.

Next issue sudo unetbootin. You will be presented with subwindow giving you choices of Operating Systems, including BSDs!(freebsd and netbsd.). Yes you can use the internet to download the operating system ISO images, but it would be masochism as realtime downloading is a pain! Instead copy the iso link using the mouse and use wget instead. In fact it tooke me more than two hours to download a live Linux Mint iso image!

I have downloaded linux mint using wget -ct 0 http://ftp.heanet.ie/pub/linuxmint.com/stable/10/linuxmint-10-gnome-cd-i386.iso

Here is my wget for free bsd. Mercifully it is a small size,
wget -ct 0 http://nchc.dl.sourceforge.net/project/lubi/Zipped%20Disk%20Images/1/freebsd-8.0.img.gz

For puppy, use

wget -ct 0 http://distro.ibiblio.org/pub/linux/distributions/puppylinux/puppy-5.3.1/slacko-5.3.1-SCSI-MAIN.iso

Here is a screenshot of unetbootin:




Note that your usb must be mounted when you use unetbootin. Click on the small button with .... Then hightlight the location of your downloaded iso. Then click on ok button. Wait a while and unetbootin will tell you when it is safe to reboot!

I have done this puppy and linuxmint and freebsd. I find the bsd distribution difficult to install, it needs more information! Here are some screenshots of opening screen for puppy:



And here is for LinuxMint.




Pupppy linux is fast to boot, but it is so slow shutting down! It incorporates the seamonkey browser.
As for LInuxmint,it uses a very old version of Firefox, 3.5.0, the newest version is already at 12.0! Oh well, we cannot have everything.

Itis surprising that Knoppix, the pioneering live-CD Linux distribution is not in the list of unetbootin!



Wednesday, April 4, 2012

Will Spyder be our new Python IDE?

Your author has tried Emacs, Vi, eric4, drpython, spe, gedit, jedit, anjuta,idle, geany
kate, kedit, when writing Python programs, or modules


Among the editors/IDE mentioned eric4 comes close to be the most ideal for me, except that
is somewhat slow. Spe on the otherhand, has that unusual cursor-editor missynchronization.What
character you type sometimes does not appear immediately! It is disconcerting to say the least.



Here is a short list of features I demand to have in an editor:

  1. Quick zooming, unzooming. I wonder why editors do not implement or have removed
    the standard browser Ctrl-plus or Ctrl-minus for easy viewing of source codes?

  2. Interactive debugging support.

  3. Indent/unindent highlighted code blocks.

  4. Folding and unfolding code blocks. Not an absolute requirement.
Spyder aims to be the standard scientific python editor/ide. It is available in Ubuntu apt-get but it refused to run due to some versioning errors. One day last week, I got an email announcement from the scipy mailing list that there is a new version of spyder. So we tried installing it from the sources.Here are the steps:
wget -ct 0 http://spyderlib.googlecode.com/files/spyder-2.1.9.zip
unzip spyder-2.1.9.zip 
cd spyder-2.1.9/
sudo python2.7 setup.py install
spyder
That works! and that is the latest version of spyder. Spyder on default mode opens the following windows in one screen: console,editor and a tabbed inspector explorer/window for objects, variables, and files. Typing scientific on the console window gave the following information:
>>> scientific This is a standard Python interpreter with preloaded tools for scientific computing and visualization: >>> import numpy as np # NumPy (multidimensional arrays, linear algebra, ...) >>> import scipy as sp # SciPy (signal and image processing library) >>> import matplotlib as mpl # Matplotlib (2D/3D plotting library) >>> import matplotlib.pyplot as plt # Matplotlib's pyplot: MATLAB-like syntax >>> from pylab import * # Matplotlib's pylab interface >>> ion() # Turned on Matplotlib's interactive mode Within Spyder, this intepreter also provides: * special commands (e.g. %ls, %pwd, %clear) * system commands, i.e. all commands starting with '!' are subprocessed (e.g. !dir on Windows or !ls on Linux, and so on) >>>

We will spend more time with our newest editor/ide, but spyder looks very, very promising.