Hyphenation in LaTeX

July 11, 2009

I was typesetting my CV in LaTeX with a mix of Spanish and English when I got aware that when running pdfLaTeX it  was not uploading hyphenation patterns for Spanish. I was using Ubuntu Jaunty 9.04. After some investigation I found out that there was a bug filed in launchpad about this issue in https://bugs.launchpad.net/ubuntu/+source/texlive-base/+bug/240823. The solution to this is running in a shell the following command:

sudo fmtutil – -all

In MiKTeX using Windows, you have to open the settings manager, go to Languages Tab and select the languages you want pdfLaTeX to use.

Etiquetas de Technorati: ,,,,,

Sound in Amarok 2.0.2 and Ubuntu Jaunty 9.04

May 23, 2009

I really like Amarok, but apparently in Ubuntu 9.04 Gnome as a Desktop, when installing amarok it does not play sound at all. After some investigation, apparently amarok uses Phonon and you need to make sure you have the xine phonon backend. But that apparently is not enough. Installing xine-console solves the problem. I’ve read that installing xine-ui solves the problem as well.

Although I love the simplicity of Gnome, there are some Kde applications that simply rock, name it:

  • Amarok
  • Kile
  • and Kopete, that apparently it has video built in, something that pidgin has not yet.

Yes, you can have Gnome Desktop and use Kde applications.


libmtp and Ubuntu Jaunty (mtp devices), Rhythmbox

May 4, 2009

LIBMTP and UBUNTU JAUNTY

I installed a clean ubuntu Jaunty 64 bit, and when plugging in an mp3 player I found that Rhythmbox could not found my player because of an libmtp panic error, sth like this:

PTP: Opening session
LIBMTP PANIC: Unable to read device information on device 6 on bus 0, trying to continue

Apparently there is a bug already in launchpad:

https://bugs.launchpad.net/bugs/348287

I found out that Jaunty uses 0.3.0 of libmtp which dates back from 2008.

Seeing that this is quite annoying, I downloaded the latest libmtp and compiled them by hand:

You’ll need libusb-dev library (apt-get install libusb-dev), which can be installed by means of apt-get.

Latest release of libmtp:

http://libmtp.sourceforge.net/index.php The latest is 0.3.6

as always:

./configure

make

sudo make install

By default, this installs:

:/usr/local/lib$ ls -l

-rw-r–r– 1 root root 839976 2009-05-04 18:46 libmtp.a

-rwxr-xr-x 1 root root 805 2009-05-04 18:46 libmtp.la

lrwxrwxrwx 1 root root 15 2009-05-04 18:46 libmtp.so -> libmtp.so.8.2.1

lrwxrwxrwx 1 root root 15 2009-05-04 18:46 libmtp.so.8 -> libmtp.so.8.2.1

the libmtps that come in Jaunty are in /usr/lib:

/usr/lib/libmtp.so.8

/usr/lib/libmtp.so.8.0.0

back these files up in some place in your home:

Remove those in /usr/lib and soft link to new ones:

If you are still in /usr/lib

ln -s /usr/local/lib/libmtp.so.8.2.1 libmtp.so.8

ln -s /usr/local/lib/libmtp.so.8.2.1 libmtp.so.8.0.0

Of course, you need to be root for that.

That’s it!! If you plug your mp3 and start Rhythmbox, it should work.


HowTo Ubuntu 8.10 64bit and Areca 6.2 (6.1) java Backup Utility

January 22, 2009

1) Go to Synaptic and install

libswt-cairo-gtk-3.4-jni
libswt-gnome-gtk-3.4-jni
libswt-gtk-3.4-java
libswt-gtk-3.4-jni
libswt-mozilla-gtk-3.4-jni

2) cd /usr/lib/jni

cp the files:

libswt-atk-gtk-3448.so
libswt-cairo-gtk-3448.so
libswt-gtk-3448.so
libswt-pi-gtk-3448.so
libswt-awt-gtk-3448.so
libswt-gnome-gtk-3448.so
libswt-mozilla-gtk-3448.so

to the areca/lib folder with names in order of appearance:

libswt-atk-gtk-3232.so
libswt-cairo-gtk-3232.so
libswt-gtk-3232.so
libswt-pi-gtk-3232.so
libswt-awt-gtk-3232.so
libswt-gnome-gtk-3232.so
libswt-mozilla-gtk-3232.so

overwriting the original ones ;) .

3) the files:

org.eclipse.swt.gtk.linux.x86_3.2.0.v3232m.jar
org.eclipse.jface_3.2.0.I20060605-1400.jar

come from an eclipse installation actually, so if you don’t have eclipse,
download it and:

cd eclipse/plugins

and cp the org.eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar
into areca/lib org.eclipse.swt.gtk.linux.x86_3.2.0.v3232m.jar

