Thursday, November 4, 2010

[UBUNTU] Sudo insulting you & How to save the package list

MAKE SUDO INSULT YOU
With a little mod, when typing wrong password at sudo request, it will insult you.
Start typing in console

sudo gedit /etc/sudoers


On line 8 modify adding ",insults" as in

Defaults env_reset,insults


HOW TO SAVE INSTALLED PACKAGES LIST

In Terminal write

sudo dpkg --get-selections > installed-software

It creates the file "installed-software" in your /home/[name]/ directory.

Copy this file onto the system you will install these packages to and go to Synaptic, File->Read Markings, and load the file, then choose Apply to download and install packages.
This works for all enabled repositories, but, for example, packages from ppa repositories will not be retrieved (or will be installed in the Ubuntu Universe version)

Sunday, October 31, 2010

Mp3 ringtones on Windows Mobile 5

Once copied your mp3 file in a folder accesssible by PC (for example your storage card), from the phone (or pocket pc) go in the File Explorer and copy or cut the mp3, pasting it into "\Application Data\Sounds".
Next you can go into the menu (Settings - Sounds) and the mp3 appears in the list of available ringtones (you can tap with the center button to open the list).

Wednesday, October 20, 2010

Thunderbird: "Unable to find specified executable"

After upgrading to the newer version, Thunderbird shows the popup error
Unable to find specified executable

This problem is caused by the integration with notifyosd, and it can be solved simply installing libnotify-bin
sudo apt-get install libnotify-bin



From: http://getsatisfaction.com/mozilla_messaging/topics/unable_to_find_specified_executable-w17f8

Thursday, September 30, 2010

Vintage GameBoy Games Passwords: Bugs Bunny & Pipe Dream

Here's the complete collection of passwords of two historical games for GameBoy.

Bugs Bunny

