Skip navigation.

Beyond the Sky

The place where surface stop and share the experience of life

Posts tagged with "howto"

skype do not cope well with scim

, , , ...

If you use scim for input, and you want to work with skype, you need to get skype-static. Skype will not work, you will get core dump if you default input is scim! I just wanna cut it short, if your default input is scim, download skype-static from http://www.skype.com/go/getskype-linux-static

You will get a file with filename such as skype_staticQT-1.3.0.53-generic.tar.bz2, then unzip it and do as follow:

Extract to a location, example
sudo tar xjvf skype_staticQT-1.3.0.53-generic.tar.bz2 -C /opt


Make a symlink
sudo ln -s /opt/skype-1.3.0.53/skype /usr/bin/skype


Thats it!

I recompile my fluxbox from source

, ,

Fluxbox come with Ubuntu Edgy is the latest one, but it do not support imlib2 by default and it fails to display me information when i do

fluxbox -info


So I recompile the fluxbox and replace it. The fluxbox come with ubuntu edgy repo is installed at /usr/bin and /usr/lib. Fluxbox surce code configure by default is install in /usr/local/bin, do not support imlib2 too, no nls support either.

First I need X header and imlib dev stuff
apt-get install libimlib2-dev xlibs-dev libxrender-dev libxft2-dev


Then configure with nls and imlib support with correct prefix, so it will install at the same place when the current one.
./configure --enable-nls --enable-imlib2 --prefix=/usr


Observered the output of the configure, check whether nls and imlib2 is correct support, will appear at last few lines. Solves any dependencies if configure fail halfway.

Then? simple, make and sudo make install. Thats it!
Download here
Refers wiki here
-------

By the way, this is related but its another topic instead. I am just lazy to add another post, so I put it here.

If you like to edit your menu and key bindings in fluxbox with help of GUI, can check out this page
http://devaux.fabien.free.fr/flux/

It is helpful for beginners, but I prefer edit with vim myself, the key binding support control , alt and shift only, but fluxbox do not restrict you to use any key available on your keyboard.

Better Support for Chinese in Ubuntu Edgy

, , , ...

I am too sleepy when I write about Ubuntu Edgy, chinese input in en_US.UTF8 local, why fcitx is better than scim. After chatting and making friends with people at #ubuntu-cn, I have learn how to makes my Ubuntu Edgy support chinese better.

What is better? Ubunutu Edgy by default support chinese viewing, which means you can read chinese website by using firefox, and maybe you can read some text file in chinese. Observed and discover or not, the characters of chinese are ugly by default. The size of the character is not equal, and sometimes some character might be missing or appear in noisy symbolic. Check this screenshot for an example of ugly looking chinese viewing. Ignore the album arts and Amarok.

By default, no chinese input support. Okay that is no big deal, simply install scim and it will works fine. But if you didn't set it properly, you won't feel nice while writing in chinese. Again, some charater is missing, not in a nice shape and not equal size.

You can login to chinese locale gnome, and it maybe makes you feel be better. But all your menu wordings will be in mandarin, which It is not my preference, I do not like it at all. I want to login my default locale but with chinese locale support too.

Thing I hate the most is, xmms no not support chinese viewing. It doesn't seems to work no matter how I configure and I was really gave up but finally I had found the solution and make it right.

If you are looking to solves anyone of those, read further. But bare in mind, the solution bellow might be missing some steps, because I have apt-get a lots of packages while trying. I might miss out some of the steps, please inform me if you discover any.

First, apt-get some chinese locale.
sudo apt-get install language-pack-zh language-support-zh zh-autoconvert


Second, apt-get some chinese fonts.
sudo apt-get install  xfonts-intl-chinese xfonts-intl-chinese-big ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp


Search for more chinese fonts using apt-cache, and download this one, you really need this one, much much nicer.
sudo apt-get install xfonts-wqy

The full name of this font is call "WenQuanYi Bitmap Song 12", use it, it is a very nice font.

Okay, now can install scim.
sudo apt-get install im-switch libapt-pkg-perl scim-chinese scim-gtk2-immodule scim-qtimm scim-pinyin scim-tables-zh scim-modules-socket scim-modules-table


Play some trick to make scim as a default input for everything.
sudo im-switch -s scim -z default


Okay! This step is going to make your chinese characters looks better! Equal size and nice!
sudo fontconfig-voodoo -f -s zh_CN


What the heck? too simple isn't it? Re-login and have a nice feel first. Oh wait! bookmark this page first, you still need to read further later.

------ Re-login --------

Okay, check out your locale,
locale -a


You should have this two ,"en_US.utf8" and "zh_CN.utf8", you should have more, but at least must including this two. Okay, you are almost done. Anything else? emm... to trigger scim for insert chinese input, press ctrl+space. To temporary turn off chinese input and switch to english, press shift and release (scim-pinyin must triggered for that) and vice versa.

Do you still want your xmms to support chinese viewing or not? Yes, further down.

This is a bit tedious, but it is not difficult.
Check whether you have this file /etc/gtk/gtkrc.zh_CN, if do, copy over with another name.
sudo cp /etc/gtk/gtkrc.zh_CN /etc/gtk/gtkrc.zh_CN.utf-8 


Then goto the font setting at xmms preference and paste this,
-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-* 


