Road to chasing better UI

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Months ago, I began to try to avoid bloated stuff. I switched to Enlightenment, then to Fluxbox, and I am still using Fluxbox. A week or two ago, I replaced Fedora 10 with Gentoo. Since then, I started to do more. Now, the only GUI programs often on my screen are Firefox and urxvt. Some have been replaced with CLI UI programs.

Please don't be confused with the word better in this post title. It does not mean more beautiful or more powerful, it means simpler or straighter to do whatever I need.

Desktop Environment: Gnome to Enlightenment to Fluxbox

Gnome or KDE is bloated for me for sure. Any DE(Desktop Environment) uses over 100 MB memory is defined as bloated by me.

I tried Enlightenment on Fedora 10, I liked that. It has plenty options to customize your desktop. For just window management, you can do many fine setting for focus, resizing, moving, transparency, etc. Enlightenment is a good DE and WM(Window manager), but I found FluxBox is more suitable for me.

FluxBox is more simpler than Enlightment, and more lighter. Both of them do not involve much more than WM. They are not like Xfce, Xfce is between them and Gnome or KDE. FluxBox only has the WM, a taskbar, and fbrun (a program like gmrun, a program launcher), I think that's all from Fluxbox. You need to design your only program menu, hotkeys, taskbar layout, startup programs, etc. However, that's not a tough task, and it's definitely worth spending some time for them.

My current desktop has a taskbar at bottom and Conky on right side.

Image Hosted by ImageShack.us

The taskbar only has window list and tray. Conky shows some system information. I have set a hotkey to maximize program but not to cover the Conky, so I can always read those information. Conky doesn't use too much resources, 4MB memory, 1% CPU utilization. It provides me lots of information, date and time, weather, CPU, memory, disk, net, Portage db time, volume, MPD.

I don't use fbrun because it's auto-completion is quite laggy, I use gmrun, instead. For the main menu (which is brought up by right-click on desktop), I put few programs on top-level. In which the Apps sub-menu is generated by MenuMaker. It can search programs in your hard-disk and make a categorized menu.

Terminal: GNOME Terminal to urxvt

Any terminal is based on VTE is not so good at maximizing/resizing window and usually use more memory. When you do that, it needs at least one second to do so. I don't know why and I couldn't stand with that. urxvt is good terminal. It can use Xft and doesn't have problems with compose key and input method.

File Manager: Nautilus to Midnight Commander

This path is not a straight forward one. Before Midnight Commander, I had tried Thunar, PcManFM, emelFM2, gentoonot the distribution, I got confused, first. emelFM2 is good for me, but I wanted a CLI one, and Midnight Commander does a great job. It also support mouse, you can easily click here and there (but no drag-n-dropping). Here is a side-node, if your terminal is not xterm, then you will need to run Midnight Command with -x parameter. I hoped I can configure that with its configuration file but nowhere indicates that is possible.

Anyway, it is easy to use after you are familiar with the key bindings and extension/menu configuration files. You can set up default Open or View action for different types of files, but only one for each. But with F2 menu, you can choose from that menu for more different commands, and, of course, it can be customized. I can bring up different viewers or media players from my F2 menu.

Midnight Commander has a shell inside, you can always run an arbitrary command whenever you need to. You can also bring the current highlighted file's name into the shell by press Alt+Enter. And, auto-completion is supported, too, but you will need to press Esc+Tab, not Alt-Tab if you are in X.

Music Player: Amarok to MPD + ncmpcpp + mpdscribble

Amarok is still my favorite player, and iTunes as well. Again, I want CLI. MPD is a server, so you need a client to communicate with the server, which is ncmpcpp I use. It's written in C++. The interesting thing is you can edit you playlist, hit the play button and quit ncmpcpp. You don't need the client to stay in memory because it has passed your command to MPD.

I also have an account of Last.fm, so I want everything to be scribbled, mpdscribble can do the job.

Communications: XChat to irssi, Pidgin to CenterIM

I don't use IRC or IM much, but sometimes they are useful. The only drawback I can think of are you cannot see the avatars of your contacts and the graphical emotion icons.

Camera Photo Import: gthumb-import to gphoto2

gthumb-import is a good importer but it is bound with gthumb, and I don't use that. gphoto2 is a pure CLI command and it's easy to use. I only need to run gphoto2 -P, then all the photos on camera will be transfer to currect directory.

There are two programs which I can't find replacements. Firefox and GIMP. For Firefox, it is because of an addon, Vimperator. That addon emulates a Vim environment within Firefox, it is an addiction if you are a Vim user, then once you know the plugin, you will use it and never leave it. As for GIMP, I am used to it.

I can't find a good image viewer, which has to be small and quick. That doesn't seem to exist. I only need one to read raw images, jpeg, and PNG.

I think I am just starting walking on this road, there will be many possiblitiies and lots of choices waiting for me to discover.

Using Java package in Python with JPype, an example

This post was imported from my old blog “make YJL” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
In order to fulfill my idea, and I also happened to know OpenOffice.org also has language checker, the LanguageTool.

Today, I tested JPype in order to have Java VM and package running with Python. The original Java example is
JLanguageTool langTool = new JLanguageTool(Language.ENGLISH);
langTool.activateDefaultPatternRules();
List<rulematch> matches = langTool.check("A sentence " +
"with a error in the Hitchhiker's Guide tot he Galaxy");
for (RuleMatch match : matches) {
System.out.println("Potential error at line " +
match.getEndLine() + ", column " +
match.getColumn() + ": " + match.getMessage());
System.out.println("Suggested correction: " +
match.getSuggestedReplacements());
}

