Sunday, October 29, 2006

3D Desktops on Linux

Do you have any experience with 3D desktop. It's very nice and it makes new path to new generation.
visit following sites to get news about that

good articale here
http://www.atomicmpc.com.au/article.asp?SCID=22&CIID=35615

good manual pages here <<>>
http://www.gentoo-wiki.com/XGL

download from soruceforge
http://prdownloads.sourceforge.net/desk3d/3ddesktop-0.2.9.tar.gz?download

Sunday, October 22, 2006

Openwebmail configuration

You can see configuration file here http://openwebmail.org/openwebmail/doc/readme.txt


REQUIREMENT
-----------
Apache web server with cgi enabled
Perl 5.005 or above

CGI.pm-3.05.tar.gz (required)
MIME-Base64-3.01.tar.gz (required)
libnet-1.19.tar.gz (required)
Digest-1.08.tar.gz (required)
Digest-MD5-2.33.tar.gz (required)
Text-Iconv-1.2.tar.gz (required)
libiconv-1.9.1.tar.gz (required if system doesn't support iconv)

CGI-SpeedyCGI-2.22.tar.gz (optional but highly recommended, for persistent running)
Compress-Zlib-1.33.tar.gz (optional, for HTTP compression)
ispell-3.1.20.tar.gz (optional, for spellcheck)
Quota-1.4.10.tar.gz (optional, for unixfs quota support)
Authen-PAM-0.14.tar.gz (optional, for auth_pam support)
openssl-0.9.7d.tar.gz (optional, for pop3 over SSL support,
required only if system doesn't support libssl)
Net_SSLeay.pm-1.25.tar.gz (optional, for pop3 over SSL support)
IO-Socket-SSL-0.96.tar.gz (optional, for pop3 over SSL support)
clamav-0.70.tar.gz (optional, for viruscheck,
available at http://www.clamav.net)
Mail-SpamAssassin-3.02.tar.gz (optional, for spamcheck,
available at http://www.spamassassin.org)
antiword-0.35.tar.gz (optional, for msword preview)
ImageMagick-5.5.3.tar.gz (optional, for thumbnail support in webdisk)
tnef-1.2.3.1.tar.gz (optional, tnef is used mostly by mails from MS Outlook and Exchange)
wget-1.9.1.tar.gz (optional, for URL uploading support in webdisk & msg composing)
lsof_4.73A.freebsd.tar.bz2 (optional, for openwebmail-tool --unlock)


for debian users:
openwebmail can download and install using apt-get put following tag in your /etc/ap/source.list file

#OpenWebmail
deb http://people.debian.org/~srua/openwebmail/sarge ./

Thursday, October 19, 2006

Linux Introducing Program

I started new FOSS program in our university(University of Peradeniya). As the first step it follows Linux OS introducing for new Linux users. Today there were 30 students. I hope in next week there will be more than that (Including other faculties). In next step we will distributing GNU/Linux OS and Sinhala Linux Hand Book which was created by PDN-LUG.

UNIX/LINUX User's disk size calculating

I have created user's disk size eliminating script. Using this I could find out bad disk usages of users. Just copy paste into perl script, and run it on terminal. (perl script_name.pl)
#!/usr/bin/perl
#Created by :
# Nipuna Perera (nipunap at ceit dot pdn dot ac dot lk)
#
format top=
+-------------+----------------+-------------+----------+
| | |Disk | |
|Username(UID)| Home directory |Space(Mb) |Security |
+-------------+----------------+-------------+----------+
.
format STDOUT=
@<<<<<<<<<<<< @<<<<<<<<<<<<<< @>>>>>>>>>>>> @<<<<<<<<<< $uname, $home_dir, $disk, $warn +-------------+----------------+-------------+----------+ . open(PASSWD, "/etc/passwd") || die "Can n't open passwd: $!\n"; USER: while(){ chop; ($uname,$pass,$uid,$gid,$junk,$home_dir,$junk) = split(/:/); if ($uname eq "root" || $uname eq "nobody" || substr($uname,0,2) eq "uu" || ($uid <= 100 && $uid >0)){
next USER;
}
$warn = ($uid ==0 && $uname ne "root") ? "** UID=0" : "";
$warn = ($pass ne "!" && $pass ne "*") ? "** CK PASS" : $warn;

$uname .= " ($uid)";

if (-d $home_dir && $home_dir ne "/"){
$du = `du -s -m $home_dir`; chop($du);
($disk, $junk) = split(/\t/,$du); $disk .= " M";
}else{
$disk = $home_dir eq "/" ? "skipped" : "deleted";
}
write;
}
exit;

If this is not working , you can use simple shell command to get disk space of each user.
du -scm /home/*
This will provide the output in mega bytes (MB), if you use 'k' rather using 'm' as a parameter, output will be in kilobytes KB (use man du for more information)
Samba user's file removing Script

Today i have created shell script for remove user's *.mp3 *.dat *.mpeg etc. files from server.

here it is..

#!/bin/bash #this script was written by Nipuna Perera
#mail : nipunap@ceit.pdn.ac.lk
#removing file extentions should be added here using spaces=> varFiles

varFiles="*.avi *.wav *.exe *.mpeg *.mp3 *.mpg *.dat *.dat *.wmv "

#Files contaning directories should be added here

varDIR="/export /export1 /export2 /export3" for i in $varFiles
do

echo "-------------------------------------------"
echo "Finding and removing $i files in $varDIR "
echo"--------------------------------------------"
$i find $varDIR -name "$i" -print -exec rm -rf {} \; >> del_files1

done

after modifying this script, you also can use this.