and cp org.eclipse.jface_3.4.1.M20080827-2000.jar to areca/lib
org.eclipse.jface_3.2.0.I20060605-1400.jar

overwriting the original ones.

Now, the file libarecafs.so surprise, surprise is a 32 bit one, so I compiled the 64bit one.
With the 32bit one, you’ll get a couple of warnings:

09-01-22 20:44 – WARNING – com.myJava.file.metadata.posix.jni.JNIMetaDataAccessor cannot be used on this system. Got the following error : “java.lang.UnsatisfiedLinkError : /home/jordilin/areca/lib/libarecafs.so: /home/jordilin/areca/lib/libarecafs.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)”
09-01-22 20:44 – WARNING – [com.myJava.file.metadata.posix.jni.JNIMetaDataAccessor] not validated. The default metadata accessor will be used instead.

I leave a 64 bit version in http://www.jordilin.com/hackingaround/libarecafs.tgz

This same tutorial is in http://www.jordilin.com/hackingaround

4) ./areca.sh
5) done

Note. I tested this using 6.2 pre-release, but using 6.1 should be the same.


HOWTO: Flash Player 9 for Linux

January 4, 2007

Download the player in:

http://labs.adobe.com/downloads/flashplayer9.html and download the installer. It comes tarred and gzipped.

Just type tar -xzvf nameofthefile.tar.gz (in your home directory)

where nameofthefile= FP9_plugin_beta_112006

this will create the directory named:  flash-player-plugin-9.0.21.78/

Go to /usr/lib/mozilla-firefox/plugins directory and type:

sudo ln -s /home/yourusername/flash-player-plugin-9.0.21.78/libflashplayer.so .

Don’t forget the last dot.

And that’s all!!

Happy surfing with the last Flash Player!!


HOWTO: Renaming files

November 11, 2006

For my 100th article, I’m gonna give away a program which renames all the files
matching a giving file extension. Useful mainly when you import your photos
from digital cameras where files are given random names. You must provide the
file extension and the new name. Made with Python is published under the terms of the GNU GPL license.
Example:
If you have in a directory:
2006_10_03_01.jpg
2006_10_03_02.jpg
and you provide the following prefix name= barcelona and file extension= jpg the result will be
barcelona_1.jpg
barcelona_2.jpg
Imagine when you have more than 500 files to rename. This program renames all the
files in less than a second.
Enjoy

Instructions:
Download the file renombra.txt
rename it to renombra.py
chmod +x renombra.py
./renombra.py (to run it)

renombra.txt


HOWTO: Indentation and syntax coloring in Vim

November 2, 2006

To enable indentation and syntax coloring in vim Ubuntu Edgy you must
edit the file vimrc located on /etc/vim/vimrc and uncomment the lines
syntax on
and
if has(“autocmd”)
filetype indent on
endif


HOWTO: Recording audio cds with K3b

October 31, 2006

k3b cannot deal with mp3 files by default in Ubuntu Edgy Eft.
If you need to produce an audio cd by adding mp3 files with k3b, you’ll need to install the following package:
sudo apt-get install libk3b2-mp3
and you are done!!


HOWTO: Firefox and the RealPlayer Plugin in Ubuntu Edgy Eft

October 30, 2006

When you install RealPlayer in Ubuntu Edgy Eft, it will install not only the player but also the firefox plugins. There’s a problem, though. Firefox is preconfigured to play real audio streams with totem. To use the real player plugin you must remove the totem plugin responsible to play these real audio streams. Just go to the firefox plugins directory located on:

/usr/lib/mozilla-firefox/plugins

and remove

libtotem-complex-plugin.so

libtotem-complex-plugin.xpt

type:

sudo rm libtotem-complex-plugin.*

and happy listening with realplayer plugin for Firefox 2

Note:

You can see why totem is responsible to play realaudio streams by typiing in the firefox url bar:

about:plugins

and if you try to play any real audio stream by means of firefox plugins, firefox will try to open totem and totem will complain saying that it can’t open a stream via the rstp protocol.


HOWTO: Monitoring your desktop Linux the easy way

October 29, 2006

There are lots of programs that help us to monitor our personal computer. They provide us with memory consumption, cpu usage, network statistics and lots more. In this article I’m going to introduce gkrellm. I’ve always had gkrellm running in every desktop linux. It’s very useful and provides essential information in real time. Installing gkrellm is just very easy, type:

sudo apt-get install gkrellm

to run it, type

gkrellm &

and you’ll get several info about your computer in real time.

Gkrellm supports themes, so the app can have several appearances. I always use the “invisible” theme, which is a transparent theme, so you can see the background. Very cool. To install a new theme (Ubuntu) go to

http://www.muhri.net/gkrellm/

and download the theme you like. Most of the themes come gzipped. Once you download the theme to your home directory, ungzipp it and move the whole directory to ~/.gkrellm2/themes.

Have fun