Catatan – Catatan Penting Sehari-hari

Another excellent Edublogs.org blog

Install PVM

September 1st, 2006 by catatanpenting in Uncategorized · 2 Comments

PVM version 3.4:  Parallel Virtual Machine System
University of Tennessee, Knoxville TN.
Oak Ridge National Laboratory, Oak Ridge TN.
Emory University, Atlanta GA.
Authors:  J. J. Dongarra, G. E. Fagg, G. A. Geist,
J. A. Kohl, R. J. Manchek, P. Mucci,
P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
(C) 1997 All Rights Reserved

NOTICE

Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted
provided that the above copyright notice appear in all copies and
that both the copyright notice and this permission notice appear in
supporting documentation.

Neither the Institutions (Emory University, Oak Ridge National
Laboratory, and University of Tennessee) nor the Authors make any
representations about the suitability of this software for any
purpose.  This software is provided “as is” without express or
implied warranty.

PVM version 3 was funded in part by the U.S. Department of Energy,
the National Science Foundation and the State of Tennessee.

________________________________________________________________________

WHAT IS PVM?

PVM is a software system that enables a collection of heterogeneous
computers to be used as a coherent and flexible concurrent computational
resource, or a “parallel virtual machine”.

The individual computers may be shared- or local-memory multiprocessors,
vector supercomputers, specialized graphics engines, or scalar
workstations and PCs, that may be interconnected by a variety of
networks, such as Ethernet or FDDI.

PVM consists of a run-time environment and library for message-passing,
task and resource management, and fault notification.  While PVM will
not automatically make a commerical software package run faster, it
*does* provide a powerful set of functions for manually parallelizing
an existing source program, or for writing new parallel / distributed
programs.

The PVM software must be specifically installed on every machine that
is to be used in your “virtual machine”.  There is no “automatic”
installation of executables onto remote machines in PVM, although
simply copying the pvm3/lib and pvm3/bin directories to another
*similar* machine (and setting $PVM_ROOT and $PVM_ARCH – see below)
is sufficient for running PVM programs.  Compiling or building PVM
programs requires the full PVM installation.

User programs written in C, C++ or Fortran can access PVM through
provided library routines.

________________________________________________________________________

UNPACKING

This distribution contains source code, some simple examples, and
run-time support for PVM version 3.  The documentation for PVM can
be obtained separately from Netlib.  To get a list of available
subsets, send e-mail to “netlib@ORNL.GOV” with the subject:
“send index from pvm3″.

The files in the source distribution unpack into a “pvm3″ directory.
The pvm3 directory can reside in either a private or shared disk area.
Installations for multiple machine architectures can coexist in the
same shared filesystem because compiled files are placed in different
subdirectories named for each architecture ($PVM_ARCH).

Some of the more important directories are:

Directory   Contains
—————————————————————
bin/$PVM_ARCH/  PVM user program executables (examples & your programs)
conf/           Make configuration files for all PVM architectures
console/        Source for the pvm console
doc/            Miscellaneous documentation
examples/       Example PVM programs source files
gexamples/      More example PVM programs – for group library
hoster/         An example “hoster” program
include/        Header files for PVM programs
lib/            Generic system executables (scripts, rc file stubs)
lib/$PVM_ARCH/  System executables (pvmd, console, etc.)
libfpvm/        Source for the libfpvm Fortran library
man/man[13]/    Online manual pages (nroff format)
misc/           Some miscellaneous PVM examples and utilities
patches/        Patch files and instructions, as they are released
pvmgs/          Source for the libgpvm library and group nameserver
rm/             An example resource manager for PVM
shmd/           A special daemon for shared memory systems (*MP)
src/            Source for the libpvm library and pvmd daemon
src/$PVM_ARCH/  Additional source code for specific machines
tasker/         An example “tasker” program for PVM
tracer/         An example “tracer” program for PVM
xep/            An example interactive X-Window program

BUILDING AND INSTALLING

To build the full PVM software, you will need to have a “make” utility,
a C or C++ compiler, and a Fortran compiler installed on your system.

Before building or running PVM, you must set the environment variable
“PVM_ROOT” to the path where PVM resides, i.e. the path of the
directory with this “Readme” file.  This can be in a private area,
for example $HOME/pvm3, or a public one, such as /usr/local/pvm3.

If your shell is csh, add a line such as:

setenv PVM_ROOT $HOME/pvm3

to your .cshrc file.  If you use a shell that reads .profile, such as sh
or ksh, or .bashrc for bash, add the following lines to that file:

PVM_ROOT=$HOME/pvm3
export PVM_ROOT

The use of this variable and others is explained more fully in the
pvm_intro man page.

You can also include an appropriate shell startup file stub to set
other PVM environment variables and to add PVM directories to your
execution path.  Inert the matching stub file, pvm3/lib/cshrc.stub,
pvm3/lib/kshrc.stub or pvm3/lib/bashrc.stub, after your declaration
of PVM_ROOT in your shell startup file.

To build PVM for your system, type “make” in this directory.  Make
will use the “aimk” in the pvm3/lib directory to build the daemon
executable (pvmd3), the C library (libpvm3.a), the Fortran library
(libfpvm3.a) and the console client program (pvm).

The libraries and executables are installed in $PVM_ROOT/lib/$PVM_ARCH,
where $PVM_ARCH is the host architecture name, e.g. “CRAY” or “LINUX”.

If you have problems compiling PVM on your system, check the
architecture-specific configuration file:

$PVM_ROOT/conf/$PVM_ARCH.def