With the help from JPype, the equvalient code is
#!/usr/bin/python
# Simple proof test of using Java package in Python

from jpype import JPackage, startJVM, shutdownJVM


startJVM("/opt/sun-jdk-1.6.0.13/jre/lib/amd64/server/libjvm.so",
"-Djava.class.path=LanguageTool.jar")
#startJVM("/path/to/libjvm.so", "-Djava.class.path=/path/to/LanguageTool.jar")

LT = JPackage('de').danielnaber.languagetool
langTool = LT.JLanguageTool(LT.Language.ENGLISH)
langTool.activateDefaultPatternRules();
matches = langTool.check("A sentence with a error " +
"in the Hitchhiker's Guide tot he Galaxy")
for match in matches:
print "Potential error at line ", match.getEndLine(),\
", column ", match.getColumn(), ": ", match.getMessage()
print "Suggested correction: ", match.getSuggestedReplacements()

shutdownJVM()

If you want to run by yourself, you need to set up two paths, one is to the Java VM. In the example, which is for Gentoo. You can find / -name libjvm.so on Linux. The other path is to located the LanguageTool.jar, which you can find it in ZIP(oxt).

Actually, I don't have to load the package, LanguageTool also support web server mode, but I think I prefer to load it if I will be going to use it. I know there is another Java related language, Jython, but I never touched that before.

As for the results, they look good:
Potential error at line  0 , column  16 :  Use <suggestion>an</suggestion> instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'
Suggested correction: [an]
Potential error at line 0 , column 50 : Did you mean <suggestion>to the</suggestion>?
Suggested correction: [to the]

However, the process time is quite long. On my computerCore 2 Duo, 1.83G, it took around 300ms to 500ms.

I have not tried to find other checkers, maybe I will find one and also a Python one?

Another dumb thing I just did on Linux

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
(Photo credit: Oh no! by play4smee)

I was trying to compile Chromium browser on Gentoo AMD64, which is 32bit only browser. I couldn't did it with emul-linux-x86-* libraries because libgio.so was not included in them. So, I decided to take chroot method and I don't like that before or after. However, it didn't work, either. Some path issues still remain, header files can't be found, and I don't know how to fix it and didn't want to.

