Friday, 29 January 2010

listing files (for mplayer playlist)

Navigate to the root of the music directory

find > /home/me/music/ | sort > playlist_complete

The full path spec. is required to get it into the playlist.
Sort is required to sort the output; otherwise, a different list order occurs.

Thursday, 28 January 2010

heads and tails to extract lines

This can be used with mplayer and conky, to display the current track.

Start mplayer with:

mplayer -playlist playlist > tempmplayerfile

to dump mplayer output to the file, tempmplayerfile

Then, extract a few lines near the end of that file for the current playing information.
The last line will be gibberish.

tail -n 5 tempmplayerfile | head -n 3

will display the first three lines, of the last 5 lines of the file.

I found the following worked well:

tail -n 17 tempmplayerlist | head -n 15

mplayer

mplayer -playlist playlistfile

< and > to skip tracks

Turn off compression. On by default.
mplayer -a52drc 0


--------------------------------------

from http://linux.dsplabs.com.au/mplayer-multiple-sound-cards-select-audio-device-p77/

to select an audio device:

Default:
mplayer -ao oss:/dev/dsp *.mp3
mplayer -ao alsa:device=hw=0.0 *.mp3


Non default:
mplayer -ao oss:/dev/dsp1 *.mp3
mplayer -ao alsa:device=hw=1.0 *.mp3



mplayer -ao oss:/dev/audio2 *.mp3

worked after Skype reached in and changed my default sound device,
without asking.

----------------------------  mplayer subs

mplayer -sub *.srt *.avi

:)

-----------------------------------------------

mplayer

Monday, 25 January 2010

Those who can, do; those who can't, write (become journalists).

building gmsh

wget http://www.geuz.org/gmsh/src/gmsh-nightly-source.tgz
tar xvzf gmsh-nightly-source.tgz
cd gmsh- (whatever)

cmake CMakeLists.txt
make
sudo make install

Thursday, 21 January 2010

firefox

Fire up with profile selection:

firefox -P -no-remote

Saturday, 16 January 2010

A note on upates

On running gnome, synaptic was shown via `ps -A', when I was alerted of many updates.

It may be wise to run synaptic on occasion, from fluxbox.

Ubuntu Jaunty no sound fluxbox, possible utube fix too.

No sound available in my fluxbox, nomatter which sound card I select (and i plugged new usb ones in, and selected them in audacity, to no avail). Then I found

http://www.ubuntugeek.com/simple-guide-to-sound-solutions-for-hardyintrepid-and-jaunty-jackalope-users.html

providing help for those using Gnome. I following the instructions:

sudo apt-get install asoundconf-gtk gnome-alsamixer alsa-oss libasound2 libasound2-plugins padevchooser gstreamer0.10-pulseaudio ubuntu-restricted-extras

The ubuntu-restricted-extras package, it is claimed, can help with websites streaming content.

The help page had plenty of pointers, all using gnome. On exciting fluxbox, running gnome, I
could do:

System / preference / sound

which, according to `ps -A', ran

gnome-volume-control

Executing this from a terminal showed that in spite of alsa-mixer showing no mute, gnome-volume-control was set to mute. How, who knows?

Anyway, unsetting mute, fixed the audio. Now, can I have those three hours of frustration refunded, please?

Sunday, 10 January 2010

\left( \right) incompatible with something

\begin{align}
\sum_{a=1}^{n_{GL}} \sum_{i=1}^{n_{H}} \sum_{j=1}^{n_{H}}
G_{w1} G_{w2} G_{w3} |J_{a}|
( &
\frac{\partial H_{ai}}{\partial x}
\frac{\partial H_{aj}}{\partial x}
+ \frac{\partial H_{ai}}{\partial y}
\frac{\partial H_{aj}}{\partial y}
+ \frac{\partial H_{ai}}{\partial z}
\frac{\partial H_{aj}}{\partial z}
- k^{2} H_{ai} H_{aj} \\ % ie k^2 * w * p
& + 2i
(
M_{x} k H_{ai} \frac{\partial H_{aj}}{\partial x}
+ M_{y} k H_{ai} \frac{\partial H_{aj}}{\partial y}
+ M_{z} k H_{ai} \frac{\partial H_{ak}}{\partial z}
)
)
\end{align}

works. Changing the parentheses to \left( and \right) fails, reason unknown.

It's not all bad news, though. This form works:

\begin{equation}
\begin{split}
x & = y \\
& = \left( z \right)
\end{split}
\end{equation}

Watch the direction of the new line delimiters.

More fiddling showed a line break could not occur between the \left( and \right). ?!

http://www.latex-community.org/forum/viewtopic.php?f=46&t=4823

showed that terminating a line before the break with, \right.
and starting the next line with \left.

fixes these problems.

Monday, 4 January 2010

Sunday, 3 January 2010

mtab fstab mounting problems

I couldn't mount my win directory at startup, but could with default options in a terminal, later.

Inspection of /etc/mtab showed the working command. I copied it to fstab. It worked. :)

Latex setup

sudo apt-get install texlive

or, for the full installation:

sudo apt-get install texlive-full

mpi, pypar, koala

sudo apt-get install openmpi-bin

sudo apt-get install libopenmpi-dev

sudo apt-get install subversion

mkdir -p ~/Downloads/pypar
cd ~/Downloads/pypar
svn checkout http://pypar.googlecode.com/svn pypar-read-only

cd pypar-read-only/source
sudo python setup.py install

Worked on koala, as long as numpy was installed beforehand.

Saturday, 2 January 2010

rsync

Jump to end, for fix:


Attempting to connect to work, rsync appears to hang. Is the deamon running?

According to the rsync man page, the rsync daemon should get started up
by specifying it in

/etc/services

Checking this file shows around 600 entries. Add,

rsync 873/tcp

where, i presume, 873 is the contact port. My port number was incorrect.

Checking /etc/inetd.conf showed it was empty. I added,

rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon

as per the man page. I then reset the machine, as I couldn't figure out how to send HUP to inetd, given it wasn't listed via ps -A

------------ fix -------------

Don't try to run the rsync daemon in a different way on the host.
At the client, specify the port: eg

rsync -avzrP --rsh='ssh -p123' login@192.168.1.1:/home/me/whatever ./

works.