for comments regarding alternative configurations for your system.

The provided scripts $PVM_ROOT/lib/pvm and $PVM_ROOT/lib/pvmd are
used to start the PVM console and the PVM daemon, respectively.
They determine the machine architecture and run the actual programs
in the $PVM_ROOT/lib/$PVM_ARCH directory.  You can either copy these
scripts to your bin directory or add $PVM_ROOT/lib to your shell
search path (using the above *.stub files).

You may wish to add $PVM_ROOT/man to your MANPATH environment variable,
if it’s supported on your system.  This will allow you to easily read
the online manual pages.

ALTERNATIVES TO RSH

To use “ssh” instead of “rsh” on your system, you can either:

1. Modify the $PVM_ROOT/conf/$PVM_ARCH.def file to change the absolute
path specified for RSHCOMMAND in the ARCHCFLAGS define.  Replace the
path to rsh with the absolute path to “ssh” on your system and then
recompile PVM and your applications.  Or,

2. Set the “PVM_RSH” environment variable to point to the absolute
path to “ssh” on your system.  This does not require re-compilation
but must be done in every shell from which PVM is executed.  The
“PVM_RSH” environment variable can be set in your $HOME/.cshrc or
equivalent shell startup file to take affect in all new shells.

Once either of these approaches has been applied, the $HOME/.rhosts
file is then no longer necessary for PVM, thereby eliminating a
fundamental security concern.  Now, to add PVM hosts (using ssh),
you can either manually enter your password each time you add a
host, or else you can set up an ssh-agent session.  (You can always
just use a $HOME/.shosts file, but then you’re not much more secure
than with standard rsh…)

When manually entering your password, you will not receive a prompt
from PVM or ssh – the text prompts normally returned by ssh are
automatically captured and written to the local /tmp/pvml. log
file.  However, simply typing your password from inside the “pvm”
console or when running the “pvmd” script will work.

You can bypass this manual password entry for a given session by
executing the following commands (example is for bash, could use
for any shell):

$ ssh-agent bash
$ ssh-add

$ pvm
$ pvm> add host2 . . .

For this to work, you must have run “ssh-keygen” on each host to
create a private/public key pair for your login id.  These keys are
typically stored in the $HOME/.ssh directory on each system.  The
$HOME/.ssh/identity.pub public key must be copied to each remote
host and added as a line in the $HOME/.ssh/authorized_keys file
on the remote system.  When this has been set up, any PVM hosts
can be added without password or passphrase entry using the above
ssh-agent session.

STARTING AND STOPPING PVM

To start PVM, run $PVM_ROOT/lib/pvm.  This starts the console task,
which in turn starts a pvmd if one is not already running.  More hosts
can be started and added to your “virtual machine” by using the console
“add” command.

To start the pvmd without starting the console, you can also run the
$PVM_ROOT/lib/pvmd directly.  A number of hosts can all be started at
once by supplying the pvmd with a host file, as in:

$PVM_ROOT/lib/pvmd my_hosts

where “my_hosts” contains the names of the hosts you wish to add,
one host per line.  See the pvmd man page for other host file
options.

To stop PVM, use the PVM console command “halt”.  From within your
user programs, you can use the pvm_halt() function.  You can also
kill the pvmd3 process (always use a catchable signal such as
SIGTERM).  But, if you do kill the pvmd, or if it fails for some
other reason, always be sure to remove any leftover /tmp/pvmd.
pvmd socket files, where is your numerical user id.  These
files will make PVM think a pvmd is running, and can cause the
dreaded “Can’t Start Pvmd” message.

For more information about the console commands, see the console “help”
function or the console man page.

TROUBLESHOOTING

If you ever have trouble starting PVM or adding a new host to your
virtual machine, verify that there are no leftover /tmp/pvmd.
daemon socket files on the machines where you are trying to start
PVM (as described above) and then check the local /tmp/pvml.
log file for any error messages which may help you to determine
the problem.

A common problem is caused by restricted access to a remote machine
via “rsh”.  PVM uses “rsh” to start the pvmd on a remote host.  If
you cannot do this:

% rsh remote_host ‘echo $PVM_ROOT’

and successfully get back the correct value of $PVM_ROOT on that
remote host, without typing your password, then that is the problem.
You will need to set up permissions on the remote host to allow rsh
access without a password.  On Unix systems, this is accomplished
by creating a $HOME/.rhosts file on the *remote* machine that
provides access to your *local* machine.  (Note: the $HOME/.rhosts
file is *NOT* a PVM host file…)  The format of a $HOME/.rhosts
file is as follows:

your_host_1  your_login_on_host_1
your_host_2  your_login_on_host_2
your_host_3  your_login_on_host_3
. . .

If you get really stuck, try checking the online FAQ off of the
PVM Home Page:

http://www.netlib.org/pvm3/book/node23.html#SECTION00450000000000000000

Master Host IP Address is Loopback!
———————————–

*** If you see “Master Host IP Address is Loopback!” or get the
PvmIPLoopback error when adding hosts, this means that the networking
on your Master PVM host (the one you initially started PVM on) is
not set up correctly for networking to multiple, remote hosts in
your virtual machine.  By default, especially on many Linux systems,
your system’s host name alias is appended to the 127.0.0.1 loopback,
or localhost, IP address in the /etc/hosts file.  This is very useful
for PCs running in stand-alone mode without networking, however this
alias must be removed for interaction with remote hosts in PVM.
The bottom line is that you need to assign a “real” IP address to
your machine’s host name in /etc/hosts.

By default, most Linux systems create an entry like this:

