On the Net

|Main Blog|Yearning|  

Words of God


About Linux News and OpenSource




and below are my posts....


Tuesday, June 27, 2006

Enabling the display of username and icons on kdm login - Mandriva 2005 & 2006

The default login screen for 2005LE and 2006 does not show user icons, and there appears to be no way to change this from the control center.

This is because there is a theme attached to the KDM login manager by default, which hides the icon display.

If you wish to re-enable it, you will need to edit file /etc/kde/kdm/kdmrc as root, and change the value for UseTheme from true to false.

On logging out of your KDE session, you should see a scrollable list of users with their icons.

You can add your own pictures to the list of available icons by placing them into directory /usr/share/mdk/faces. You will need root access to modify this directory, though.

originally posted by Sellis here

It actually takes me several hours on finding how to do it. Its hard to do accurate search if the keyword is not that accurate, so to be easily remember, added it here.


PEACE!

Thursday, June 22, 2006

Customizing error messages on my squid proxy

OK, my goal is to customize the error message that will appear once a request to the proxy server had been denied due to ACL.

On the entries inside the /etc/squid/squid.conf, thus that contains the ACL, an additional entry should be added. See example below.


##############
acl pornsites dstdomain -i "/etc/squid/blacklists/porn/domains"
deny_info ERR_PORNO pornsites
http_access deny pornsites
##############


Where pornosites is the name of the ACL and ERR_PORNO is the name of the customized error page. How? the ERR_PORNO file should be located inside the folder that contains all the default error pages of squid proxy, which is at /etc/squid/errors/ folder, well, I don't know with other system, but the one I am using is Centos 4.3 and squid was installed via yum.

Actually, I just copied the existing ERR_ACCESS_DENIED to ERR_PORNO and modified its content so that the message that will appear when a user tries to access a controled site contains messages that will fit to how the user should see it.

Another thing to consider, the default time generated by squid on its default error page has been set to GMT, so as you can see, the time looks like that below


Generated Thu, 22 Jun 2006 08:55:10 GMT


which does not correspond to the correct time, especially on the country I am located. So on the customized error page, I added the following entries on the last line of the file to correct that:

the line that contains Generated %t by %h (%s) controls the time and date, by default is uses %T which is for GMT so it was changed to small letter "t" and after doing that, this is how it looks:


Generated 22/Jun/2006:17:00:29 +0800


It is now displaying the local time of the Squid Proxy Server.

Remember that squid should be restarted for those changes to take effect.