Wednesday, May 27, 2009

[SW] Ubuntu keyring... install then remove the libpam-keyring

Yesterday, I encountered a situation about which I really have no idea. When I attempted to open a remote directory of another Ubuntu PC, there came a dialog asking me for ``Unlock Keyring.''

Then I went to get some help from Google searching, and found the link. I followed the guidance, and didn't notice too many details in that article, and when I restart my Ubuntu today, I can't login into the desktop environment!

Fortunately, I have learned how to brows using elinks in virtual terminals, so I went back to the link just mentioned and found what I have done yesterday. Then I remove the setting did yesterday in the /etc/pam.d/gdm. Reboot, and everything was normal as usual.

I still don't know very well about the concept and related setting of the keyring. Listed below are some links I found might be useful for (my own) further reading.

Tuesday, May 26, 2009

[SW] Ekee -- LaTeX equation editor

Yes, another handy tool for people who knows how to edit equations in LaTeX. Ekee, was named eqe, is a equation editor let user produce pretty equations interactively. Furthermore, you can drag and drop the equation to some other supported applications such as OOo Impress.

You can save the result like this:

It is also possible for you to reopen this equation, even saved in png file, with ekee for further editing or modification.

Sunday, May 24, 2009

[QnA] How to increase the number of tty in Ubuntu

Because I like to work in virtual consoles (ttys), sometimes I feel only six ttys is not enough. But, how to increase more ttys than the default number, i.e. six, given by Ubuntu? I found there are many tty* in /dev, so I guessed there should be some way to ``enable'' these virtual consoles.

After searching on the internet, I got some information:
  • To open a tty, the file /etc/inittab is the key
  • Ubuntu has no inittab, which has been replaced by the files in /etc/event.d
So, I listed all the files in /etc/event.d and found there are files named from tty1 to tty6. Then I check the contents of these tty* files and found all of them have almost same setting inside, like the follows.

# tty1 - getty
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

exec /sbin/getty 38400 tty1

Ah, the rule emerged. I copied the tty6 to be tty8 to tty12 (tty7 is for the GUI desktop, as I know...), then replaces the string ``tty6'' in all the copies to their corresponding tty number. Finally, I have 11 virtual consoles, i.e., tty1 to tty6 and tty8 to tty12.

[Heli] Raquel Bellot -- Amazing Lady 3D Fly

Do you know how to perform 3D fly with the RC transmitter behind you or on your head? Raquel Bellot, a Spain RC helicopter flyer, showed you the way she did:

Some photos here: AHS 2008

[SW] Using templates of OpenOffice (Writer)

One important thing I have learned from using LaTeX might be the concept of ``separating the style and the content.'' This concept is actually universal in various works. For example, the CSS file for the HTML files. We can set all the styles needed in one file, and use this file with many different files which share the same style settings. This concept makes thing easier and more efficient as we dealing with more and more files.

The same concept is also true when we work with the WYSIWYG word processor. Most people use MS Office, but I preferred the OpenOffice due to its ``open'' nature. I am always looking ways which can help me use the word processor more efficient or more professional. I don't want to just utilize a powerful software with its maybe only 2% or 3% capability. If you can explore more deeper ways to use a software, it often means you can handle the software better and do more things with it. In addition, in my own opinion, to dig into the advanced function of a software is to respect the authors who worked hard to develop the software.

When using the OpenOffice Writer, a template could make things easier. With the help of the template, you can compose different files and all of them have the same style. You can change the style of every detail items by yourself, just as most word processor users as I know, but a better way to handle the style is to set up a template, then adopt it for further file editing.

There are many tutorials available. I listed some I found and regarded useful as the follows:
So far, the only inconvenient feature I found is the way of applying new template to an existing file. It seems no ``apply new template'' function in OOo Writer, so the user has to rebuild a new file from the new template, and then copy and paste all the content from the old file to the new one.

Friday, May 22, 2009

[SW] Install the newest Scilab on Ubuntu

Here is a clear guidance shows how to install the newest stable Scilab from the binary package. I have just remove the Scilab-4.1.2 installed via Synaptic Package Manager, and installed the Scilab-5.1.1 downloaded from the website.