127.0.0.1       localhost.localdomain localhost foo

where “foo” is your system’s host name.

The problem here is that PVM uses the host name “foo” to look up the
IP address for your system, so PVM gets the localhost “loopback” IP
address (127.0.0.1) by mistake.

You need to create a separate line in /etc/hosts that associates your
host name with its externally recognized IP address:

127.0.0.1       localhost.localdomain localhost
123.45.67.89    foo.your.domain foo

Make sure that you remove any references to your host name / alias
from the 127.0.0.1 line, or else put the new hard-coded IP address
line *before* the localhost line in /etc/hosts…

If you don’t want to manually change your /etc/hosts file in this way,
then please see the Linux Networking HOWTO for information on
automatically handling this scenario (via ifup-local and ifdown-local
scripts).

Also keep in mind that you can start PVM using the ‘-n’ flag to select
a specific host name & corresponding IP address, as in:

$ pvm -nfoo

Note that there is no space between the ‘-n’ and your desired host name.

Clusters with Internal and External Networks
——————————————–

If you have a cluster system with an internal network that can’t
be seen from outside the cluster, then you may have problems adding
cluster nodes to a virtual machine that was started on the head
cluster node.

The problem is likely related to a mixing of your cluster’s internal
versus external networking setup.  Your front-end head cluster node
likely has *two* IP addresses, one for the external network, and
one for the internal network.  This is a common scenario where the
front-end node that can see both the external network and also
the internal cluster network, but the internal cluster nodes cannot
see the external network.

When you start PVM on the master node, by default it uses the system
host name to look up the network interface and corresponding IP address
(using gethostbyname()).  In most cases, this will be the IP address
for the externally visible network interface.

So, when you try to add an internal cluster node from the master,
PVM will initiate the connection using this external IP address,
which the cluster node can’t see from inside its private, internal
network.  Then PVM will in fact double-check the source IP address
of incoming message packets at the internal cluster nodes, and if
the IP’s don’t match, it drops the packets (for security reasons).
Therefore, the replies from the cluster nodes’ PVM daemons will
never reach the master PVM daemon.

The solution is to start PVM using the *internal* network interface
(and corresponding IP address) on the master node, so that the internal
cluster nodes will correctly recognize the front-end node’s IP address
and network packets.  This can be accomplished using the ‘-n’ argument
to the “pvm” console, as in:

pvm -nfoo

where “foo” is the master’s host name on the internal network.

(Note: there is no space between the ‘-n’ and the ‘foo’… :-)

Clearly, for this to work, your front-end master cluster node must
have 2 entries in its /etc/hosts file, one mapping the external IP
address to some externally recognized host name, and there must be
another line with the internal network IP address and a distinct
internal network host name.

You should be aware that running PVM on the master node using the
internal network interface, to enable the internal cluster nodes
to see the master, precludes adding hosts from the external network
to your virtual machine.  The master node does *not* act as a gateway
between the internal and external networks in PVM.

Instead, if you really need to include nodes on an external network
in the same PVM virtual machine with your cluster nodes, then you
should use the BEOLIN port of PVM, which uses a single PVM daemon
on the master node and treats the cluster as one computational
resource.  (See the pvm3/Readme.Beolin file for information and
usage.)

Hope this helps!

Linux / GCC Warnings
——————–

In Linux, with the latest version of gcc, if you get the warning:

“the use of `tmpnam’ is dangerous, better use `mkstemp’”

from gcc, you may safely ignore it.  PVM cannot use the mkstemp()
function to create a temporary file for binding to its sockets,
as the mkstemp() function actually opens the given file & returns
a file pointer.  The mktemp() function (without the “s”) could be
used in place of tmpnam(), but this function *also* produces the
same gcc warning.  It’s all quite annoying really, as tmpnam()
works just fine for our purposes…  Hrmph.

APPLICATION PROGRAMS

C, C++ and Fortran programs must be linked with the main PVM library,
$PVM_ROOT/lib/$PVM_ARCH/libpvm3.a, and Fortran programs must also be
linked with the $PVM_ROOT/lib/$PVM_ARCH/libfpvm3.a library file.
User program source files should include the $PVM_ROOT/include/pvm3.h
header file for C/C++ programs, to define PVM constants and function
prototypes.  The corresponding Fortran header file is
$PVM_ROOT/include/fpvm3.h.

Executables should be installed in $PVM_ROOT/bin/$PVM_ARCH for a
user installation (where the $PVM_ROOT directory is somewhere in a
user-writable area), and in $HOME/pvm3/bin/$PVM_ARCH for a system-wide
PVM installation (such as /usr/local/pvm3, where the user may not be
able to write to the $PVM_ROOT/bin/$PVM_ARCH directory).  The default
execution path can be changed; see the “ep=” option on the pvmd man
page.

When user programs are spawned by PVM, by default they execute in the
$HOME directory of the user.  Any input or data files should therefore
reside in or be linked to $HOME.  This default working directory
can be changed; see the “wd=” option on the pvmd man page.

CONTACT

The PVM web home page is at

http://www.csm.ornl.gov/pvm/pvm_home.html .

A newsgroup, comp.parallel.pvm, exists for discussions about PVM
and help with specific problems.

Please direct any e-mail (questions, bugs, bug fixes, etc.) to:

pvm@msr.CSM.ORNL.GOV.

To report bugs or problems with PVM, please see the file

$PVM_ROOT/doc/bugreport .

________________________________________________________________________

Sincerely,
The PVM research group

→ 2 Comments

lupa password root di mysql

