Internet e la battaglia del mediterraneo

luglio 22, 2009 Lascia un commento

Internet e la battaglia del mediterraneo

Annunci
Categorie:Internet

Ubuntu Jaunty on HP EliteBook 8530p – All Issues Solved!

giugno 17, 2009 Lascia un commento

All the issues described in my previous post about Ubuntu Jaunty (64 bit) upgrade have been solved! Yeppa!

  1. ATI Video CardWORKS. The ATI Catalyst driver 9.6 and 9.5 work fine. You can read more about it here. Download the source of the driver from the ATI site  and follow the instructions for building the Debian packages. With the 9.5 driver it was mandatory to use “aticonfig –acpi-services=off” (read about it here). While waiting the release of the new ATI driver I’ve successfully configured the radeonhd driver 1.2.5 from this PPA and following the instructions from x.org here. You will have to rebuild the drm module for the current kernel (beware of kernel updates). Unfortunately the OpenSource driver does not support 3D acceleration yet.
  2. Garbaged Printing with some black squares. It seems an issue of foomatic-db-engine. I think that there isn’t an official fix for this, currenty there is only a workaround here (see comment #84 from Till Kamppeter). Download the pdftops filter and replace your current /usr/lib/cups/filter/pdftops from the cups packaage.
  3. Battery duration. Now the uptime on battery is back to more than 3 hours like on 8.10. The problem is that the radeonhd driver is not able to optimize the ATI card for battery duration like the fglrx does. With the radeonhd driver there the Thermal Zone 2 always between 55 and 62 degrees (look at it with “acpi -t”), while with the fglrx driver it stays at 44-45. The strange thing is that even without X running the video card is heating, I suppose a BIOS issue.

So now I can enjoy all the Jaunty wonders! 🙂 New notifications, faster boot and shutdown, a reliable suspend/resume.

((enjoy))

Upgrading from Ubuntu 8.10 to 9.04 on my HP EliteBook 8530p

maggio 6, 2009 1 commento

Here is a report of my upgrade from Ubuntu 8.10 to 9.04 on my HP EliteBook 8530p (model number FU617AW).

The upgrade process went smooth in almost 1 hour of time. There were about 1200 packages to upgrade for about 900MB of download.

Here is a quick report about problems encountered after reboot:

  1. ATI Video Card NOT WORKING. The laptop has an ATI HD 3650 (R600 chipset). The fglrx ATI driver is not working with the latest x.org version 1.6 provided by Jaunty. At this time this is not yet resolved, I’ve filed a but on the ATI site. The bad thing is that the fglrx driver makes my machine crash, I get a black screen of death when X fires up. I’m sure that there is a Kernel Panic but I was not able to catch any info (I’ve no console on serial…).The only work around for now is to use the free ATI driver provided by xorg, even if with this type of video card 3D acceleration is not working. So the performance compared to 8.10 are really worse for the moment.
  2. Trackerd Corrupted Index. After logging in, I got several pop-up message from tracker about “Tracker Index Corrupted”. This is a know bug (see Bug #346912 for example) and the only workaround is to remove the contents of ~/.cache/tracker and of ~./.local/share/tracker/data and to restart trackerd. It will re-build all the indexes and will work fine.
  3. Garbaged Printing with some black squares. There is some problem in ghostscript or foomatiq filtering which leads to have some letters substituted with black squares. This is a known problem (see Bug #361772) and I did not get a solution yet.
  4. Reduced Battery life. I’ve the impression that the battery duration is significantly less compared to 8.10. When switching to battery (from fully charged), the estimated duration dropped to about 2 hours from 3 hours with 8.10. I still have to investigate the reason.

So, if you are in doubt about upgrading or not, be warned of these problems. I will try to update this post whenever I’ll get the solutions.

((enjoy))

Jast Another (VMware) Backup Script (JABS) public release

aprile 14, 2009 Lascia un commento

I finally convinced my friend Toccio to release JABS in the public. JABS, Jast Another Backup Script,  is a very handy backup script for VMware ESX and VI3 (I’ve not yet tested on 3i, dunno if it will work).

I’ve worked for severals years with VMBK from Max Daneri, but Max is not developing his script any more, and it has been written before the VCB era (in the old ESX 1.x and 2.x funny days :-)).

I’ve also tried another good script, VISBU, from Alex Mittell, but setting up different backup sessions was not so simple as with JABS.

JABS is a Bash script to schedule  backups of Virtual Machines, mainly to be exported to NAS folder. The nice feature of Jabs is that you can define different”sessions” in the configuration files, using for example some pattern of the “display name” of the VM, and JABS will prepare all the necessary vcb* commands for you, sending a nice email report.

You can find more on Jabs here on Toixland.

((enjoy))

SVN LDAP Authentication on Apache

aprile 14, 2009 Lascia un commento

Thanks to this link I’ve successfully implemented the LDAP Authentication against a Microsoft Active Directory LDAP for Subversion Access via Apache2.

Thanks to the power and flexibility of Apache the configuration is really straightforward.

Install and configure Apache to serve the URL of the repository you want, for example https://svn.mydomain.com/ (SSL is preferable to clear text http).

Enable the DAV modules and the authnz_ldap extension.

Create an account in your AD to get access to the Directory (in this example ldap.svn). Create a Group in your AD (in this example SVNAllowed) where place the SVN-enabled users.

Add to the configuration of the Virtual Host this block:

<Location "/">
LDAP Auth
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "My SVN Repository"
AuthLDAPURL "ldap://dc.mycompany.com:389/DC=mycompany,DC=com?sAMAccountName?sub?(objectClass=*)" NONE
AuthLDAPBindDN "ldap.svn@mycompany.com"
AuthLDAPBindPassword XXXXXXXXXXXXXXXXXX
require valid-user
</Location>


<Location /svn>
DAV svn
SVNParentPath /svn
SVNListParentPath On


# Check if the user is in this LDAP Group:
require ldap-group CN=SVNAllowed,CN=Users,DC=mycompany,DC=com
</Location>

And you are done!

Now every access to https://svn.mycompany.com/ will be authenticated against the AD backend. Access to https://svn.mycompany.com/svn/YourProject will be accessible only by the users in the group SVNAllowed.

You can also define fine-grained access to some repository (not included in this example).

Beware that Apache’ mod_ldap will cache the user credentials for a default value of 600 seconds. See the manual page of the module for more options.

((enjoy))

Ubuntu 8.10 on HP EliteBook 8530p

febbraio 24, 2009 2 commenti

Back to posting some useful stuff with my new PC, an HP EliteBook 8530p (model number FU617AW).

Ubuntu 8.10 64 bit is working like a charm on it.

My configuration is the following:

  1. Intel(R) Core(TM)2 Duo CPU     T9400  @ 2.53GHz
  2. 4 GB of DDR2 RAM
  3. 250GB SATA HDD at 7200 RPM (the model from hdparm -i is ST9250421AS)
  4. Screen 15.4” WXGA & WSXGA+ Widescreen
  5. ATI Mobility Radeon HD 3650
  6. Ethernet, 802.11abgn. Bluetooth

The only small quirks are the following:

– in the BIOS you *MUST*  switch off “Fan Always on while on AC Power”, otherwise the kernel will not boot. Upgrade to the latest firmware version F.06.

– to make work Skype I followed this excellent guide. The configuration of the Sound Device is: Sound in=HDA Intel, Sound Out=pulse,Ringing=pulse

– VMware Workstation 6.5 64 bit works very fine, be sure to invoke “vmware-modconfig –console –install-all” if you upgrade the kernel. Besides, put this line “xkeymap.nokeycodeMap = true” in your ~/.vmware/config file to make work the keyboard inside the VM in Windows XP.

– if you experience annoying Video flickering while playing videos with Totem or VLC, run “gstreamer-properties” from a shell, and in the Video Tab select  ‘X Window System (No Xv)’ for the Default Output Plugin, click Test and all should be well.

I’ll update this post for any relevant news.

((enjoy))

Smart and Simple Mail to SMS Gateway

agosto 4, 2008 Lascia un commento

This is a simple guide for configuring a simple (but smart :-)) Mail to SMS gateway. It is based on the FOX BOX platform for sending out SMS. You will need a Linux server with the Postfix MTA configured. Besides, you will need at least the following additional packages:

  1. mimedecode
  2. lynx
  3. URLENCODE.sh shell script by Heiner Steven ( heiner.steven@odn.de) to perform TEXT to URL encoding transforms
  4. formail which is part of the procmail package

This e-mail address is being protected from spam bots, you need JavaScript enabled to view it You will be able to send an email to an address like smsto+YOURNUMBER@smsgw.yourdomain.com and it will be automagically converted as an SMS containing the sender e-mail and the subject. This implementation is partially derived from this article.

The destination number must be in the form CCNNNMMMMMMM, with the country code (CC) explicit.

Configure your mail system in order to deliver mail for the smsgw.yourdomain.com through the Postfix box (dedicated server, virtual domain, what ever you prefer).

On the Postfix server make sure that it is configured to use procmail as MDA and that you have the recipient_delimiter defined like this (in /etc/postfix/main.cf):

mailbox_command = procmail -a "$EXTENSION"
recipient_delimiter = +

Next create a normal Unix account named “smsto”. Next configure procmail for this account with the following recipe:

PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail      # You'd better make sure it exists
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/log.`date +%y-%m-%d`
LOCKFILE=$HOME/.lockmail
VERBOSE=yes

SMSDEST=$1

:0
{
        :0 c
        | formail -c -X From: -X Subject: | \
             mimedecode | $HOME/bin/convert2sms.sh $SMSDEST

        :0
        received
}

Next prepare the following Bash script in $HOME/bin of the smsto user:

#!/bin/bash

# for debugging
# set -x

if [ $# -ne 1 ]; then
        echo "$0: Please specify the destination phone number (39XXXYYYYYYY)"
        exit 1
fi

# Path to urlencode.sh script
URLENCODE=$HOME/bin/urlencode.sh
# Path to Lynx
LYNX=/usr/bin/lynx
# Where we save the output read from Formail
TEMPFILE=/tmp/smsto.$$
# Clean up when done
trap "/bin/rm -f $TEMPFILE" 0 1 2 3 15

# TODO: check the right pattern of the number
PHONE=$1

while read line; do
        echo "${line}" >> $TEMPFILE
done

# In $TEMPFILE we expect something like this:
# From: some1@somewhere.org
# Subject: the mail subject

# With tr we strip the " char (bug in FOX BOX UI)
# With cut we trim down the size of the field
# We want to stay in the 160 char limit of SMS messages
FROMLINE=`grep -i ^From: $TEMPFILE | tr -d '42' | cut -b -40`
SUBJLINE=`grep -i ^Subject: $TEMPFILE | tr -d '42' | cut -b -117`

logger -i -t SMSTO "$FROMLINE"
logger -i -t SMSTO "$SUBJLINE"

MESSAGE=`echo $FROMLINE \| $SUBJLINE | $URLENCODE`

logger -i -t SMSTO "$MESSAGE"

# Prepare the URL
SENDURL='http://srv-sms/source/send_sms.php?username=Admin&pwd=PASSWORD\
&from=smsgw@yourdomain.com&nphone='$PHONE'&testo='$MESSAGE

CMDS=`$LYNX -dump $SENDURL >/dev/null`

exit 0

Substitute your SMS BOX Admin password in the SENDURL variable. It is still rudimentary since some sanity checks are missing, but it works for me. YMMV.

((enjoy))