Archive

Archive for the ‘Linux FAQ’ Category

How to fix the “federated domain” problem in emesene

March 30th, 2011 No comments


If your emesene keeps displaying the annoying message “User could not be added: Email Domain is IM Federated Contact LiveID xxx@yyy.com is federated domain.” no matter if you accept or reject the user, then you probably want to apply this patch.
This is not really a fix, but a workaround, is just a hack to avoid displaying the error message if you really like emesene and you want to use it. If you don’t like this kind of ugly solutions, there are always other options like Pidgin, aMSN, etc. — in other words if you don’t like programming forget it, or wait for a new emesene version.
Read more…

Ubuntu Linux: How to Convert from HTML to JPG

March 30th, 2011 No comments

Here is an easy way to convert from HTML to JPG. Actually, I’m converting the HTML to PDF and then from PDF to JPG.
Read more…

Building ffmpeg in Debian (Lenny)

November 1st, 2010 No comments

I’ve adapted the instructions from this Ubuntu thread for Debian Lenny.
The original idea was to build ffmpeg with AAC support, but then I’ve found some other problems with mp3 codec, so I needed to apply a patch and rebuild everything.
Read more…

How to create two wired virtual serial ports on Linux?

February 19th, 2010 No comments

To create two bridged virtual serial ports use the following command:

socat -d -d pty,raw,echo=0 pty,raw,echo=0

The output will show you which are the virtual ports (or pseudo terminals) created, e.g.:

2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/3
2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/4
2010/02/19 16:16:33 socat[9662] N starting data transfer loop with FDs [3,3] and [5,5]

Note: if you are using Ubuntu and you do not have this command, try:

sudo apt-get install socat

Image source

How to calculate the space used by files in Linux?

February 19th, 2010 No comments

Suppose that you want to calculate the space used by all the png files in current directory and all its subdirectories. From a terminal type:

find . -name '*.png' -exec du -ab {} \; | awk '{total+=$0}END{print total}'

Image source

How do I compare two binary files on Linux?

February 19th, 2010 No comments

The easiest way I found is dumping the binaries into text files using hexdump and then comparing them with your favourite program (diff, Meld, etc.). E.g.:

hexdump -C a.bin >a.txt
hexdump -C b.bin >b.txt
diff a.txt b.txt

Image source

How do I add VNC to Terminal Server Client in Ubuntu?

February 19th, 2010 No comments

From a terminal type:

sudo apt-get install xtightvncviewer

Image source