With the first run, command updatedb creates database of all files stored on your hardisk(s) (indexing all files). More informations you can get after:
man updatedbUsing of this command is independent of your desktop environment (kde, gnome. lxde). Suitable tip is you can simply redirect results of searching files to another file e.g.:
locate *.jpg > /home/USER/Desktop/my_jpg