To restart the X Window Manager in Ubuntu 13.04, simply execute sudo restart lightdm.
- doing so affectively restarts your windowing session, so you will lose any unsaved changes/data - make necessary saves/backups before restarting X
- if you want to simply restart the Unity interface, Alt + F2 and unity --replace
- if lightdm fails to restart, Ctrl + Alt + F1 and sudo reboot
- Ctrl + Alt + F1 goes into a console mode interface; Ctrl + Alt + F7 to revert back