Thursday, July 28, 2005

[GNU/Linux] Enabling DRI

1) Check if DRI is enabled :

# glxinfo | grep OpenGL

DRI is not enabled if you see 'OpenGL Renderer string : Mesa GLX Indirect'



2) How to enable DRI :
Edit /etc/X11/xorg.conf or /etc/X11/XF86Config, and add 'Load "dri"' under 'Module' section

=============
:
Section "Module"
...
Load "dri"
...
EndSection
:
=============

3) Restart X.

Note : If Load "dri" is already in /etc/X11/XF86Config-4 and glxinfo still shows Mesa GLX Indirect as the OpenGL renderer, then most likely there is no hardware 3D acceleration support for your video card.



Ref :
http://libranet.com/support/db/2.8/0377

Monday, July 25, 2005

Tips for buying a Linux-compatible laptop

The Perfect Setup - Fedora Core 4

This is one of my readings today...

"The Perfect Setup - Fedora Core 4".

Maybe I can (and should) try this out later on when I'm free.


Have fun! :)



Ref:
http://www.howtoforge.com/perfect_setup_fedora_core_4

Saturday, July 23, 2005

[GNU/Linux] Slackware? Apt-Get? Kick Start? Extra Packages?

http://www.slack-kickstart.org/

http://software.jaos.org/#slapt-get

http://www.linuxpackages.net/

Thursday, July 21, 2005

BSD for Linux Users

Hey, today I've read another article. 'BSD for Linux Users'
Interesting :-)

"The differences between BSD and Linux aren't just surface things that happened accidentally; they're the result of different philosophical and developmental processes. This is an attempt to explain why and how BSD works, aimed at Linux users. Still something of a work-in-progress, like everything."


Ref:
http://www.over-yonder.net/~fullermd/rants/bsd4linux/bsd4linux1.php

Tuesday, July 19, 2005

MySQL migration: MyISAM to InnoDB

Just checking out my email.

"Click, click.." (clicking my mouse)

Hm.. nothing interesting. Next mail..

"Click, click.."

Hmm..Oh, nothing interesting. Delete..

"Click, click.."

Aha.. newsletter.. let me see what's inside..

"Click, click.."

Hmm..Oh, nothing interesting. Delete..

"Click, click.."

Hmm ..yet another newsletter. Let's see what's inside.

"Click, click.."

Nothing, next.. hmm seems familiar..nothing,next..MySQL migration: MyISAM to InnoDB..nothing, next.. finish. Hmm just another newsletter..delete..

Eh..wait a minute. MySQL? MyISAM? InnoDB? Migrating MyISAM to InnoDB? Ahaa, maybe useful in the future.

Ref:
MySQL migration: MyISAM to InnoDB
http://software.newsforge.com/article.pl?sid=05/07/13/1513211

InnoDB Overview
http://dev.mysql.com/doc/mysql/en/innodb-overview.html

MyISAM Overview
http://dev.mysql.com/doc/mysql/en/myisam-storage-engine.html

Monday, July 18, 2005

[GNU/Linux] Password-less SSH

How to 'ssh' to your account on a remote machine without any password?

This will only work if your are trying to connect FROM a remote machine with a specific ID, FROM a specific local machine with a specific ID.

1) Generate the required key on your 'local' machine. Make sure you do not set any pass phrase when requested. Local machine is where you will be connecting FROM.
This will create your own private and public key (namely 'id_rsa.pub' and 'id_rsa' in directory ~/.ssh).
$ ssh-keygen -t rsa -b 1024

The '-t' switch is to specify algorithm, and the '-b' is used to specify how long the key bits will be. Alternatively:
a) you can use DSA algorithm instead of RSA (this will create id_dsa* instead of id_rsa*)
$ ssh-keygen -t dsa -b 1024

b) 2048 bit key, with any any algorithm of your choosing (in the example below, we use RSA)
$ ssh-keygen -t rsa -b 2048

2) Copy the public key '~/.ssh/id_rsa.pub' (or '~/.ssh/id_dsa.pub' if you use DSA) to your account on the remote machine. Remote machine is the machine you will be 'ssh'ing TO.
E.g:
$ scp ~/.ssh/id_rsa.pub myaccount@123.45.67.89:~/mypublickey

3) After you have manage to copy the key to the remote machine. 'ssh' to that remote machine (yes, it still request for password) and insert/append our public key (file 'mypublickey') into a file on the REMOTE machine, namely '~/.ssh/authorized_keys'. You can remove the file 'mypublickey' if you want :-P
me@localmachine$ ssh myaccount@123.45.67.89
Password:
myaccount@123.45.67.89:$ cat mypublickey >> ~/.ssh/authorized_keys
myaccount@123.45.67.89:$ rm mypublickey

4) Logout from the remote machine. Try re'ssh'ing again to the machine to see the 'password-less' effects ;-)


Note : 'authorized_keys' permission need to be '644'. If not, you are not able to enjoy this 'password-less' stuff. This is true especially if 'authorized_keys' is not valid yet until you appended your public key into it. To overcome this, after step '3', do the following on the remote machine :
$ chmod 644 ~/.ssh/authorized_keys


Have fun! :)

Saturday, July 16, 2005

Dos & don'ts: Linux migration tips for Windows admins

Just to share on with you on what I have read today.
Have fun! :)