August 31st, 2006 by catatanpenting in Uncategorized · No Comments

Jangan kuatir kalau lupa password di mysql karena ada caranya.Caranya sbb:

1. Shutdown dulu mysql server anda.

jika di linux redhat lakukan perintah sbb:

# kill ‘cat /mysql-data-directory/hostname.pid’

ganti mysql-data-direktory dengan data yang sebenarnya. Jika di redhat ada di /var/run/mysqld/mysqld.pid

2. Restart kembali server mysql anda kembali dengan syntax.

#safe_mysqld –skip-grant-tables &

3. Gunakan perintah mysqladmin untuk mereset password root

#mysqladmin -u root password ‘password yan baru’

4.lakukan refresh password root

#mysqladmin -h hostname flush-privileges

ganti hostname dengan namahost anda

5. shutdown kembali server mysql anda

# mysqladmin -u root -p shutdown

6. Nyalakan kembali server mysql anda

#safe_mysqld &

Cara lainnya (hanya di redhat)

1. Masuk sebagai user root

#su

anda akan ditanya password root

2. shutdown mysql server anda

#/sbin/services  mysqdl stop

3.  ganti password di mysql dengan perintah sbb:

# /usr/bin/safe_mysqld –skip-grant-tables
# mysql -u root
mysql> use mysql;
mysql> update user set Password = PASSWORD(’pass’) where User =’root’;
mysql> flush privileges;
mysql> exit

4. Stop dan jalankan kembali mysql anda

#service mysql stop
#service mysqld start

Semoga membantu

→ No Comments

Ubuntu itu mudah

August 18th, 2006 by catatanpenting in Note · 4 Comments

Artikel di bawah ini adalah hasil search diinternet ketika baru saja melakukan instalasi ubuntu linux (dapper).

=========

Prepraring Ubuntu for Everyday Use
28 tips to make Ubuntu 6.06 LTS perfect
by Keir Thomas
source : http://www.beginningubuntu.com/dapper_tips.html

=========================================================
For those who have been waiting for the Linux desktop revolution, well, I’m pleased to tell you it’s here and knocking on your door. It’s called Ubuntu 6.06 LTS.

Below are over 25 tips that will let you tweak and personalize the latest Ubuntu release so that it’s perfect. Think of it as polishing the diamond.

In the tips I explain some simple stuff, such as replacing that gloomy wallpaper with something prettier, to more essential stuff, such as enabling all the Ubuntu software repositories so that you get the fullest choice of software. You’ll also learn how to configure proprietary 3D graphics drivers.

Most of the tips are taken from my book, Beginning Ubuntu Linux. Go buy it! Now! OK, that’s the blatant advert done with ;)

Tips for using the tips:

Editing config files: When I ask you to edit a config file using sudo, it’s probably best to type the following at the command prompt: sudo gedit config_filename, replacing config_filename with the name of the file I mention. Then make the edits.

Entering commands: If I ask you to enter commands, or open a shell, you’ll need to open a terminal window. To do this, click Applications -> Accessories -> Terminal.

—————————————————-

Installation won’t work on my computer!
These tips are useless if you can’t even install Ubuntu. This release of Ubuntu comes with a fancy but brilliant new graphical installer that makes life easier for everyone. This seems to work fine for most people but there are almost certainly going to be incompatibilities for a minority. If you find it just won’t work, switch back to the old text-mode installer. To do this, you’ll have to download a different ISO image and burn it to CD-ROM.

Visit http://releases.ubuntu.com/6.06/ and download the Alternate Install CD. Then boot from it and install.

Use ndiswrapper to get wifi working
My notebook has a Broadcom BCM4318 wifi card (according to Ubuntu’s Device Manager; System -> Administration -> Device Manager). Unfortunately Broadcom won’t release open source drivers for this series of devices. Although a driver module has been reverse engineered by some enterprising hackers (bcm43xx), it won’t work with my card. However, Ubuntu installs it in the belief that it will.

So there were two things I had to do:

  1. Stop the bcm43xx driver attaching to the hardware; and
  2. Let ndiswrapper attach to the hardware instead, which it’ll do automatically when setup correctly.

In a nutshell, ndiswrapper lets you install Windows wifi drivers under Linux. You’ll need the relevant .inf and .sys Windows files, which are often found in the Windows driver .zip file. Tracking down these files is outside the scope of this brief article although if you to have a Broadcom 43xx series card, you can download the drivers I used by clicking here (edit: link removed because it was killing my bandwidth; you’ll have to track down the drivers yourself. Try this link).

To stop the bcm43xx module loading at boot-time, add it to the kernel module blacklist. This file is located at /etc/modprobe.d/blacklist. I loaded it into a text editor (use sudo), found a blank line, and added blacklist bcm43xx. Then, to test the setup, I rebooted. Sure enough, the entry for the wifi card had vanished from the Network Settings confiuraton applet. Good. That means no kernel module is associated with the hardware.

The trick following this is to make ndiswrapper associate with the hardware. To do this we need to:

  1. install ndiswrapper configuration tools from the Ubuntu CD;
  2. use ndiswrapper’s configuration tools to install the Windows drivers;
  3. configure networking as usual using the Networking applet, including configuring any WEP protection.

Assuming that you’ve configured the universe and multiverse repositories in Synaptic (see Setting-up Multiverse and Universe Repositories below), search for ndiswrapper-utils and install it.
Then type:

sudo ndiswrapper -i bcmwl5.inf

although you should obviously replace the .inf filename with that of the driver you’re using. Then type :

