Tuesday, August 3, 2010

Killing and resurrecting a linux machine

How did I kill it?
- tried to install KDE and found that I prefered GNOME
- removed KDE by aptitude to find that the window manager cannot be completely removed
- completely remove KDE remains by a mass removal of libraries, modules... provided on a site
- reinstall ubuntu-desktop

How it died and revived?
- screen turn black (problem with xserver-xorg or sth like that) --> fine, we can work on generic driver
- no compiz, no hibernation --> fine, ATI driver hadn't been activated
- ATI driver cannot be activated!!! --> fine, just reinstall or re-configure the fglrx package (Video driver for the ATI graphics accelerators)
- still cannot enable desktop effects --> fine, wait for a reboot to see if it works! :)
- finally worked

Don't want to get back to windows!

Friday, May 29, 2009

Windows vs Linux

Things on Win that I want on Lin:
(1) My text editor, Notepad++ !!! In fact, Notepad++ worked well with Wine in Lin, but installing Wine and making it working is really really laborious! :(

(2) A good display driver. Although my VGA chipset in an Intel one, integrated on mainboard, but it seems that the even most suitable driver for it on Lin cannot make the display as smooth as it is on Win. It is really annoyed to wait seconds for your mouse and keyboard to response, although the whole system is not that sluggy.

(3) Office: MS Office deserves its 1st place. Open Office cannot deal with Vietnamese keyboard well. Besides, I cannot imagine a life without Office 2007... ^_^

Things that make Lin the choice

(1) Terminal: colorful and highly customizable prompt. It is 'catastrophe' when you run a job and forget the time you executed it. No way to know how long it's been run. That's the situation I've been always trapped in by Win >:<

(2) Power: In Lin, I can run a big task while surfing the internet to wait for it to complete. But in Win, no way! Just go for a sleep. Win has made my system a mighty machine for such a long time!!! >:<

(3) Real speed. People are not exaggerating saying Linux inherits the powerful architecture of Unix framework. Although my work is slowed down by the VGA chipset issue, Linux is still considerably faster than Win when it comes to background processing tasks.

Tuesday, November 11, 2008

Get started with mysql command line

"Command line" has always been a nightmare to me. Bumping into it and you'll find no clue to get out. Well then, we must make things run smoothly before we can see any of its good points over GUI.

You've been in Windows for years, writing, running, even swimming... so you can easily start and master SQL Server in no time. But those were the days. Having Mysql Server installed, I'm now sailing without a working compass. Haizz... Take it easy, we'll get through it, one day... ^_^

If you have SQL servered installed typically, all the things will roll out before your eyes as long as you have the administrative access. USER databases, and SYSTEM databases that store information about the data storage. Well, then, 1st question, where is system information stored in Mysql Server?

Be satisfied by the SYSTEM VARIABLES for the time being. System varaiables indicate how mysql is configured, each has a default value. These values can be set using
- cmd line
- option file

Try this

mysql> show variables;

and this is the results



So it is better that you know what you are looking for, using this syntax:

mysql> show variables like "%datadir%";


Are you wondering how can we know what exactly we are looking for? :D Here, here, some names, for using in another day...

auto_increment_offset
automatic_sp_privileges
character_set_client
character_set_connection
character_set_database
character_set_server
connect_timeout
datadir
date_format
datetime_format
default_week_format
have_csv : YES if mysqld supports CSV tables, NO if not

Mysql Manual is an official (and thus reliable) source to clarify what these names mean. Or just 'show' them and guess, if you like (in fact, i love that 'type-and-see' method rather than looking-it-up in a km-long documentation!)

Thursday, November 6, 2008

Upgrading Perl

Prior to upgrading Perl, it is a good idea to ensure that each module gets carried over to the update Perl version using the "autobundle" CPAN feature. You will need to execute this command via root in SSH:

perl -MCPAN -e 'autobundle'

Once this is complete, you should have the the following outputted before returning to the shell:

'Wrote bundle file /home/.cpan/Bundle/Snapshot_2007_08_16_00.pm'

Make a note of the filename before proceeding with the update.  

- To update to Perl 5.8.8 on Linux based servers:

cd /root
wget http://layer1.cpanel.net/perl588installer.tar.gz 
tar -zxf perl588installer.tar.gz
cd perl588installer
./install

- To update to Perl 5.8.8 on FreeBSD based servers:

cd /usr/ports/lang/perl5
make && make install

Once the update is complete, you can restore all the previously installed modules from the CPAN bundle that was created by executing:

perl -MCPAN -e 'install Bundle::Snapshot_2007_08_16_00'

Make sure that you replace the bundle name with the one that was generated earlier.

We should now make sure that all modules required by cPanel 11 are installed and restart cPanel:

/usr/local/cpanel/bin/checkperlmodules
/usr/local/cpanel/startup

Ten Things You (Probably) Didn't Know About Perl

http://www.ddj.com/architect/184416222

Tuesday, September 9, 2008

PC-using Guidelines

^_^

Well, messing up a PC is easy while making it clean can be a laborious task. I myself has thought about some principles in using a PC and keeping it clean and easy-for-maintaning. These are somehow like guidelines in official papers. ^_^ In fact, they're just some notes for myself. Don't try any one that you feel unreasonable. I won't take any responsibility. Hehe...

All recommendations (with reason) on alternative strategies are welcome.

1. Setting up a system

1.1. Windows system

3-partition-stategy is recommended:

C:
The first partition on your hard disk should be reserved for hard working wares. The reason for that is this part locates at the center of the disk and accessment time greatly reduces as you go further to the peripheral region.
Unarguably most PCs leave this 'plateau' for Windows to run. Then, our plan for the 1st partition:

system files
space for windows to work properly. The necessary space varies due to RAM and Windows version. Recommended: > (total RAM x 2)
programs that need a lot of interactions with the system, suggested:

- internet browsers
- firewall, denfender, antivirus
- IDEs such as visual studio*
- interpeters, compilers (ActivePerl, C compilers...)
- java virtual machines, .net framework or any of that kind

At this point, the space estimated is 15 GB. 20GB should be fine. ^_^

As for the file system, what should we chose? FAT32 or NTFS. NTFS is well-known for its capability of management, faster and more security. I don't have chance to try, 'cos I need to access data on this windows partition in Linux, and the only way is FAT32. Linux won't regconize NTFS system. (I'm using fedora 6, hope that newer version would help.)

