openSUSE 11.2 (KDE) desktop screen shots

openSUSE 11.2 is out now and is rich of new softwares, latest builds and damn faster. I would like to share my desktop screen shots for 11.2 which i installed yesterday. I am writing a review and installation article, will publish it later.

OS: openSUSE 11.2 64bit with KDE4.3.1

snapshot1

snapshot2

Enjoy your day!

Delete cron mails

There are many ways to delete cron mails and empty the inbox which is filled by cron job every time it runs. Some time we are running multiple scripts/files every minute. So cron send mail for that specific user to inform about the cron task and the mail, if there is any thing to output, it will be in the mail.

But some time we don’t want any mails created by cron to send. Its because we know our scripts are running fine.

I am going to mention three methods here.

Method-1: Running a simple command in terminal,

1- Open terminal and became any user, you want to delete mails from his/her inbox.

2- This way will clear all the inbox.

3- Write the following command in terminal now:

cat /dev/null >/var/mail/username

Change username in above.

Method-2: Running a bash script in terminal,

1- Open any of your text editor and write the following code in it:

#!/bin/sh

echo ‘d *’ | mail -N

exit 0

2- Save it as any file name you want, i would save it cron.sh.

3- Now run it in terminal like this:

sh /var/www/cron.sh

Remember to give correct path in the above line.

Method-3: Another way is to delete one by one, but that will be pain in the neck if you have hundreds or thousands of mails in the inbox. But if you want to delete a specific message so you can do it like this way, 1st enter to the user mail directory for example:

cd /var/mail/username

Path and username can be changed according to user and distribution.

d 1 2 6 10

The above line will delete messages 1,2,6,10 respectively by using the ‘mail’ command.

Hope it would help.

Call to undefined function imap_open() on a dedicated server

To make IMAP working with PHP we need to install these modules, install these from synaptic package manager.

  • php-imap
  • php-cli

Now in case IMAP is not working, create a file named info.php and put this:

<?php phpinfo(); ?>

Run it in the browser and search for imap.ini in ‘additional .ini files parsed‘ if it is not there, so it means that PHP is not listening to IMAP module, so we need to enable/use extension for imap. At the mean time search php.ini for imap. If this is there:

extension = imap.so

Just leave it there as uncomment, and now open your fav text editor and write that above line in it, save the above file as imap.ini and now upload it to this directory: /etc/php5/conf.d and restart the server:

/etc/init.d/apache2 restart

One thing more to note is in info.php to see whether which conf file is loaded by apache, look for this line:

/etc/php5/apache2/php.ini

Now refresh the info.php in the browser and you will see that this line is there in front of “additional .ini files parsed“.

/etc/php5/apache2/conf.d/imap.ini

And that’s it, you are done.

Points to note: The above solution is for the following error. (Mostly running it in cron will throw this error, but if you run your script in browser it will work fine).

Fatal error: Call to undefined function imap_open() in…

This is work around for Ubuntu OS. You can try the similar steps on another distro.

Welcome to anl4u.com

Welcome to ANL4U.com.

As i discussed about this in my personal blog, that i am in hunt for a good domain name. After a long time, searching here and there i came to conclude that why not just stick with my trademark “anl4u” and buy a domain referring to this name. Its because the domain names in which i was interested were already taken, so there was no option with me to move forward. But at the end, i managed to use my trademark. And now here we are for anl4u.com.

So i welcome all to my new website. As i can’t go for two blogs at the same time on one domain, so i will manage this main blog for Personal and Programming and as well as Linux. Its not about that hosting package not allowing me to create/host more blogs, but this is just about time and again time spent on this blog. Its because now i have to edit/add/view/analyze everything here by myself, while in Blogger we can post/edit but the rest of the stuff will be handled by Google for you. I will not take much of your time in this welcome post. But i hope, we will be in touch in this blog.

So to clarify more, i will update my blogger blogs very rarely and that updates will directly synced from this website, we can say as a refer link to this site for further reading of the contents. So all the contents will be available here in this blog from now…

Last words:

Welcome again and thanks for the support in the previous blogs, and now lets keep in touch through this site.

You can find my OLD blogs links at the top of this site in the menu.

Have a good day and time.

Regards

Admin of anl4u.com