sudo ndiswrapper -m,

to write the module to Ubuntu’s configuration files.

You should now find a new wifi card entry in the Network Settings dialog (System -> Administration -> Network), and you should be able to configure it as usual.

Setting up multiverse and universe repositories

Ubuntu has two fantastic software repositories available to it by default—Main (aka Officially Supported) and Restricted (aka Restricted Copyright). The former contains software that’s licensed under the GPL (or a compatible) license. The latter contains a small selection of software under prohibitive (usually proprietary) licenses that some Ubuntu users need. Examples include some wifi drivers.

There are two more “official” repositories, however—Universe (aka Community Maintained) and Multiverse (aka non-free). The former contains a ton of software from the Debian archives and the latter is yet more software that’s available under licenses not 100% compatible with the GPL (although that doesn’t necessarily mean it’s proprietary).

Universe and Multiverse aren’t setup by default, and it’s a good idea for you to add them because it gives you the broadest choice of software.

Open Synaptic Package Manager (System -> Administration -> Synaptic Package Manager) and then click Settings -> Repositories within Synaptic. Look for the heading that reads Ubuntu 6.06 LTS (Binary); it should be the first in the list. Select it and click Edit. Then ensure there’s a check in the Community Maintained and Non-Free boxes. Click OK, then Close, and then click the Reload button the main Synaptic program window. You should now have access to the extra repositories.

Adding PLF repository to Synaptic for non-GPL software
Certain items of software aren’t supplied by Ubuntu at all, because to do so is legally or ethically questionable. For example, many Linux users like to install the Windows multimedia codecs so they can play movies in Windows Media or QuickTime format. The system files required to do this are quite literally ripped straight from a Windows installation and packaged for Linux, without any kind of official permission. It is at best a legally grey area.
The Penguin Liberation Front is, as its website explains, “a team that builds litigious packages (packages that are patent encumbered or proprietary)”. This means they host a software repository that can be used with Synaptic and that contains software such as the Windows multimedia codecs, Skype’s proprietary VoIP software, RealPlayer, and much more.
Adding the PLF repository to Synaptic is easy. Start Synaptic and click Settings -> Repositories. Then click the Add button, and then the Custom button in the dialog that appears. In the “APT line” box, type the following:

deb http://packages.freecontrib.org/ubuntu/plf/ dapper free non-free

Once done, click Add Channel, then Close, and then the Reload button on the main Synaptic program window.
Here are some of the packages offered by the PLF that I installed—just use Synaptic’s Search function to track them down:

Package name Description

w32codecs

The Windows mutlimedia codecs that will add Windows Media Player, QuickTime etc support to Linux (see below for details of extra steps needed to configure multimedia)

libdvdcss2

DeCSS software to allow DVD movie playback under Linux

realplay

RealPlayer (note this is also offered in the Ubuntu repository; the PLF version is better because installation is fully automated)

skype Skype VoIP software

For the full list of packages, see the bottom of the following webpage: http://doc.ubuntu-fr.org/doc/plf.

Making multimedia playback work properly

Ubuntu comes configured for multimedia playback and offers the Totem application for the purpose. However, as good as this is, it’s a better idea to use Mplayer, a more mature product. Installing the packages listed below will install all the multimedia codecs you need and also install Mplayer to work with them. It will also add the Mplayer Firefox plugin so that online video will play fine.

See the step above about adding the PLF repository and the universe/multiverse repositories to Synaptic. Once this is done, search for and install the following packages using Synaptic:

w32codecs
mplayer
mozilla-mplayer
libdvdcss2

Once these are installed, multimedia playback of practically all types of video files should work within Mplayer (Applications -> Sound & Video -> Mplayer) and also within Firefox. To configure automatic playback of video files in Mplayer when you double-click them, right-click any video file and select Properties. Then click the Open With tab and ensure the radio button alongside Mplayer in the list. Then click Close. Note that you’ll need to do this for all types of movie file you want to play automatically within Mplayer: .avi, .divx, .mov, and so on.

Use proprietary 3D drivers

OK, here’s the deal. Open source drivers for your 3D card are provided “out of the box”. No further work is needed and they’re installed by default.
The problem is that these only provide 2D. For optimized 3D graphics (to use the flashy XGL desktop, or to play 3D games), you’re going to need the proprietary drivers. “Proprietary” in this case means closed source. That’s bad. On behalf of the open source community, I ask that you only install these drivers if you absolutely have to. Otherwise just stick with the open source drivers, which will do all you need and are a LOT more stable than the proprietary drivers (you’ll probably kill your Hibernate/Suspend feature by installing the proprietary drivers, for example).
Better still, write to Nvidia or ATI and ask them to release fully open source drivers.
ATI cards:

Open Synaptic and search for xorg-driver-fglrx and fglrx-control. Install both. When installation has finished, open a command-prompt and type sudo aticonfig –initial (note there are two dashes before initial). Reboot your machine.

Nvidia cards:

Open Synaptic and search for and install nvidia-glx. When installation has finished, open a shell window and type sudo nvidia-xconfig. Then reboot.

Test your new 3D configuration, after reboot, by selecting one of the OpenGL screensavers (System -> Preferences -> Screensavers). AntSpotlight is pretty cool. If it runs smoothly then everything has worked.

Installing Flash Player

Ensure you’ve setup Synaptic Package Manager to use the universe and multiverse repositories. Then search for flashplugin-nonfree. There will be an additional confirmation step after download but then Flash should work fine within Firefox. You will have to restart Firefox for it to work after installation.