2 szws
3 zs2s
4 zzps
5 sw3s
6 sxes
7 zw4s
8 zx9s
9 wsrs
10 wzfs
11 xsjs
12 xzks
12 wwms
14 wxcs
15 xwas
16 xxos
17 s2sz
18 stwz
19 z22z
20 sp3z
21 syez
22 zp4z
23 zy9z
24 w2rz
25 wtfz
26 x2jz
27 xtkz
28 wpmz
29 wycz
30 xpaz
31 xyoz
32 2ssw
33 2zww
34 ts2w
35 tzpw
36 2w3w
37 tw4w
38 2xew
39 tw4w
40 tx9w
41 psrw
42 pzfw
43 ysjw
44 yzkw
45 pwmw
46 pxcw
47 ywaw
48 yxow
49 22sx
50 2twx
51 t22x
52 ttpx
53 2p3x
54 2yex
55 tp4x
56 ty9x
57 p2rx
58 ptfx
59 y2jx
60 ytkx
61 pycx
62 ypax
63 yyox
64 s3s2
65 s1w2
66 z322
67 z1p2
68 se32
69 she2
70 ze42
71 zh92
72 w3r2
73 w1f2
74 x3j2
75 x1k2
76 wem2
77 whc2
78 xea2
79 xho2
80 (it's the last level)


Pipe Dream

4 haha
8 grin
12 reap
16 seed
20 grow
24 tall
28 yali
32 (says continue for the 4 final levels)

Friday, September 17, 2010

Windows Mobile SMS and MMS Exporting

1. Tools

-On Phone:
*Phatware Pocket DBExplorer
*Resco Explorer or Total Commander CE
-On PC:
*a spreadsheet reader (Openoffice Calc)
*a Perl distribution [on Windows Strawberrry Perl, on Linux perl] and the module MMS::Parser with its dependencies (easily installable trough CPAN client), here's the list
MMS::Parser.pm
MMS::Parser::WorkHorse.pm
Dependencies:
File::Slurp.pm
Parse::RecDescent.pm
Path::Class.pm
Path::Class::Dir.pm
Path::Class::Entity.pm
Path::Class::File.pm
Test::More.pm
Test::Simple.pm


2.Pairing

Under Windows it's necessary to use ActiveSync on XP but on Vista or Seven it automatically downloads the necessary component.
Under Ubuntu you must install synce, synce-trayicon and synce-gvfs (PPA), then restart both the pc and the phone.

3. Overview of message handling in Windows Mobile

WM (Windows Mobile - we consider the version 5) handles messages through the proprietary database format CEDB. It stores contacts in pim.vol (hidden file in root directory) and messages in cemail.vol [but MMS data is archived in a system folder, as \Windows\Messaging\, in files with extension .mpb or similar].

3.1 cemail.vol content
There are some tables but those of interest are:
-fldr31000024: received messages
-fldr31000026: sent messages
-fldr31000027: deleted messages
-fldr31000028: draft messages
Each record is a message.

3.2 MMS Format

MMS are defined by a 3GPP standard. A MMS is a binary file containing an header (with infos as sender, receiver, date, network data), a SMIL descriptor (xml file with settings for multimedia presentation), and the files of the message (text, image, video, sound).

4. SMS Export

There are a lot of software which swear it can export SMS without work, but they mostly crash or require to buy them. We prefer instead using Pocket DB Explorer (which isn't freeware itself, but it allows us to understand how the storage works).
Choosing the table we want to export, we select Tools->Tools->Export Database and choose CSV as format.
Now we can copy the created file to the PC and we can read it. The fields are easily understandable.

5. MMS Export

-We unset using the file explorer (not the default one) the System property of the folder \Windows\Messaging
-Now if there are a lot of files (more than 5 thousand) we suggest to zip the folder before copying it to pc, preventing crashes and saving time.
-There are a lot of empty files, that probably refer to sms, but we can delete them.

5.1 MMS Decoding

After setting the environement, we can download this file (http://www.megaupload.com/?d=VQK2K00X) containing the original and the modified example script which uses the module MMS::Parser.
The modified one displays only a few things, as date, sender, receiver, and exports the media. The original displays a bunch of things.
On windows we'll decode the message with the command line: perl.exe [path to]message.pl #MMS#
On linux instead: ./message.pl #MMS#
We obtain a txt file containing text, or the correct media file and on Console the data.

Monday, September 13, 2010

Hugin 2010.2 on Ubuntu

Ubuntu users have to use an one-year-old version of Hugin (the one in the official repository), but if they have some time, they can uninstall it through building from sources.
On the Panotools wiki there's a step-by-step guide http://wiki.panotools.org/Hugin_Compiling_Ubuntu

Each program has similar steps:
-Make a folder in /home/[user]/src
-clone the mercurial repository (thus creating a folder [program].hg
-then create a folder [program].hg.build and launch building

-When choosing branches make sure to use the last one with only numbers (eg Hugin 2010.2)

One note: if occours this error while launching hugin
hugin: error while loading shared libraries: libhuginbase.so.0.0:
cannot open shared object file: No such file or directory

execute this command in the Terminal
ldconfig -v

Saturday, September 4, 2010

How to typeset crosswords (with Lyx)


If you want to compile a nice collection of crosswords (or other variations, or sudoku f.e.) you can use an ad hoc software, or you can use a typesetting software properly configured. I'm speaking of Lyx, which someone described as a frontend to Latex -the typesetting language used in many scientific publications-, but it's a powerful WYSIWYM editor. Using a module named from CTAN (you'll find it at http://www.let.rug.nl/alfa/tex/tetex30/help/Catalogue/entries/cwpuzzle.html), we can write a nice set of games.
If downloaded from CTAN the package (named cwpuzzle), you need to compile the file using "tex cwpuzzle.ins", and copy the resulting ".sty" file in the texmf directory of your installation -on Ubuntu you copy it into /usr/share/texmf/tex/latex/cwpuzzle, mkdir the directory with sudo-. Next the layout file must be put into the /home/{user}/.lyx/layouts/ directory (in the file attached, we had modified the book layout file).
After opening Lyx, the first step is to create a new file and change the document class (Document->Settings) to "Puzzles".
Now is time to write Evil Red Text, cause a proper layout doesn't exist.
Using the example in the documentation, we now show how to make a simple crossword puzzle

-This is the code that produces the schema.
The begin macro has 2 arguments which represent horizontal and vertical dimensions of the puzzle.
Each cell has the format: |[n]x where [n] represent the number (optional) and x represent the letter or the * (which produces a black box), obviously, if not specified, the letter will be hidden; when the row is complete, it must be inserted the |.

\begin{Puzzle}{5}{3}%
|* |* |[1]E|X |* |.
|[2]A|[3]S|T |* |[4]T|.
|* |[5]P|A |R |T |.
\end{Puzzle}

-This code produces the definitions

\begin{PuzzleClues}{\textbf{Across}}\newline
\Clue{1}{EX}{unit of measure}\\*
\Clue{2}{AST}{\(\ast\)}\\*
\Clue{5}{PART}{sectioning unit}\\*
\end{PuzzleClues}%
\begin{PuzzleClues}{\textbf{Down}}\newline
\Clue{1}{ETA}{\(\eta\)}\\*
\Clue{3}{SP}{unit of measure}\\*
\Clue{4}{TT}{nonproportional font}\\*
\end{PuzzleClues}%


-Lastly, this code produces the solution: note that it's equal to the first presented except for the macro \PuzzleSolution.

\PuzzleSolution\begin{Puzzle}{5}{3}%
|* |* |[1]E|X |* |.
|[2]A|[3]S|T |* |[4]T|.
|* |[5]P|A |R |T |.
\end{Puzzle}




In the documentation there's a lot of examples on how to create different schemas and games.

Here's the compressed package including all the files described in the article and the examples (with source)