Everything looks smooth so far. At least the GUI interface looks better.

[SW] Scilab -- reading a data file

To read data files we have generated by other means into Scilab, use ``read'' seems a convenient way.

Don't use ``load'', which looks like a function to load variables saved by Scilab using ``save'' that produces binary data files.

Take one of my data files as example, the data file consists of four columns: time, ax, ay, and az1

1.00000 0.139641 -0.139664 0.980796
1.03125 0.125245 -0.152101 0.975367
1.06250 0.143240 -0.153878 0.966317
1.09375 0.141441 -0.157431 0.964507
1.12500 0.127045 -0.139664 0.964507
1.15625 0.134243 -0.157431 0.968127
1.18750 0.137842 -0.148548 0.982606
1.21875 0.128844 -0.148548 0.975367
1.25000 0.127045 -0.144994 0.984416
1.28125 0.146839 -0.153878 0.971747
1.31250 0.150438 -0.148548 0.966317

Then use ``read'' to get the overall data as a matrix.

data = read('dataFileName',-1,4); // -1 means we don't know the data number of row
data_time = data(:,1); // assign the 1st column to the 1st variable
data_accx = data(:,2); // assign the 2nd column to the 2nd variable
data_accy = data(:,3);
data_accz = data(:,4);

For the convenience of future using or modification, we can save the above script as the fooFileName.sce file. Next time when we need the script, just use ``chdir'' to change the working directory where the sce file exists, then use ``exec fooFileName.sce'' to execute the script.

Wednesday, May 20, 2009

[Chat] The Linux Counter

Here is my registered number of The Linux Counter. The purpose of this ``counter'' is for fun, so I also registered for fun. :-)

Monday, May 04, 2009

[SW] CLI: playing the video in ASCII art

I am just a normal PC user, but I like working with command line or text mode very much. The reason might be I think text mode is ``pure'' and ``simple.'' Of course, the word ``simple'' never mean it is simple for the users, but means the way of appearance or presentation.

After learning something useful in command line, e.g., writing and debugging code (gcc and gdb), surfacing the internet (elinks or w3m), and play audio files (mp3blaster), I began to curious about how to play video in command line mode.

To play a video, there are also methods to do it with the command line.

For VLC, try:

vlc -I ncurses yourVideoFile

For Mplayer, try:

mplayer -vo aa yourVideoFile
mplayer -vo caca yourVideoFile

where -vo means video output driver. The drivers aa and caca are used for monochrome and color ASCII art video output, respectively.

The results are funny. When you look at the monitor at normal distance, you may hardly figure out what are you watching. There is only rapidly changed ASCII symbols! As you step back form the monitor, however, you will find all the dynamic images become clear and meaningful. You are watching video consists of many ASCII symbols!

Here is one screenshots captured on my monitor. Use mplayer with -vo caca:
(Original video can be viewed on YouTube: 元ちとせ-春のかたみ. By the way, I love songs of 元ちとせ [Hajime Chitose] very much.)

Of course, the above image was captured by playing the video using Terminal in the desktop environment (pty?). I don't know how to output the ``image'' in the real command line mode (tty?).

Also, there are still some problems I don't understand. The first one is when I invoke the vlc with -I ncurses option using pty, the video still be played via the GUI but not the expected ASCII way. Another problem is that the aa option of mplayer cannot paly the video properly. Only part of the image was shown, as the following scrrenshot:

The final problem is that, when invoked under the tty, the mplayer did not do these works as well as it did under the pty. The reverse is true for vlc, however. Maybe someday I will realize the underlying reason about all these problems... maybe. :-p

[SW] SoundConverter

I was searching a software to convert my ogg files to mp3 format (for my mp3 player, which doesn't know the ogg files). Several days ago, I found the SoundConverter, which is an application in GNOME environment.

If you have some sound or music files to convert the format, I think the SoundConverter is a good choice.
[edit: 2010/12/28]
To use the SoundConverter in the command line, here is an example to convert *.ogg to *.mp3.
(Why bother to convert ogg to mp3? Because I have an old music player which doesn't support ogg format! :-p )

Suppose you are in the folder containing ogg audio files:
$ soundconverter -b -m audio/mpeg -s .mp3 *.ogg