Turning off touchpad tap-click
My notebook touchpad interprets a tap on the touchpad as a mouse click. This drives me mad. I find it means I misclick accidentally an awful lot. To turn of “tap-to-click”, so that only the left mouse button can be used to click, open the following file in a text editor (using sudo): /etc/X11/xorg.conf. Look for the section headed Section “InputDevice”, below which will be “Driver “synaptics”. Anywhere before the EndSection line beneath, add the line Option “MaxTapTime” “0″. Save the file and then restart X (close all open programs and then Ctrl+Alt+Backspace; if X doesn’t restart, login at the command prompt and type

sudo /etc/init.d/gdm restart).

Turning off Firefox touchpad back and forward
For some reason, Firefox interprets the horizontal “scroll” feature of my notebook’s touchpad as virtual clicks of the Back or Forward browser buttons, so that I find myself accidentally moving back and forward in my browsing history. To configure the horizontal scroll of the touchpad to actually horizontally scroll a webpage, open Firefox, type about:config in the address box, and use that page’s “Filter” text box to search for mousewheel.horizscroll.withnokey.action. Double-click the line in the results and set the value to 1, rather than 2. The change will be instant and permanent.

Setup a Windows partition for permanent access
My Windows XP partition wasn’t automatically made available under Ubuntu. The solution was the following: type sudo mkdir /windows at the command prompt. Type sudo fdisk -l and look for the line that ends HPFS/NTFS, and then look at the beginning of the line and write down what’s there (ie /dev/hda1). Then load the following file in a text editor using sudo: /etc/fstab. Add a new line at the end of the file that reads:

/dev/hda1 /windows ntfs nls=utf8,umask=0222 0 0

Replace the /dev/hda1 part with what you wrote down earlier. Save the file and then type sudo mount /windows to make your Windows partition available immediately (browse to /windows to see the contents). You’ll find it available all the time, even after you reboot. Remember: the Windows NTFS partition is read only. You can’t write files there.

Add Windows fonts
My notebook dual-boots between Linux and Windows and I like to add all my Windows fonts to my Ubuntu setup, so that certain web pages look like they should and also so Word docs from colleagues read OK.
To install the fonts, follow the step above to make your Windows partition available if it isn’t already. Type the following at the command prompt to open the Windows font directory in Nautilus: nautilus /windows/WINDOWS/Fonts/ (this assumes that your Windows partition is mounted in /windows, as described in the tip above). Click View -> View As List, and then click the Type heading so that the files are arranged via file extension. Scroll down to the TTF files and select all of them (click the first, hold down Shift and then click the last). Then right-click one of the selected files and click Copy, so that they’re copied ready for pasting somewhere else. Click Go -> Location and, in the box, type fonts://. In the new file listing that appears, right-click a blank spot and select Paste. Your Windows fonts should now be available to all Ubuntu applications, including OpenOffice.org.

Switch Gedit font from large to readable
For some reason the Gedit text editor is configured by default to use a large font that makes reading any kind of text file difficult. To change the font, click Edit -> Preferences, click the Fonts & Colors tab, and then choose a new font in the Editor Font dropdown list. Alternatively click Use Default Theme Font, which will switch the font to Sans.

Use a different font with GNOME terminal
Click Edit -> Profiles, click Default in the list, and click the Edit button. Remove the check in the Use The System Terminal Font box and select a different font by clicking the dropdown list.

Make the Wastebin and Computer icons appear on the desktop
Ubuntu encourages a clean desktop policy that makes the desktop look superb at first glance, but just doesn’t work for me. I want my Trash icon on the desktop, and an icon for my Home directory too. To bring this about, open a command-prompt and type gconf-editor. In the folder view on the left of the window, navigate to apps/nautilus/desktop. On the right of the program window, ensure there are checks in the trash_icon_visible, home_icon_visible and computer_icon_visible boxes. Take a look at your desktop and the results should be instant.

Get rid of the gloomy wallpaper
Ubuntu’s wallpaper is designed to reflect a humanist metaphor. Although I appreciate the thought that went into it, I’m afraid to say I don’t like it. It’s the visual equivalent of a headache. There are two alternatives provided but both are fairly dark and, well, gloomy. To get the officially prescribed GNOME wallpaper, that features some neat nature-based images with nice bright colors, type the following into your browser:

http://ftp.gnome.org/pub/GNOME/desktop/2.14/2.14.1/sources/gnome-backgrounds-2.14.0.tar.bz2.

Download the file and then double-click to open it in File Roller. Click the Extract button. Click the Extract In Folder dropdown list and click Other. Navigate to your /home folder, click the Create Folder button, and type .wallpaper. This will create a hidden folder in your /home directory. Then click the Open button, and then the Extract button in the parent window. Close File Roller, right-click a blank spot on the desktop, select Change Desktop Background, and click the Add Wallpaper button. In the file listing on the right of the dialog, right-click in a blank spot, and select Open Location. Type .wallpaper. Then delve into the folders to choose the wallpaper you want. My favorite, and one that causes people who see my desktop to comment positively, is GreenMeadow. It’s in the nature folder.

Configure power saving so that it works
My notebook will hibernate pretty well but won’t suspend without crashing. So to configure the notebook to hibernate when it’s not been used for a while, or when I close the screen, I used the System -> Preferences -> Power Management applet. Click the dropdown list next to When Laptop Lid is Closed and make the change, and then click the General tab and select Hibernate in the two entries under the General heading.