D: for large programs (games...), portable ones, misc..., suggested
- text editors
- Games\...
- java-dependent programs*
- IM programs

(* Eclipse IDE is java-dependent, but I think it should be on system hard disk, for its heavy work)

E: surely for our data: images, ebooks, documents... and million of unamed garbages... ^_^
Be careful, 'cos your data will expands unhauntingly.

As much as possible.

1.2. Linux system: I do not have enough experience yet. ^_^


2. Maintaining system

2.1 Windows sytem

Tuesday, August 5, 2008

Tình ơi

Một câu hát buồn sao thấu được lòng sâu
Mà ta vẫn hát tàn hơi


-------oOo-------












Tình ơi

Quốc Bảo

Người xa mấy rừng xa mấy ngàn vực sâu
Người xa mấy mùa không thấy nhau buồn rầu
Người xa cách người khi cất lời hẹn sai
Người chưa biết khóc mộng bay

Người chưa biết tình đang hát gọi mùa đông
Tình đang hát dài như chút hơi cầm lòng
Là ta nhớ tình ta dấu đi hàm oan
Tình yên ấm nhé đừng tan

Tình yên ấm rồi em sẽ nghe
Tự nhiên khóc oà khi có nhau
Lệ rơi sáng loà không dấu nữa tình đau
Tình đau miễn là em sẽ về
Về ta nối lại tơ tóc xưa
Để khi có tình ta đón đưa
Và em sẽ gần ta chút nữa tình ơi
Vì ta sẽ cần em suốt đời

Gần nhau vẫn là xa cách ngàn lần đau
Một manh áo nhàu ta cố lau giận hờn
Một câu hát buồn sao thấu được lòng sâu
Mà ta vẫn hát tàn hơi

Mà em vẫn chờ vẫn chờ mùa đông
Mà ta vẫn còn thao thức chong đèn ngồi
Vì em sẽ về cho ngỡ ngàng rồi đi
Mùa theo gót ấy mùa ơi...