Monday, 13 August 2007

PDF imposition

Apparently this is where you re-order your PDF pages so that when you print them out two per page and double sided it forms a cute little booklet.

You need "psutils" installed.

psbook -s44 inputfile.ps outputfile.ps

where the -s tag sets the number of pages your document needs. This must be divisible by 4. So, for a 43 page document, you need -s44, and the extra blank page will be added. Neat.

Then you can do the following to go back to a pdf:

ps2pdf outputfile.ps newoutputfile.pdf

When you print, you must select "duplex: short side" or else it comes out all screwy with the reverse pages rotated through 180 degrees.

Jabref

Jabref is a marvelous program to sort out all my references. However, I always forget the command I need to run it under linux:

java -jar JabRef-2.2.jar

..and that's it.

Monday, 30 July 2007

You need to dress a cat. And you will say to a cat together with a family. "It has changed just for a moment".

I'm putting off doing the washing up. After just one glass of wine, I find the following sites hilarious. I need help.

Cat Prin- the tailor for a cat you know
It is spring new work! They are frog transformation goods!

The muffler of the car which does the shape of a kitty
Is this probably for the person who likes the kitty?  Or for hateful person?

Oh dear.

Tuesday, 29 May 2007

More excitement from the world of my computer.

Horror of horrors, I now find that my computer didn't come with gcc already! Because I was in a clicky-clicky mood, I went to synaptic package manager, and installed all the gcc- looking things.
I made some crappy C++ program, and tried to compile:

gcc test.cxx

But my computer cried:

gcc: installation problem, cannot exec 'cc1plus': No such file or directory

Boo hoo hoo. The oracle (internet) suggested:

sudo apt-get install g++

And all was merry. However, mostly I want to remind myself how to compile, since I write so little C code recently:

gcc test.c -o test

Where the last flag is to put the output in "test". Huzzah.

Saturday, 14 April 2007

Play mp3 files in Ubuntu

For my second post of ubuntu battles, I'm going to delve back into historic battles (last night) and talk about how to get mp3's to play in Rhythmbox. The first time I did it, it was bizzarre and involved lots of messing about, but now I find the following AMAZING program...
EasyUbuntu
Immense. So easy.

The best thing is, Rhythmbox has AudioScrobbler built-in, so if you are a last.fm fanatic, you only have to enter your username and password in Preferences>AudioScrobbler.

Note to self: Actually RUN the EasyUbuntu program after you download it, before you wonder why mp3's are still not recognised. Doh.

Free Pascal

For my first thrilling post, I'd like to tell you all about my entire evening trying to install Free Pascal on my laptop which runs Ubuntu Linux (Dapper Drake, no less). Since I'm not a very experienced user (not at all!) I have been mainly fumbling in the dark. However, since I just managed to compile my first pascal program, I thought I'd share those fumblings with you, incase you're interested. So.

I visited this marvellous website, and downloaded the 2.0.4 release for Linux as a .tar file:
fpc-2.0.4.i386-linux.tar
So far, so good. I could have had the .deb packages, but they were numerous, and I didn't know what to do with them, or which ones I needed. So, the .tar version it was. I un-tarred it like so:

tar -xvf fpc-2.0.4.i386-linux.tar

And then I ran the shell script to install it thus:

sudo ./install.sh

I wrote an incredible program, and named the file "hello.pp" (my first ever pascal program!)

program hello;
begin
writeln ('Hello, world.');
end.

And then I typed...

fpc hello.pp

But! Woe is me! The computer told me:

hello.pp(4,1) Error: Util ld not found, switching to external linking

Which was very rude. However, after much head scratching and manual searching, I found the following enlightenment from the freepascal user manual:

Under UNIX systems (such as LINUX) you need to have the following programs installed :
1. GNU as, the GNU assembler.
2. GNU ld, the GNU linker.
3. Optionally (but highly recommended) : GNU make. For easy recompiling of the compiler and Run-Time Library, this is needed.


Compiling a compiler? I can't cope with this! A bit more detective work lead me to install binutils using the synaptic package manager, which gave me the gnu assembler and linker. Then my program compiled sweetly and ran when I typed:

./hello

Great stuff.

Hello, World.

Hello, deep abyss of cyberspace.

I feel compelled to start my own blog, mainly to chronicle my battles against my computer. It's going to be a fascinating read, I can just tell.

Everytime I work out how to do something with Linux (ie. Installing my printer, taking a whole day) I mean to write it down. However, I never do, and when my computer finally goes mental (I spill a glass of water on it) I have to re-install everything. By this time I've forgotten exactly how I ever got it to play mp3s. But this is getting more regular, as my computer becomes more geriatric. So here's my blog of reminders for myself next time it all goes tits up.

Useful, that is, providing it's not my Ethernet card that gets fried (again).

So, welcome, complete lack of readers, to this most fascinating and fishy blog.