Linux


A Linux-based movie player GeeXboX has released a new version on July 1, 2007…GeeXboX 1.1

It is a free embedded Linux distribution which aims to give you an option to turn old Pentium-class x86 computer into a Home Teather PC (HTPC). It is a standalone Live-CD based distribution.

I built my customize ISO with additional packages like Real Audio and Real Video codecs. Select your preferred settings and ready to click the “Compile!” button to generate your own customize ISO. Awesome, :D

At last, the dreams has come true…the final version of Dreamlinux 2.2 Multimedia GL Edition has released on Jun 29, 2007. Dreamlinux is a Linux distribution based on Debian and Morphix. It uses lightweight Xfce as its default desktop manager.

Give Dreamlinux 2.2 Multimedia GL Edition a try. It comes with a variety of fantastics software likes OpenOffice, GimpShop, Inkscape, Blender 3D, Gxine, Mplayer, Kino DV, AviDemux, Brasero, Audacity, Firefox, Evince, Gnomebaker, Gtkpod, Xmms, Abiword, Gnumeric, Gview, Beryl and AIGLX.

Please visit Dreamlinux website.

If you want to relay your Sendmail at your ISP mail relay server which need SMTP authentication, you may follow the steps below: -

1. Find the DS in /etc/mail/sendmail.cf and change it as below: -

DSmail.example.com

2. Put the following line in /etc/mail/access file in one line: -

AuthInfo:mail.example.com "U:user@example.com" "I:user@example.com" "P:password" "R:example.com" "M:LOGIN PLAIN"

3. Then, restart your Sendmail service as below: -

service sendmail restart

4. Finally, you can monitor your maillog using the command below: -

tail -f /var/log/maillog

Note: The above was tested on Sendmail 8.13.5-3 in Fedora Core 5

By default, Sendmail will reject or bounce any incoming email addressed to users who doesn’t exist as real users or as aliases in the system. If you wish to setup Sendmail to accept all incoming email and redirect it to a recycle bin, you may follow the steps below: -

1. Backup your /etc/mail/sendmail.mc and /etc/mail/sendmail.cf

2. Add the following line at the end of this /etc/mail/sendmail.mc file: -

define(`LUSER_RELAY', `local:nosuchuser')dnl

3. Then, you must run the m4 as below: -

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

4. Add the following line in /etc/aliases file: -

nosuchuser:    /dev/null

5. Finally, run the newaliases as below: -

newaliases

Yesterday, I bumped into this website system76 and found out that they are giving out free ‘powered by Ubuntu’ stickers.

Show your Ubuntu pride!!! Get FREE strip of four ‘powered by Ubuntu’ stickers from this link below: -

http://system76.com/index.php/cPath/53_64

Hurry up…before they are out of stock. I am going to send them a snail mail, :D

To list open program listening port as well as what program is running and the connection, run the following command: -

lsof -i :22

Output of the command: -

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sshd 1468 root 3u IPv4 1626 TCP *:ssh (LISTEN)
sshd 1900 root 4u IPv4 487285 TCP 192.168.1.1:ssh->192.168.1.2:2986 (ESTABLISHED)

To list all open program listening port, run the following command: -

lsof | grep LISTEN

Output of the command: -

sshd 2071 root 3u IPv6 6511 TCP *:ssh (LISTEN)
sendmail 2111 root 4u IPv4 6671 TCP localhost.localdomain:smtp (LISTEN)

While reading on some blogger’s blog, found this cool tips and tricks, it is pretty interesting. Thumbs up to geek00L :)

It is very useful for copying a large file. This command below will show you the copy progress and it will not see it with a cp command.

rsync --progress -v SRC DST

Below is a first example: -

[root@localhost root]# rsync --progress -v someimage.img.gz /tmp
someimage.img.gz
63780138 100% 53.23MB/s 0:00:01
wrote 63788015 bytes read 36 bytes 42525367.33 bytes/sec
total size is 63780138 speedup is 1.00

If you would like more stats, below is a second example: -

[root@localhost root]# rsync --progress --stats -v someimage.img.gz /tmp
someimage.img.gz
63780138 100% 77.74MB/s 0:00:00
rsync[1579] (server receiver) heap statistics:
arena: 135168 (bytes from sbrk)
ordblks: 1 (chunks not in use)
smblks: 0
hblks: 0 (chunks from mmap)
hblkhd: 0 (bytes from mmap)
usmblks: 0
fsmblks: 0
uordblks: 41624 (bytes used)
fordblks: 93544 (bytes free)
keepcost: 93544 (bytes in releasable chunk)
rsync[1577] (sender) heap statistics:
arena: 135168 (bytes from sbrk)
ordblks: 2 (chunks not in use)
smblks: 2
hblks: 0 (chunks from mmap)
hblkhd: 0 (bytes from mmap)
usmblks: 0
fsmblks: 80
uordblks: 37520 (bytes used)
fordblks: 97648 (bytes free)
keepcost: 93552 (bytes in releasable chunk)

Number of files: 1
Number of files transferred: 1
Total file size: 63780138 bytes
Total transferred file size: 63780138 bytes
Literal data: 63780138 bytes
Matched data: 0 bytes
File list size: 41
Total bytes written: 63788015
Total bytes read: 36

wrote 63788015 bytes read 36 bytes 42525367.33 bytes/sec
total size is 63780138 speedup is 1.00

Yesterday, I learned this tips and tricks from my colleague Danesh (or Danny). Thank you. His blog The Danesh Project

You can duplicate a current SSH session without login again…this is awesome and fast, :)

You need to add the following 2 lines below into your /etc/ssh/ssh_config file: -

ControlMaster auto
ControlPath ~/.ssh/socket-%r@%h:%p

You need to login into a remote SSH server for the first time, the SSH session will create a socket file at ~/.ssh folder indicating a login name, host and port.

ssh root@remotehost

Below is the SSH session socket file created: -

socket-root@remotehost:22

After that, you can duplicate the SSH session by just executing a same SSH command you did for the first login and this time there is no password prompt. You will login into the remote host directly.

This tips and tricks only works on OpenSSH 4.0 above. I had tried it on RHEL 3 (not working), RHEL 4 (not working) and CentOS 5 (working).