Dos & don'ts: Linux migration tips for Windows admins
By Jan Stafford, Editor
14 Jul 2005 | SearchEnterpriseLinux.com



If a Windows administrator looks in a crystal ball, he'll probably see a Linux server entering his data center; that is, if he's not sitting next to a Linux box already.

Windows admins can prepare for that inevitable future by perusing these Linux server migration tips. They were offered in a recent interview by Penguin Computing director of engineering Phil Pokorny.


Don't go into a Linux migration without doing some homework.
Fortunately, it will be easy to find relatively inexpensive study guides, Pokorny said. There's probably more online information about Linux than any other operating system, and there are many books, consultants and training companies available, too.

"Don't go into it blind," Pokorny said. "Take advantage of the resources that are out there. Get your staff trained."

Be open for a different look and feel.
In essence, Windows admins will have to act like they've moved to a foreign country, learning a new language and topography. For example, Pokorny said, in Windows when you want to turn on and off services, there's a little graphical user interface (GUI) that lists all sorts of services by name, and you can click the ones you want on and off. Linux has the identical system, but it has a different name and interface. The key thing in terms of migration is getting the Windows administrator to understand that many of the processes are the same; they just look and are named differently.

Take advantage of the built-in security tools in Linux.
The Linux kernel comes with a very capable firewall built in, and there are free security configuration utilities to help. "You don't have to pay extra to Symantec or Microsoft for firewalls and virus scanning tools," he said.

Use the command line in Linux.
"Linux has a strong heritage of a command-line interface," Pokorny said. For administrators, this has advantages in that those command-line interfaces are frequently very scriptable and easy to use to automate repetitive tasks, such as management and monitoring of the system.

"With Windows, which is focused on graphical interfaces, it can be much more difficult to script those things, so you're more likely to have to use multiple vendors' tools," Pokorny said.

With Linux, it's easy to use the command line and scripting languages to automate tasks. "Windows does have scripting tools, but they frequently get hung up in terms of implementing a completely automated task, because there's no command line or scripting line equivalent for some mouse click or menu click in the graphical application," Pokorny said.


Take advantage of some Linux distributions' GUIs, which can make it easier for first-time users to configure systems.
With Linux, you're not stuck with just the command line. "GUIs are a big strength of enterprise distributions, like Red Hat and SuSE," Pokorny noted.

"What's great about Linux is that you have the option of using the graphical tool, but you can also use the command line interface and the text config files that actually drive the application."

Pokorny advises Windows admins to start with the Linux GUI, and then start exploring command line options. "A Windows administrator might start poking around in the registry and then start to make changes there directly to tweak the system even more specifically for your application and your needs," he said.

Unlike the registry, which doesn't come with any comments, the config files that are referenced in Linux frequently come with descriptions of the parameters and comments on how to use a file.


Don't wipe out Windows and install Linux on a server without checking on hardware driver availability.
Before you wipe out Windows, take an inventory of the hardware on the system to make sure there are Linux drivers for all the pieces of hardware connected to the server.

Back in 2001, driver availability for Linux was a big issue, Pokorny said. For the most part, that gap has been filled today.

"If you have relatively new mainstream hardware, chances are good that there will be a well-tested Linux driver for it," he said. "If you have odd, old or not mainstream hardware, then there may not be a Linux driver for it." Then, you have to decide if you need that hardware or can easily replace it.


Do check out Samba, a free open source program, if you're adding Linux file servers to a Windows server environment for the first time.
"If you're introducing Linux servers into a Windows environment, you should focus on Samba software, which can allow your Linux server to participate directly in your Windows Active Directory domain or Windows NT4 domain," Pokorny said. With Samba, admins can allow users to have single sign-on, share accounts and access Linux servers the same way they access other Windows servers in the network.

"The Samba developers say that they understand Windows file systems protocols better than Microsoft does," Pokorny said. They've had to study how Windows servers work, respond to clients and so on, so they can duplicate that functionality in Samba.

"Going back to my first point, about doing your homework, I'd say that getting a book on Samba is a good place to start," Pokorny concluded.



Ref:
http://searchenterpriselinux.techtarget.com/originalContent/0,289142,sid39_gci1107668,00.html

Wednesday, July 13, 2005

[GNU/Linux] SSH Reverse Tunnel

$ ssh -nNT -R 47474:[fwd-TO-host]:22 user@[fwd-FROM-host]

E.g :
$ ssh -nNT -R 47474:127.0.0.1:22 user@123.45.67.89

If somebody intended to connect to port 47474 on 123.45.67.89,
they will be redirected to port 22 on 123.45.67.89, as if they are connecting from 123.45.67.89:47474 to 123.45.67.89:22

Duh, what the hell I'm talking about..??

Have fun!

Wednesday, July 06, 2005

Code Optimization

Managed to 'google' on 'Code Optimazation'.
You may ask.. "Why do I need all this stuff?"

Simple. I would like to know more how I can produce a much more efficient C/C++ codes, in terms of resource usage (faster CPU execution, less memory usage, etc).

Some of the interesting links which I'd would like to share (and as my futere references too) are as below :

http://www.abarnett.demon.co.uk/tutorial.html
http://www.eventhelix.com/RealtimeMantra/Basics/OptimizingCAndCPPCode.htm

Have fun! :)