Finally, I got it to work. It works fine without any problem in the root session. In the normal user session it does work but some times X manager (GDM here) does not finish startup. I have to reboot my system several times to get it to work. Here is what I did:
1- I deleted hal from all /etc/rcXd folders (hal is hahdeled by dbus/event.d).
2- I added dhcdbd and wpa_ifupdown to /etc/rcXd folders.
Here is what I got in the .xsession-errors file:
(process:2581): Gtk-WARNING **: This process is currently running setuid or setgid.
This is not a supported use of GTK+. You must create a helper
program instead. For further details, see:
http://www.gtk.org/setuid.html
Refusing to initialize GTK+.
(process:2585): Gtk-WARNING **: This process is currently running setuid or setgid.
This is not a supported use of GTK+. You must create a helper
program instead. For further details, see:
http://www.gtk.org/setuid.html
Refusing to initialize GTK+.
/etc/gdm/Xsession: Beginning session setup...
can't lock memory: Cannot allocate memoryWARNING: not using secure memory for passwords
SESSION_MANAGER=local/Box:/tmp/.ICE-unix/257