Turn off OpenOffice.org’s ugly font rendering
I find OpenOffice.org isn’t too hot when displaying fonts because its uses its own clumsy antialiasing system. In short. to me the fonts look ugly. You might disagree but to turn off font antialiasing only for OpenOffice.org, open any OO.org application and click Tools -> Options, click View in the list on the left, and remove the check from Screen Font Anti-aliasing. Then click the OK button.

Force OpenOffice.org to save Word documents
The sad fact of life is that I work with colleagues who run Windows and Microsoft Office. Therefore I work with Word .doc files nearly all the time. To force OpenOffice.org to automatically save Word files, rather than OpenDocument files, click Tools -> Options in OO.org Writer, click Load/Save on the left of the dialog, and then click the General heading just beneath. On the right of the dialog box, click the Always Save As dropdown list and make a selection. The Microsoft Word 97/2000/XP option is probably best for the broadest compatibility. By clicking the Document Type dropdown list, and selecting Spreadsheet or Presentation, you can also select to save in Excel or PowerPoint formats too by making the relevant choices in the Always Save As dropdown list.
In the long-term, I’m working on converting my colleagues to OpenOffice.org.

Handy applets for notebooks: wifi strength and CPU speed control
I like to see the strength of my wifi connection, and also when any data is being transmitted, so I use the Network Monitor applet. Right-click a blank spot on the taskbar and select Add to Panel. Scroll down the window to the System & Hardware heading and click Network Monitor. Select it and click Add. A new icon should appear near the system tray. The four bars on the right indicate wifi signal strength.
If you’ve got a compatible notebook, such as one containing an AMD chip or an Intel Mobile Pentium 4 chip, you might also be interested in the CPU Frequency Scaling Monitor, under the same heading in the Add to Panel dialog box. However, out of the box this isn’t configured to work properly. To make it work, open a shell and type sudo dpkg-reconfigure gnome-applets. Read and evaluate the warning about security and hit Enter and then agree to install cpufreq-selector with SUID root. Reboot the system. From then on, you can right-click the CPU-freq applet and select the speed you want the chip to run at. The Ubuntu Blog has an excellent write-up about this, which I advise you to read: http://ubuntu.wordpress.com/2005/11/04/enabling-cpu-frequency-scaling/.

Installing Bon Echo (Firefox test release)
Bon Echo is the codename given to the testing release of Firefox 2. It’s extremely quick and, from what I can tell, very stable. It’s worth installing. You’ll find it by clicking the “Bon Echo Alpha 2″ link at the top of the following web page:

http://www.mozillazine.org/talkback.html?article=8406.

Click the relevant link under the “Builds are available for testing” heading on the page that appears next to download the files.
When the file’s downloaded, unpack the archive using the following command (which assumes the file has downloaded to the desktop):

tar zxf ~/Desktop/bonecho-alpha2.tar.gz.

Then move the directory to your home directory and hide it using the following command:

mv firefox ~/.bonecho.

Bon Echo will automatically pick-up on your bookmarks but it won’t pick-up your plugins, like Flash or Totem, so type the following to make the plugins work with Bon Echo:

ln -s /usr/lib/firefox/plugins/* ~/.bonecho/plugins/.

Then, to run Bon Echo whenever you want, create a desktop shortcut: right-click the desktop, select Create Launcher, type Bon Echo in the Name field, and .bonecho/firefox in the Command line. Click the No Icon button and the choose a relevant icon, and then click OK to create the launcher. And then be wowed by the speed of the next-gen Firefox release! (Also Google autocomplete in the search box and spell-checking in text fields on web pages!).

Sound on my weird notebook
My notebook is possibly the most Linux-incompatible machine that’s ever been made. Here’s a tip: Don’t buy an Asus A6R. It’s one of the worst notebooks I’ve ever owned.
Sound didn’t work straight off. The notebook has an IXP SB400 AC’97 Audio Controller, according to Ubuntu’s Device Manager. If you’ve got the same sound card, and want to get it working, you need to do two things.

  1. Double-click the speaker icon in Ubuntu’s system tray and click Edit -> Preferences in the Volume Control window that appears. In the list, look for the Master Surround entry, and put a checkbox in it. Then look for External Amplifier and put a check in it. Click the Close button then click the Switches tab in the Volume Control window. Remove the check against External Amplifier.
  2. Then click the Playback tab and click the Speaker icon beneath the Master Surround slider, so that it’s no longer muted. Then adjust the slider. Playback some audio and you should find everything now works. Basically, the Master Surround slider is now your volume slider. Weird, but true. To make the system tray applet use the Master Surround to control the volume, right-click the system tray speaker icon, select Preferences, and select Master Surround in the list.

MP3s: Install XMMS, the old-school MP3 player

XMMS: XMMS is an old-school Winamp-like MP3 player. I prefer it to the iTunes-like Rhythmbox because it’s smaller and simpler. It can be installed via Synaptic by simply searching for and installing XMMS. To configure MP3s to play automatically within it, right-click any MP3, select Properties, then click the Open With tab. If XMMS isn’t already in the list, click the Add button and find XMMS in the list. Click Add. Then in the Open With dialog box, ensure the radio button next to XMMS Music Player is selected. Then click Close. You can add a Ubuntu-style skin by downloading

http://anka.org/henrik/humanxmms/files/HumanXMMS-latest.tgz.

You can install this by first starting XMMS if you haven’t already (this creates a necessary directory in your /home folder), and then copying the file you downloaded to the hidden .xmms folder:

cp ~/Desktop/HumanXMMS-latest.tgz ~/.xmms/Skins/.

Then right-click on the XMMS title-bar, select Options -> Skins Browser. In the directories box, ensure /home//.xmms/Skins is selected and then select HumanXMMS in the list above.
Rhythmbox:

If you are interested in using Rythmbox for MP3 playback, install the gstreamer0.10-fluendo-mp3 package using Synaptic.

Some useful extra packages to install
None in the list below are installed by default because the Ubuntu team (quite rightly) wanted to keep things simple and not overwhelm the user. All can be installed using Synaptic, however, and all are superb packages. See tip above about enabling the universe/multiverse repositories first:

Package name Description
gftp

Graphical FTP client

firestarter

Firewall configuration tool (actually lets you configure the iptables firewall that’s built into the kernel, but you get the idea)

liferea

RSS feed reader

nvu

WYSIWYG HTML editor (I used it to craft this *cough* beautiful site)

sbackup

Graphical backup tool; lives on System -> Administration menu after install. Look for Simple Backup Configuration and Simple Backup Restore.

Add SSH server component
If you use SSH to remotely connect to your Ubuntu machine, you’ll need to install some extra software. The SSH client and server components and split in Ubuntu, and only the client is installed by default. To add the server component, simply search for and install openssh-server in Synaptic. Configuration and setup is automatic (hey, this is Ubuntu, remember?). This will obviously open a port on your machine that might present a security risk; Ubuntu is otherwise completely closed, which is why the server component isn’t installed by default.

Send/Receive files using Bluetooth
I’ve got a Bluetooth-equipped camera phone and I like to transfer pictures to my PC using Bluetooth. The Ubuntu kernel has Bluetooth support built-in but to transfer files you’ll need to use Synaptic to install an extra package. Ensure that the Universe and Multiverse repositories are setup and then use Synaptic to search for and install the following: gnome-bluetooth.
Receiving files:

Click Applications -> Accessories -> Bluetooth File Sharing. This will start a background system-tray service and will make your computer ready to receive files. Simply use your mobile phone to “detect” the computer and send files.

Sending files:

Slightly more tricky. Right-click the desktop and create a new shortcut. Click Create Launcher. In the Name box, type Bluetooth Send. In the command box, type gnome-obex-send. Click the No Icon button and select a relevant icon from the list. Then click OK to create the shortcut. From now on, whenever you want to send a file to a Bluetooth-enabled device, simply drag and drop it on the new shortcut icon. Following this your phone will be detected (you might have to click the Refresh button) and it should be obvious what to do to send the file.

Use one, rather than two, desktop panels
For some reason Ubuntu likes you to have two screen-hogging panels—one at the top of the screen, and one at the bottom. Some people like this, some hate it.
To quickly combine them into one panel at the bottom (that’s “quickly” as in “quick and dirty”), right-click a blank spot on the top panel and select Add To Panel. In the dialog box that appears, look under the Desktop & Windows heading and select Window List. Then click the Add button and then close. Click and drag the Window List handle to move it closer to the quick-launch icons. Then delete the bottom panel by right-clicking in a blank spot on it, and selecting Delete Panel. Then, to shift the top panel to the bottom of the screen, click and hold in a blank spot and simply drag it to the bottom.

Use a Windows-like Start button
Don’t bite my hand off for this tip! A Start-like button saves a lot of space on the panel. Don’t worry. You’re not cloning the Windows experience. It just makes sense for some people who have smaller screens and don’t want the Applications/Places/System menu.
Right-click the Applications/Places/System menu and click Remove from Panel. Then right-click a blank spot on the panel and select Add to Panel. In the dialog that appears, select Main Menu under the Utilities heading. Then click the Add button, and then Close. You can shift icons around on the panel by right-clicking them and selecting Move (you might have to uncheck Lock to Panel first). Note that, in order to put the new Start-like icon at the very left of the panel, you’ll have to shift the two quick-launch icons out of the way by moving them.

Fine-tune Ubuntu’s font display/rendering
I’m a stickler when it comes font rendering and have to tweak, tweak, tweak until I’m happy. Ubuntu has two possible font-rendering modes: using bytecode hinting, which it refers to as “Native” rendering, and using auto-hinting. In addition, you can turn sub-pixel rendering on and off. I think turning it off makes the fonts look cleaner.
To configure all of this, open a command-prompt and type sudo dpkg-reconfigire fontconfig. Then work through the options. Don’t forget that you’ll need to restart the X server to see the results (Ctrl+Alt+Backspace).

→ 4 Comments

Catatan Penting

August 17th, 2006 by catatanpenting in Uncategorized · No Comments

Catatan penting adalah dokumentasi saya ketika mencari dan menemukan sesuatu yang berhubungan dengan aktifitas didepan komputer. Tidak selalu yang saya catat adalah murni hasil pemikiran sendiri namun bisa jadi artikel orang lain yang kemudian saya masukkan dalam blog ini sendiri.

Catatan ini merupakan catatan penting untuk diri sendiri, namun jika berguna bagi oarang lain saya lebih berbahagia.

Malang – Jatim

Arif Rahman

→ No Comments

Hello there!

August 17th, 2006 by catatanpenting in Note · 1 Comment

Welcome to Edublogs.org. This is a default first post so the first thing you will probably want to do is edit or delete it and then you can start blogging!

However you will need your login and password for that so while you are waiting, please feel free to check out some of the latest updated edublogs.org blogs, swing by the edublogs.org forums (a great place to ask if you have any questions or requests!) or just email all your colleagues telling them how wonderful edublogs.org is and that they must get an account :)

Welcome aboard! We hope you have a great blogging experience!

→ 1 Comment