Chroot environment became useless to me, so I did rm -rf /mnt/gentoo32. If I completely followed the guide, I only need to emerge --sync to fix /usr/portage (Gentoo's package (meta)data location).

Unfortunately, I did more than that:
mount -o bind /root /mnt/gentoo32/root >/dev/null &
mount -o bind /home /mnt/gentoo32/home >/dev/null &

Laziness made me. I wanted the environment bashrc, etc. And I also need the source code of Chromium, it's already in my home directory, so I didn't see it's wrong to bind my home to chroot environment.

I still don't think those two bindings are wrong actions. The only mistake I made is lacking of careforgetting to umount. I am sure this won't be the last time... :p

A program for helping concentration, JDarkRoom

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Writing by JKim1

Yesterday, I wanted to find an editor for writing. At first, all I can see is about programming editors, and that absolutely was not what I intended to have.

After few more tries, some keywords started to show up from my search results. One of them is creative writing program, of which the word program is not meant the computer program but a course for learning or studying creative writing. So what exactly is creative writing? This question I couldn't answer, at least, because I am not a native and never have any advanced class of English. Needless to say, English writing wouldn't be one of my skill (I hope someday it will be). According to those web pages, it can be a creation of a novel, a film screenplay, a poemor anything can inspire your by your imagination, orthe keywordcreativity.

Back to my intention of seeking an editor, I was expecting a editor, a simple text editornot a word processor. By which, you can focus on writing whatever you are working on, it can providing necessary accessibilities, such as dictionary/thesaurus lookup, grammar/spell check, or sort of things can essentially be helpful to writing.

I did saw some applications but almost all of them are for Windows or mainly for Mac platform. Nevertheless, it seems that Linux users do not deserves having one, I still managed to find one. And even better it's a free software (not as in freedom), JDarkRoom. Obviously, it's a remake of another software, inherits the idea of the original and extends the concepts to better implementations. Full black background with green text color (with a nice music if you have one), then it does help. At least for me, I can concentrate now. This somehow solves the problem, and, be honestly, I was not aware of that problem before.

Image Hosted by ImageShack.us
Full screenshot of JDarkRoom

JDarkRoom is written in Java, so it's capable to run on many operating systems, including Linux. Its only purpose is helping concentration, but I believe that we can count on it more. The current feature can be part of a bigger program, a editor for writing. I have some ideas, I might be starting to work on a new such editor, but I am not so sure.

You may already know I am a Taiwanese speaking Chinese, but I am kind of resisting using Chinese by any means. Ridiculously, my English is not fluent and I can barely speak with blah-wa-la-e-ya accents. I have no idea how or when this all happened. Back at school, Chinese writing is just my average skill, I was never good or showing interest at Chinese or literaturefor this, it's still true today. As of English, it's the same story.

Five years ago, I heard of blogging, and started to do it in English. The reason of using English is an unsolved puzzle to me, too. I discontinued for a year, then I on-and-off wrote some postings since. Many questions are unanswerable, even you have one, you will still doubt of it. So, quit questioning it. Just write it!

Thoughts from a two-day-old Gentoo newbie

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Image Hosted by ImageShack.us(Read my thoughts about Gentoo after six months)

The stereotype

I remembered there was some of jokes or such like, which depicted major GNU/Linux distributions as in cartoon pictures. As for Gentoo, if I recall correctly, it is a broken old-school CRT monitor with some funny words like You broke, fix it. That was what I thought about Gentoo before I really trying it.

First glance

When I decided to download and burn the CD (I still couldn't remember what motivated me), I felt no fear about it. Honestly, some should have. In my opinion, Gentoo is not for a complete Linux newbie to try, even though its documents are well-written and truly full of knowledge. The installation process and maintenance are dumped a lot of terms and intermediate-skill-required stages. It is absolute not to saying Gentoo is for expert-only. Actually, there is a fact for one thing, by which can decide whether you are an expert or not: Are you willing to RTFM and google for answers?

If you are, then there is no doubt that Gentoo is the one for you. The installation stage before the first boot, more or less, it reminds me of the installation of LFS (Linux From Scratch) which I had tried almost a year ago. At that time, I also used multilib, the outcome of the processes should be similar. However, Gentoo is much more easier. It's started from stage3 and few useful scripts, you don't need to build toolchain, not even for once. With LFS, you must build them, twice! In order to get a minimal system for installing base system. Gentoo has prepared everything for you.

USE here and there

Portage, emerge, ebuild, etc., I have heard of them before. And now I finally am aware of their powerwell, that might sound exaggerative, but I have already known how to maintain the system by using them. In the only experience of LFS, I had never upgraded the toolchainbinutil, gcc, and glibc, etc; just in my first day of being a Gentoo newbie, I upgraded gcc 4.1.2 to 4.3.2 without a single problem (If I had, I wouldn't have this chance to write this.).

The most exciting thing of Portagethe package management system of Gentoois the USE flags and CFLAGS. You can customize your own CFLAGS very easy and decide what features of a package that you want by specifying USE flagslocally or globally, it's very flexible to set the configuration. For example, when you firstly build GIMP, you think you don't need tiff support, so you turn that feature off. Later, somehow, your friend sends you a tiff format file and ask you to edit that. All you need to do is run sudo USE='tiff' emerge gimp and wait for rebuilding with the local USE flag (say tiff isn't in profile or make.conf). If you want to this on LFS, it's not too hard either, but you have to handle the dependency by yourself; if on distribution like Fedora, you have to modify the SPEC file and build, then hope it builds smoothly since that is unsupported feature (from the package manager). Also, you need to wish the dependency has already in repository. Otherwise, you have to take care of that dependency, too.

On Gentoo, all you need to pay is the building time. You might think the building from sources take some time even much time, indeed, it is. But beforehand, you don't have unwanted code occupying your memory or your disk space. And, true again, it is just a small pay, but how many packages you have? If that small pay multiply 100 times, would that be small again? And how many small pay in a package?

So far, the kernel I built is about 2 MB with 11 MB modules library, and there have not done optimization yet. Some drivers I don't need remain, those can be removed. Why I haven't removed them, because there are also many things that I do not understand what they are. This brings up another benefit of using Gentoo, you can know your system betterboth softwares and hardwares. You have to know them, then you can control. You will gain control eventually, again, if you are willing to pay time for researches.

The world

Within 48 hours, I have a bootable Linux OS, an X with Fluxbox, an ATI proprietary driver with DRI, Conky for system monitor, mpd and ncmpcpp for music playing, mplayer for multimedia, GIMP and ufraw, vim, subversion, and Firefox and other small bits. Currently, I have 400+ built packages on system. Sound, Video, Adobe Flash Player, and Java all work happily.

Except the installations, some customizations have also been finished. The rules of iptables, sudo, net connection in boot-time?not by the annoying NetworkManager, ccache?a compilation cache, Fluxbox and Conky adjustments, fonts, and many in /etc/.

Faster and stable worldthe world has become faster because you can choose what services you want to run and the power of choosing is fully in your hands. Which might also bring up some stabilities. If you ask me which program impress me most after using Gentoo, I would say Firefox. Before, on Fedora 10, it consumes 50 percents more of 2 GiB memory, that seemed to happen often. Now, it stays in between 10 and 20 percents. The appearing differences are it is now built up on for Core 2 Duo, it currently only has Adobe Flash Player plugin. The profiles of Firefox were restored from the backup of previous system. The world is dancing around me.

Community

I haven't checked out the Gentoo community because all problems I have encountered were resolved via Gentoo Handbooks, documents, wiki pages, or googling. As far as I know, Gentoo has many IRC chat rooms, many forums, many mailing lists. It definitely won't be hard to get in touch with them and ask for an answer.

So...

Gentoo to me is easy and simple to use, just as the many distributions follow the holy philosophy, KISS (Keep It Simple, Stupid), but this is actual one. With Gentoo (after newbie phase), you control and know stuff well. The package management and system administrate management are also easy to use. Every distribution has own pros and cons, no one is perfect in all aspects. But there may be one is perfect for you, and I just found mine. I believe as long as you pay a little more efforts, you can transform Gentoo into an eagle and command it to fly.

Better URI for your Google Profile

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Image Hosted by ImageShack.us


Just knew that Google Profile gives us better URIs [via TechCrunch]. The old (but still work) URI is http://www.google.com/s2/profiles/115422682039760465813, which is awfully long and you can't guess who's that by seeing the URI. The new one is like http://www.google.com/profiles/livibetter, which is the same username of Gmail box. So, you probably want to put a dot in if you use your real name, for example, you can have http://www.google.com/profiles/livi.better as if you can do for your Gmail: livi.better@[gmail]. That also works.



Go to edit profile, scroll down to bottom, you will see the option to have new style of URI. If you click on see more options, you will also have an option like http://www.google.com/profiles/115422682039760465813, but I doubt that anyone would use that.

code snippets / evil walrus

This post was imported from my old blog “make YJL” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
It is a code collection website, based on a wiki-like system. Collaboration and revisions, it also provides shortening urls. If you are not satisfy with someone's contribution, you can easily modify it with an account.

Image Hosted by ImageShack.us

One thing must be aware, that is all codes are in Public Domain. evil walrus is so like pastebin.com as in partial functioning, but you cannot use it in the same way because of Public Domain, you may not be able to put the code in PD. Stack Overflow is another coding-related website, but it has different purpose, it's for solving problem at first not the contribution.

Currently, it doesn't have commenting system, which seems to necessary to have better use and to gather more intelligent thoughts.

Kröd Mändoon and the Flaming Sword of Fire

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
An epic comedic fantasy show, Kröd Mändoon and the Flaming Sword of Fire [IMDb, Wikipedia].







Krod MandoonThursdays 10p / 9c
Krod Mandoon Series Preview
comedycentral.com


Matt LucasKevin HartSean Mcguire

Clear GNOME Recent Document list not in GNOME

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Image Hosted by ImageShack.us
I don't use GNOME DE anymore, but I still use some programs which cooperate with GNOME's Recent Document list, I don't need the list and they couldn't be disabled.

It's easy to empty the list:
rm ~/.recently-used.xbel

If you want to get rid of that, do the following as root:
touch /path/to/.recently-used.xbel
chattr +i /path/to/.recently-used.xbel
+i means A file with the i attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to  the file.  Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

The Bucket List (2007) Do (Say) what you need to do

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Do you have The Bucket List [IMDb, Wikipedia] (things that you want to do before you kick the bucket [die])? What would you be thinking when a doctor tells you only have six months to live, a year if you are lucky?

Two questions: Have you found joy in your life? and Has your life brought joy to others?



I think for both of Edward and Carter, they are seeking the joy and trying to bring joy to each other. Carter dedicated his life to his family, at the last time of his life for the first time, he is encouraged by Edward to do what he hadn't had a chance or courage to fulfill.

Does life have purpose? How do you measure a life? Is life really measurable? Everyone has own answer. But do we need answers to our lives? Life is not as simple as yes or no. You may or may not be descibing your life in words. However, I am sure that life needs to be experienced. You can't not just live by what people tell you, we need to find out a way to live, our own way. Each life is unique, whether it is good or bad.

If your answers to both questions are No, then you haven't got you life started. It would never be too late to do something until you stop breathing.

Amarok 2.0.2 Last.fm plugin stopping scrobbling

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Image Hosted by ImageShack.usFew days ago, I noticed that the scrobbling was not working, you can read this bug report. In it, there is a patch for fixing the problem. According to the bug report, there wont be Amarok 2.0.3, the next release is 2.1beta. So far, I saw no bug report in Red Hat's bugzilla, therefore I decided to patch on my own. I downloaded the source rpm amarok-2.0.2-3 and rebuild the srpm and rpm.

You can download them:
You can install by running:
yum --nogpgcheck localinstall XYZ.rpm

The International (2009)

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I was quite disappointing about The International [IMDb, Wikipedia], it should be pushing to the limit. The agent tried to bring the justice from outside of the system, in the end, it's done but not by him and not enough. (The International 2?)

Race to Witch Mountain (2009)

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Image Hosted by ImageShack.usRace to Witch Mountain [IMDb, Wikipedia] is a Disney production movie, it's perfectly for family watching. But I think it would already be boring a teenager. The storyline is about the alien, but it's actually not strongly emphasis that. It's more like a someone misunderstand or misjudge a good guy and pursue the good guy, the old fashion story.

Indeed, there are some parts which seem to be alien technology, but they're just geek gadgets. The special abilities (power), which human doesn't have, have seen many times in many other fiction movies. It's the time to apply on alien material, again. The control screen panel of the spacecraft is obviously lack of creativity, that reminds me of the starter, Minority Report.

Generally, it's a movie which is suitable to be watched for family time. For that, it does good.

Tea with food

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Tea with food
Nothing better than a cup of warm tea in a cold afternoon. Food is just a supporting role, what you have doesn't matter. But I like bacon and egg, so they must be on dish.

It's been more than a week, the weather has been always cloudy, sometimes, it rained. Spring is possibly being trapped somewhere. Few sips of warm tea or coffee can cheer up me. Rain, go ahead!

Aha... I enjoy exhaling the warm breathe.

Common errors on running a program

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Some common errors can be easily resolved on Fedora.

Error: Missing shared library
ALSA lib pcm.c:2162:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
Resolution
The missing file in what package can be queried by running yum provides "*/libasound_module_pcm_pulse.so".

Common compilation errors

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I keep my experiences on compiling in this blog post, the compilation is the standard ./configure && make. The resolutions listed here is for Fedora.

Error
checking for GTK... configure: error: GTK+-2.8 is required to compile gtk-engines
Resolution
gtk2-devel package is not installed or too old.

Error
configure: error: No C++ compiler found
Resolution
gcc-c++ package is not installed.

Error
$ make
[snip]
gcc "-Wall" "--std=c99" "-Os" "-s" -o ".pm-cache/34-1-utils" ".pm-cache/1-utils.o" ".pm-cache/2-main.o" ".pm-cache/3-lua.o" ".pm-cache/4-word.o" ".pm-cache/5-bit.o" ".pm-cache/6-screen.o" ".pm-cache/32-31-7-_prologue.o" ".pm-cache/33-dpy.o" "-lm" "-lncursesw" "-llua5.1"
/usr/bin/ld: cannot find -llua5.1
Resolution
If you are sure you have installed the library, then this is usually caused by the different naming (convention) of /usr/lib[64]/*.so on different distributions or you are compiling on x86_64 but the compiling script find the wrong directory for *.so and can't find a such name (If found, the error message should be about ELF Class is not compitable). You may need to open Makefile and change -llua5.1 to -llua whereever you find.

Yum/RPM errors

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
This blog post is a collection of Yum/RPM errors and their resolutions on Fedora. They may not be happened on me, so I can ensure that does work or will the resolutions be harmful.

Error
Loaded plugins: refresh-packagekit
rpmdb: Thread/process 3198/3087034048 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30975)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
[snip]
TypeError: rpmdb open failed
Resolution [1, 2]
rm -f /var/lib/rpm/__db*
db45_verify /var/lib/rpm/Packages
rpm --rebuilddb
yum clean all
yum update

Life before the computer

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Image Hosted by ImageShack.us


This is possible an old joke at the time when 3 1/2" still be the most awesome portable storage media. Stronger than 5 1/4". I searched for this joke and I found more complete version:

An application was for employment

A program was a TV show

A cursor used profanity

A keyboard was a piano!



Memory was something that you lost with age

A CD was a bank account

And if you had a 3 1/2 inch floppy

You hoped nobody found out!



Compress was something you did to garbage

Not something you did to a file

And if you unzipped anything in public

You'd be in jail for awhile!



Log on was adding wood to a fire

Hard drive was a long trip on the road

A mouse pad was where a mouse lived

And a backup happened to your commode!



Cut - you did with a pocket knife

Paste you did with glue

A web was a spider's home

And a virus was the flu!



I guess I'll stick to my pad and paper

And the memory in my head

I hear nobody's been killed in a computer crash

But when it happens they wish they were dead!
Before I first experience of computer use, I could not speak any English at that moment. I was about 8 years old. Since then, my vocabulary bank started to grow up, but it's in very limited and special way. I only know the meaning of computer field and barely can pronounce them. Until now, many words in my head are still strong bound to computer terms. Sometimes, it's hard for me to think outside of computer.



It's interesting when you look back on this joke. Many things have changed after this joke being written. I think the best time of 3 1/2" has past about a decade. If another decade passes, how many in this joke would remain?

CMatrix

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
CMatrix you might have it on your system, but this is my first time to run it, although I did what The Matrix series several times.
Image Hosted by ImageShack.us

I ran with -ba -C yellow options.

Three CLI clock programs

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I tried to find a nice CLI clock, and I found three, binclock, tty-clock, and Clockywock. Here is a small demonstration of them:


binclock is basically a binary clock, but it can also show you the digital clock. It's already in Fedora repository. It's written in Python using ncurses with color.
Image Hosted by ImageShack.us

tty-clock is a normal clock. Big clean text display and can bouncing around.
Image Hosted by ImageShack.us

Clockywock is an analog clock, it also support alarm.
Image Hosted by ImageShack.us

Two comics about Linux

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I recently noticed two comics about Linux.

First one is LH Strip, it's just a comic strip. Here is the second strip.

Second one is Ubunchu, exclusively about Ubuntu. It's a Japanese manga, but has been translated into English.

Legend of the Seeker

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Legend of the Seeker [IMDb, Wikipedia] is a TV series based on The Sword of Truth, a novel series.



I never watched a show about epic world, full of magical power, warriors, wizards, strange creatures, and others we have seen in movies. I wonder if this show has something from The Lord of the Rings in spirit of art or visual effects.

It's shot in New Zealand, a beautiful country. There are many stunning scenes in the show. Bullet Time is used many times. However, it's not so magical, most time I saw is the fire spell. I was expecting more than that. But fighting scenes are good.

Are all Confessors good at fighting? Anyway, when Kahlan confesses a person, the pupils become full black, then the whole eye. I believe that I saw X-Files' shadows. Wait, that's black floating stuff. That should be Supernatural's shadows.

It doesn't have much can make you LOL, but it's not boring at all. Maybe this is because it's new type of show for me.

Manually handle LCD on/off

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I have left GNOME for months. Sometimes, you still miss Desktop Environment like GNOME or KDE. They handle many things behind scenes that you would never ever notice.

(Photo credit on the right: EDC 2: OFF or Finally doing what my mother told me by Theorris)

I use Enlightment 0.16 right now, I have dealt with many things, such as volume control, tray, hotkeys, compose key, etc.

The recent solved issue is the backlight of LCD, actually, this is second time I solved it. There is a command called xset. You can use it to blank screen but nothing about power management:
xset dpms force off

The backlight of LCD is still on, I mis-remember the correct command. The correct one should be vbetool.
vbetool dpms off
vbetool dpms on

This command needs permission, and it won't automatically resume when you move mouse or type a key. xset does, but it doesn't turn off backlight.

You should modify an ACPI action script, which detects laptop's lid on or off. In my case, which is /etc/acpi/actions/ati-powermode.sh (I used proprietary driver). There is a piece of code:
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]; then
lid_closed=1
echo "Lid Closed"
else
lid_closed=0
echo "Lid Open"
fi
Make that be
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]; then
lid_closed=1
echo "Lid Closed"
vbetool dpms off
else
lid_closed=0
echo "Lid Open"
vbetool dpms on
fi

When this file gets updated, it revert to original. I forgot the correct command, I seached again for the right one. Now, that wont be happened again since I wrote this.

Lastly, a short clip. I intended to find a very short video about lights going off. I did found one, and more than that. :)

Donald, Wheres Your Trousers?

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I heard this songs, Donald, Where is Your Trousers?, via Terminator: The Sarah Connor Chronicles season 2 episode 21. Here is the clip with lyrics on YouTube:


There are two versions on Grooveshark, one by The Irish Rovers, another by Brobdingnagian Bards [Lyrics] (There's another version by Andy Stewart.):


The version in this episode seems to be Brobdingnagian Bards'. According to Wikipedia, it's combined What Shall We Do with a Drunken Sailor with the Scottish song Donald, Where's Your Trousers? You can also download free MP3 via Brobdingagian Bards' official website, there are many free Celtic songs for download.

I like John's and Savannah's version. It becomes different with Derek's death and Sarah's arrest. But the setting of Derek's death is too awful, just died like that? Brutal screenplay and rubbish.

Dear Mrs. Susan Morgan

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Photo credit: Abidjan Panorama by k_r_o_42

Dear Mrs. Susan Morgan,

I am sorry for your health condition, but please allow me to bring up your original letter first:
from Susan Morgan 
reply-to [email protected]
to [email protected]
date Sat, Apr 4, 2009 at 01:12
subject From Mrs Susan Morgan
signed-by yahoo.cn

From Mrs Susan Morgan


BP [38 Rue Des Martyrs Cocody

Abidjan, Cote d'Ivoire
ATTN
DEAREST ONE OF GOD

I am the above named person from Kuwait. I am married to Mr.Abram Morgan, who worked with Kuwait embassy in Ivory Coast for nine years before he died in the year 2004. We were married for eleven years without a child. He died after a brief illness that lasted for only four days.

Before his death we were both born again Christian. since his death I decided not to remarry or get a child outside my matrimonial home which the Bible is against. When my late husband was alive he deposited the sum of $2. 5 Million (Two Million and Five Hundred thousand U.S. Dollars) in the bank here in Abidjan in suspense account.

Presently, the fund is still with the bank. Recently, my Doctor told me that i have seriouly sickness which is cancer problem. The one that disturbs me most is my stroke sickness. Having known my condition I decided to donate this fund to a church or individual that will utilize this money the way I am going to instruct herein. I want a church that will use this fund for orphanages, widows, propagating the word of God and to endeavour that the house of God is maintained.

The Bible made us to understand that blessed is the hand that giveth. I took this decision because I dont have any child that will inherit this money and my husband relatives are not Christians and I dont want my husbands efforts to be used by unbelievers. I dont want a situation where this money will be used in an ungodly way. This is why I am taking this decision. I am not afraid of death hence i know where I am going. I know that I am going to be in the bosom of the Lord. Exodus 14 VS 14 says that the Lord will fight my case and I shall hold my peace.

I dont need any telephone communication in this regard because of my health hence the presence of my husbands relatives is around me always I don't want them to know about this development. With God all things are possible. As soon as I receive your reply I shall give you the contact of the bank here in Abidjan. I want you and the church to always pray for me because the Lord is my shepherd. My happiness is that I lived a life of a worthy Christian. Whoever that wants to serve the Lord must serve him in spirit and Truth. Please always be prayerful all through your life.

Contact me through my e-mail address for more informations, any delay in your reply will give me room in sourcing another church or individual for this same purpose. Please assure me that you will act accordingly as I Stated herein. Hoping to receive your reply. Remain blessed in the Lord.


Yours in Christ,
Mrs Susan Morgan.
Obviously, we have never met before or you would know I can read Chinese and greeting me in Chinese. You are currently in Abidjan, Lagunes Côte d'Ivoire, I guess you've been many places, such as China and Japan.

I am overwhelmed that you picked me to follow your will. If I do get the money, I am willing to dedicate my life for propagating the word of God, ... to look after orphans and widows in their distress... James 1:27, NIV.

US$2.5 Million (Two Million and Five Hundred thousand U.S. Dollars) are not a small number. That will be a big challenge for me to manage, but I am sure that I am capable to do well in names of God. ...with God all things are possible. Matthew 19:26, NIV.

I understand that you don't want to communicate on phone, under your current circumstance, that must be hard to find someone can trust and also a dedicated Christian. ...by prayer and petition, with thanksgiving, present your requests to God. Philippians 4:6, NIV, he always listen to everyone with faithful heart. Soon, he will bring you to whom you are keeping seeking.

Lastly, ...We constantly pray for you...that by his power he may fulfill every good purpose of yours and every act prompted by your faith. 2 Thes. 1:11, NIV, I will pray for your for your health.

Oh, I almost forgot to tell you that I am no Christian, I am kind of atheist.

Sincerely yours,
Yu-Jie Lin

App Idea: Message in a bottle

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
(This is a cross-post from make YJL)

A tweet gave me an inspiration, Message in a bottle. For these days, everything may have to evolve to adopting a different path.

I don't know why people would want to write a letter and put it into a bottle, then let the bottle travel through waves of ocean. Maybe a day, a month, or years, someone would pick up the bottle and read the letter. Or maybe it never have a chance.

Somehow, I feel this is a good idea, imagine that you can be able to write a message online and put it into a virtual bottle. Then a system will select a random person who is also participate, and send your message at a random moment. Once the recipient reads your letter, you may get a reply from the person if you choose to be contacted.

I've also thought about combining time capsule. You can set a time when the bottle will be found. More over, the recipient can re-seal the bottle and pass on.

There are many possibities that this idea could achieve. If you are interested in and able to create an application, please contact me. Let's what we can make for it.

Photo credit: Message by oyam

App Idea: Message in a bottle

This post was imported from my old blog “make YJL” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
A tweet gave me an inspiration, Message in a bottle. For these days, everything may have to evolve to adopting a different path.

I don't know why people would want to write a letter and put it into a bottle, then let the bottle travel through waves of ocean. Maybe a day, a month, or years, someone would pick up the bottle and read the letter. Or maybe it never have a chance.

Somehow, I feel this is a good idea, imagine that you can be able to write a message online and put it into a virtual bottle. Then a system will select a random person who is also participate, and send your message at a random moment. Once the recipient reads your letter, you may get a reply from the person if you choose to be contacted.

I've also thought about combining time capsule. You can set a time when the bottle will be found. More over, the recipient can re-seal the bottle and pass on.

There are many possibities that this idea could achieve. If you are interested in and able to create an application, please contact me. Let's what we can make for it.

Photo credit: Message by oyam

Fedora Classroom

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Credit: FBI Classroom by billerickson

Image Hosted by ImageShack.usI read this post on FedoraForum, you can more information about Fedora Classroom on Fedora's wiki. This classroom is quite unusual for me, it's on IRC chat. If you wonder how it works as I did, try read this Introduction to bash shell scripting.

The next session will be on 10:00 UTC on this Saturday and Sunday.

On Saturday
  • Introduction to Fedora Classroom and Sessions
  • Setting up a Virtual Routing Environment using Fedora and User Mode Linux 
  • Introduction to Netlink Sockets - What are they
On Sunday
  • Introduction to Fedora Classroom and Sessions
  • Introduction to busybox and qemu on fedora
  • Fedora Networking Basics
  • Fedora Classroom Wrap-up Session
When I first saw Fedora Classroom, I thought it might be using video, live or not. Or something like podcasting. A pure text IRC chat is out of my expectation. So, surely, I will be in this classroom tomorrow to see how it really works, and hope I can see you there, too.

Now livibetter.mp is my new index.html

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Free Image Hosting at www.ImageShack.us
(This is a cross-post from Get Ctrl Back)

Months ago, I decided to use Google Sites as my index.html. Now livibetter.mp is the new one. Chi.mp looks like a profile plus little scale of FriendFeed. You can give visitors your contact information, activity stream and many other things. Chi.mp designs well, though there is still some small things are not perfect.

Once you signed up, you can get the dashboard. From there, you can update your status, e.g. Twitter's updates, add photo (to Facebook and/or to Flickr), or write blog post on Chi.mp. Clear view of your contacts and contents. If you switch to Dashboard / Personas & Privacy, you can change theme and switch every single content source on/off.

Composing your Profile, you can put phone numbers, addresses, emails, etc. And give them into to different personas. For example, you can only allow friends accessing your phone number. You can also upload avatars. You can even upload favicons. Both avatars and favicons are able to show differently to different personas.

In Content section, you can import content just as you do in FriendFeed, but you don't have many services to import. As of writing, there are Yahoo, Feed, Flickr, Twitter, Hotmail, Facebook, and Gmail. Here is one drawback, you actually already set some social networking websites and blogs in Profile, however, you need to do again here.

In Setting / Site Settings, this section also amazes me, you can set page Title, HTML Meta Description, Google Analytics IDGoogle Webmaster Tools Verify Code, and MicroID.

Chi.mp even gives you one Email Forwarding, what can I say, I love Chi.mp! You should already know Chi.mp supports OpenID, and you wouldn't possible to find an OpenID in so short URL, mine is http://livibetter.mp/.

After I go through all settings, I dumped Google Sites and Google Profile.

Own. Evolve. Enjoy!

Now livibetter.mp is my new index.html

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Free Image Hosting at www.ImageShack.us

Months ago, I decided to use Google Sites as my index.html. Now livibetter.mp is the new one. Chi.mp looks like a profile plus little scale of FriendFeed. You can give visitors your contact information, activity stream and many other things. Chi.mp designs well, though there is still some small things are not perfect.



Once you signed up, you can get the dashboard. From there, you can update your status, e.g. Twitter's updates, add photo (to Facebook and/or to Flickr), or write blog post on Chi.mp. Clear view of your contacts and contents. If you switch to Dashboard / Personas & Privacy, you can change theme and switch every single content source on/off.



Composing your Profile, you can put phone numbers, addresses, emails, etc. And give them into to different personas. For example, you can only allow friends accessing your phone number. You can also upload avatars. You can even upload favicons. Both avatars and favicons are able to show differently to different personas.



In Content section, you can import content just as you do in FriendFeed, but you don't have many services to import. As of writing, there are Yahoo, Feed, Flickr, Twitter, Hotmail, Facebook, and Gmail. Here is one drawback, you actually already set some social networking websites and blogs in Profile, however, you need to do again here.



In Setting / Site Settings, this section also amazes me, you can set page Title, HTML Meta Description, Google Analytics IDGoogle Webmaster Tools Verify Code, and MicroID.



Chi.mp even gives you one Email Forwarding, what can I say, I love Chi.mp! You should already know Chi.mp supports OpenID, and you wouldn't possible to find an OpenID in so short URL, mine is http://livibetter.mp/.



After I go through all settings, I dumped Google Sites and Google Profile.



Own. Evolve. Enjoy!

Fedora 11 Beta i386

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I downloaded the Fedora 11 Beta i386 DVD and verified with sha256sum from Fedora 11 Beta, all hashes change algorithm to SHA-256.

The first problem I got is filesystem error, the solution is to use another bootable disc, Rescue Mode of Fedora 11 Beta doesn't work. Fdisk'd partitions: /boot, /, and swap. Make first two with system id 83, ext3. Then reboot. In the installer, use custom layout, assign partition types and format swap partition. This seems to be a bug of Anaconda 11.5.0.38.

After last package installing, I got an exception and only had an option to exit installer. Luckily, it seems to continue the process without harm after rebooting. Few next buton clicks, I saw the logon screen.

After logging in, kerneloops came up and the desktop is kind of weird. The GNOME panel doesn't look normal, it must be video driver problem. I set up a DSL connection and got AVC denial, but that doesn't seem to be a problem.

Once again, PackageKit is still annoying. First thing is to terminate it and remove it from system. Then I set up RPM Fusion repositories in order to get nVidia driver. After installing the driver and rebooting, video is now working normally. I timed the booting, it took nearly 40 seconds.

Now I can take a look of Fedora 11 Beta. The only obvious difference is the desktop background image, that's all I can tell. Other features is listed here, Firefox 3.1 beta and Python 2.6 are only programs that I am interested.

Fedora 11 Beta didn't surprise me, hope the official release would do.

Image Hosted by ImageShack.us

In Bruges (2008) Fu*k, the word

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I didn't even know where Bruges fucking was. It's in Belgium. 

View Larger Map

Image Hosted by ImageShack.us
Two hitmen travel In Bruges [IMDb, Wikipedia] because one of them, Ray, made a mistake in last job. Generally, every character seems to have difficulties in emotion or to be sensitive to senses. Strong contrasts, such as child and Father, art and murder, friendship and order, etc. The whole movie isn't boring, lots of funny points keep coming out one by one.

The only purely good person is the guesthouse co-owner, but the character doesn't have many scenes. Although Ken is a supporting role, but I think he is more important. He protects Ray and sacrifice own life to give Ray a chance. I believe the reason is to hope Ray can make a difference, become a different person, not a hitman anymore. It seems that Ken has been tired of being hitman, even though he didn't say that, but I feel that's all about.

The employer, Harry, is interesting. He arranges Ray's last trip to Bruges for letting Ray see a beautiful-and-might-be-boring town. He thinks that may leave Ray some good memory before Ray dies. Kind of funny, why not just kill? When Harry and Ken at the top of tower, Harry shoots Ken's leg, but then help Ken walk down stairs and shoots Ken again. It's all full of confusion and conflicts.



Ray struggles with the mis-kill, but I can't understand why he can no regret to kill a Father and why does someone hire hitman to kill a Father?

Anyway, this movie is good with nice message:
Number One, why aren't you in when I fucking told you to be in? Number Two, why doesn't this hotel have phones with fucking voicemail and not have to leave messages with the fucking receptionist? Number Three, you better fucking be in tomorrow night when I fucking call again or there'll be fucking hell to pay. I'm fucking telling you - Harry.

Fedora 12 under way?

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Fedora 11 is not yet released (2009-05-26), but there is already something moving behind the scene.

Here is a list of packages that tagged with dist-f12: kernel, fedora-release, gnome-commender. So far there is no detail information on release schedule.

In fedora-mingw mailing list there are two threads about Fedora 12:
Now it's too early to tell about Fedora 12.

The final meal

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
An extremely unusual forum post links to Final Meal Requests archived page, dated on 2003/12/02. (How did the poster find that?)

That page is about the final meal requests from prisons who were sentenced to death penalty. Imagine that if you were one, how would like to eat for the last meal?

There are some requests I want to specially list:
  • 248 Chocolate birthday cake with "2/23/90" written on top, ...
  • 209 Justice, Equality, World Peace
  • 123 Asked that final meal be provided to a homeless person
  • 62 God's saving grace, love, truth, peace and freedom
  • 45 Told officials he wanted to fast
Some of them above aren't real meals, but more like wishes or hopes.

I know it's different under that circumstance, your thought, emotion, physical status must be impact heavily. But I think I would like some soup and cold drink. What would you like to have?

Second runtime language of Google App Engine revealed

This post was imported from my old blog “make YJL” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
It's finally revealed, that's Fortran 77. You can also join the discussion in group.

I have never learnt Fortran, I guess it's time to learn new language or old language? :-)

Google Earth Sky and Stellarium

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
If I need to find any information about stars of universe, the first program which I can think of is Sky mode of Google Earth. I don't know if this Sky mode is for professional use or not, obviously, I am not into it.



Here is another application, it's called Stellarium. It's Free and Open-sourced, and All major systems are supported natively. You can see many screenshots here.



Google Earth's Sky mode has many layers and seems to be a little bit of mess if you turn on too many layers. Stellarium is much more clean. Its UI is simple as well and easy to use. However, if you are not familiar with what you just looking at, it's more easy to access online information with Google Earth.

cairo-dock A neat dock

This post was imported from my old blog “Tux Wears Fedora” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I am not really a fan of eye-candy stuff, but this one is really great. If I am still using GNOME, I wouldn't need any GNOME panels and default applets. With cairo-dock, it already contains all those things with beautiful images.

Here is a quick video clip, I didn't take much time to customize the dock, but it should be enough to show you how neat it is.


cairo-dock provides applet, program launcher, window list, a system tray, program menu, etc. It works well with Fusion and GNOME. Lots of fine settings that you can tune, background color, images, timing, sizing, font, etc.

If you take some time to adjust it, you should be able to satisify with it and to have a pretty clean desktop in GNOME.

Note: If you mess up settings, you can delete ~/.config/cairo-dock and start over again.
Note2: If you are using Fedora 10, you can install by running yum install cairo-dock{,-plug-ins,-themes} as root.