Currently my dhcp-log displays my Raspberry Pi with the name
xbmc-e0cb. Can I change this to a more sensible name?
I did this, adapted from http://forum.stmlabs.com/showthread.php?tid=7180
sudo nano /scripts/nm_util.py
Almost at the bottom of the file, uid is set. Comment out all of the if clause, and change it to
uid = "MyHostname"
With the introduction of systemd (Raspbian Jessie and newer), the prescribed method is finally a single command (reference):
sudo hostnamectl set-hostname <mymachine>
Changes take effect immediately and persist after reboot.