If your computer is connected to a local network (LAN) and want to chat with other connected users on Ubuntu, I recommend that you use Iptux which is an IP messenger client that runs under Linux.
Iptux is configured to auto detect clients connected to your local network via a router. It also allows to send messages to other clients as well as sending and sharing files with them. Iptux only runs on LAN, not configured to work online.
The advantage of using this software is that you have nothing to configure, everything works automatically. To install it on Ubuntu, launch the terminal and issue this command:
sudo apt-get install iptux
To start it, open Applications > Internet > iptux.
Iptux will auto detect users connected to your local network. To chat with a user, double-click its IP address.
To send files on LAN, open File >> Attach File.