Saturday, 31 March 2012

installing ipython notebook

Install ZMQ manually:

tar xvf zeromq-2.1.11.tar.gz
cd zeromq-2.1.11/
./configure
make
sudo make install
sudo ldconfig

Then install ipython with zmq:

sudo easy_install ipython[zmq,test]

There was an error on completion but zmq bindings were installed and

ipython notebook

works.

Now install matplotlib:

sudo apt-get install python-dev libfreetype6-dev --- yes. This seems correct.
sudo easy_install matplotlib ---- No: this attempted to compile, and failed.

sudo apt-get install python-matplotlib # that was easy....


$ ipython notebook --pylab=inline

Friday, 10 February 2012

Updating or removal of easy_install installations

$ sudo easy_install ipython

... installs ipython, usually. Today, attempting to update ipython from 0.11 to 0.12 failed. Symptoms: easy_install connected and refused to download 0.12, using the existing 0.11 egg present.

Fix:
$ easy_install -m ipython

Fails, as I don't have write permissions. But it tells me where the .egg and .pth
files are.

$ sudo easy_install -m ipython

Removes the installed program. Navigate to the directory specified in the error
above and remove the .egg directory. Reissue the install command:

$ sudo easy_install ipython

Now, 0.12 is donwloaded and installed. This didn't work
first time as I had PATHs specified in .bashrc that prevented
it. Removal of the PATHs resulted in things working okay.

Tuesday, 17 January 2012

ssh hostnome `filename` doesn't work due to PATH

Fresh installation of Ubuntu and the remote machine won't
run scripts in ~/bin

ssh remotemachinename `echo $PATH`

showed ~/bin was not in the path for remote sessions but was when a log in was performed.

It appears that .bashrc is not executed in the same way with a remote command.
Adding, `echo 'in .bashrc'' to the top of the remote ~/.bashrc shows it IS
executed on remote command on the working machine.

Then: I noticed `ls` and 'ls' generate different results. `ls` appears to run remotely as hoped; 'ls' appears to do something on the remote machine and the local one.

Perhaps I should use speech marks. They behave ok. Anyway....

Since .bashrc is being executed ok remotely, I think there's something in it preventing the path being set as expected for remote commands. A check showed
the working machines had line 6 of the default .bashrc commented. This line
exits, doing nothing for a non-interactive shell.

So, should the path be set elsewhere for non-interactive shells? Is this a security measure or a logical one?

installing mplayer

sudo apt-get install subversion; mkdir -p ~/downloads/mplayer; cd ~/downloads/mplayer

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Download codecs.

Build.

More work needed here.

Friday, 13 January 2012

NFS mount ls shows user numbers not names

Machine 1 has user, `me'. `$ id me' shows 1004 as `me' was added as a user late in the life of the machine.

Machine 2 has user, `me'. `$ id me' shows 1000 as `me' was the first user added.

`$ sshfs 192.168.1.100:/home/me ~/remoteme' mounts the remote location ok but attempts to write to the remote drive fail with permission errors.

Attempting the same process with `$ sudo mount' generates the same result.

Setting NEED_IDMAPD=yes in /etc/default/nfs_common made no difference.

`$ls -lha' at the local machine to view the remote drive shows no user names, only numbers. The numbers indicate 1004 as the owner.

So, move the remote `me' user from UID 1004 to UID 1000 by logging into the remote machine as a user other than `me' and executing,

`$ usermod -u 1006 olduserat1000' to free up UID 1000

then

`$ usermod -u 1000 me'

Monday, 9 January 2012

Simplest latex example?

\documentclass{article}

\begin{document}

\section{A section}

Hello world.

\end{document}

Wednesday, 4 January 2012

hard drive benchmarking

$ sudo hdparm -t /dev/sda
[sudo] password for you:

/dev/sda:
Timing buffered disk reads: 268 MB in 3.02 seconds = 88.88 MB/sec
$