Where does terminal / OS x pick this up from?

It used to display 'JonLaptop' the name of my laptop, but for some reason it doesnt any longer!
EDIT: To expand a little more.... How does OS X decide what goes there automatically? The reason I'm asking is that I'm using synergy and with OS X seemingly changing the terminal name on random I was always having problems connecting to my mac from my pc.
That was my initial set up and it all worked fine. Over the past couple of weeks i've had to add this as a result of the different names that appear in the terminal screen. Is this normal? Is there anyway for me to get it to stick to one?
Also what's with the .lan and .local bits?

It used to display 'JonLaptop' the name of my laptop, but for some reason it doesnt any longer!
EDIT: To expand a little more.... How does OS X decide what goes there automatically? The reason I'm asking is that I'm using synergy and with OS X seemingly changing the terminal name on random I was always having problems connecting to my mac from my pc.
Code:
section: screens
JonLaptop:
JONBPC:
meta = alt
end
That was my initial set up and it all worked fine. Over the past couple of weeks i've had to add this as a result of the different names that appear in the terminal screen. Is this normal? Is there anyway for me to get it to stick to one?
Code:
section: aliases
JonLaptop:#As set in sharing preference pane
JonLaptop.lan #As set in sharing preference pane
JonLaptop.local #As set in sharing preference pane
Unknown-00-19-e3-37-8b-0c.lan #Macbook mac address
Unknown-00-19-e3-37-8b-0c #As set in sharing preference pane
192.168.1.108 #Static IP on my lan
Jonny #SMB Sharing name
Jonny.lan #SMB Sharing name
end
Also what's with the .lan and .local bits?