Before paste it, copy and backup the original one, in case you want to put back. If you don't have that file /etc/gtk/gtkrc.zh_CN, create it and paste the line bellows
 # $(gtkconfigdir)/gtkrc.zh_CN
 #
 # This file defines the fontsets for Chinese language (zh) using
 # the simplified chinese standard GuoBiao as in mainland China (CN)
 #
 # 1999, Pablo Saratxaga <pablo@mandrakesoft.com>
 #

 style "gtk-default-zh-cn" {
        fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
                  -*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*"
 }
 class "GtkWidget" style "gtk-default-zh-cn"


Not yet can view correctly? you need another step.

Download this,
sudo apt-get install xmms-mpg123-ja


After that, check out your xmms preference at audio-plugin, disable xmms-mpg123 and enable xmms-mpg123-ja and then configure xmms-mpg123-ja, switch to "title" tab. Uncheck the disable-id3v2 and select convert input from GB2312 to UTF-8.

Okay, you should be able to view chinese in xmms. If in the case you still can't, it might be your chinese character in id3 have corrupted, rewrite it.

Something I am not cover at this post:

I haven't try chinese input at open office suit, so I have no idea whether will it trigger any problems or not. If you face any problem on that, consider search on keyword "scim-bridge".

Install wordpress in Ubuntu Linux

, , , ...

If you looking for installing wordpress for multiuser, check out http://nirlog.com/2006/02/04/howto-install-wordpress-multiuser/

I am here just to write down the steps for future reference. First of all, solves the dependencies, Apache, mysql and php must be install.

sudo apt-get install apache2 libapache2-mod-php5 php5 php5-mysql mysql-server


Secondly, download the wordpress and extract to /var/www, restart apache
sudo /etc/init.d/apache2 restart


Next, change the config-sample.php and save as config.php at the wordpress folder, important part to change shows as bellow:
<?php
// ** MySQL settings ** //
define('DB_NAME', 'dbname');    // The name of the database
define('DB_USER', 'mysqluser');     // Your MySQL username
define('DB_PASSWORD', 'mysqlpasswd'); // ...and password
define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value


Okay, next create a user and a database in mysql for your wordpress. By default root without password you can enter the mysql by the mysql command, and it will shows
mysql >

If your root have password? Just run this bellow
mysql -u root -p your_password


Okay create user,
mysql> GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'localhost'
    ->     IDENTIFIED BY 'mysqlpasswd' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%'
    ->     IDENTIFIED BY 'mysqlpasswd' WITH GRANT OPTION;

Usually first 2 line should be enough, another 2 lines enabled the database to be accessible remotely.

Next, type exit to logout and login with new username, for this example , username is mysqluser
mysql -u mysqluser -p


Specified -p without putting password at behind will trigger mysql to prompt you for passward, enter your password and now create the database for your wordpress.
mysql> create database dbname;


Okay last step, Open your browser, type URL and follow the simple instruction.
localhost/wp-folder/readme.html


Have Fun!

Linux By Example

, , , ...

Linux By Example (LBE) started at July 2006, until today, it contains almost 100 examples on over 100 of GNU/Linux commands. The first version of LBE was tested at http://mysurface.no-ip.org/blog, and lately the entire blog shifted to http://lne.blogdns.com/lbe. We registered a web redirection service at co.nr to get a redirection with easy remember's web address, the URL is http://www.linuxbyexample.co.nr

The idea of showing gnu/linux command by using examples is to guide new user to have better understanding of the basic usage of a command and adapt to use it instantly. We are always recommend users to try out the command for more capabilities by go through the manuals. But usually a useful command always come with a very technical and lenghty manual. These manual sometime scares a new user away, because they couldn’t instantly find an example for just trying out. Manuals are meant for reference, example are meant for learning. We learn well by refering to various examples.

I always pity the beginners who are so lost when start off linux command line, who asking questions in IRC or in forums and get the respond "RTFM". RTFM stand for "Read the F**king Manuals", which ask people to "man command" in an annoying manner. The word "F**king" indicate that manual are not easy to read, they are technical, lengthy and some of them are not complete. Anyway, Not all of the manuals are so difficult, some of them have simple example to hands on, some of them are straigh forward and easy to follow. Some lengthy manuals always scared beginners away, because they are not yet cope well with "man". LBE present you various examples and "human" explaination on how you can use the command line. The purpose of LBE is not to stop you from reading manuals. Instead, LBE aims to guide a new user to start off, and lead them to read the manuals when they need further functionality of a command to meet their requirements.

Besides to give an alternative way to understand and use the command line, LBE also gives you ideas on how you can use the command line to do your job. By reading LBE, it does introduce you a useful tools (command line) which you never aware of, or it introduces the other usage of a command line, which you never think of. Combos! How linux user combine few commannds to create wonders. You may discover alternative ways of doing the same job in comments and you are welcome to give your suggestions.

LBE is not just a blog, but it is a space for Linux users to share their knowledge, experiences on using command lines. Please help us to build up the database, we need more linux user for that. You can register as contributor at LBE and can email me personally if you have any question.

What we have besides that?

Mailing List
You can subscribe to get the news and further discussion anything regarding LBE.

Search Plugin
You can add LBE mycroft plugin to your browser search bar. Check out at sidebar of LBE main page and click the link to install.

Random Example
You can get a random example, this return a randome post on our example pool.

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31