Automatic connection to the WiFi network

Hi. I’m using Openbox, and as is detailed in the topic octopkg-updated-316-packages-and-broke-the-desktop, i had put the instruction “sudo -E networkmgr&” on $HOME/.config/openbox/autostart.sh and each time i start the computer it run that instruccion and connect to my wifi automatically. I suppose XFCE must have some file that can run on start the same type of instruction.