How to Troubleshoot ap-hotspot

Fig: ap-hotspot error
Figure describes the error faced while accessing the ap-hotspot. the red color marked "Another process is already running"  is the error.

sudo rm /tmp/
This deletes the process id that is causing the error display.
In order to see which process is running 
 ps -ef | grep ap-hotspot 
It is necessary to keep in mind that whenever you update your system or install the new operating system this updates the version  ap-hotspot  package as well so you should mark hold the hotspot package  i.e.
                    sudo apt-mark hold hostapd


I tried a lot to enable hotspot through the GUI of Network Manager but it never happened. It created a hotspot but always the created hotspot didn't even appear in my android phone. Sometimes it is a problem in Ubuntu14.04. Same user interface worked for enabling hotspot in 13.10.Here are the steps that will guide you to enable hotspot and connect with other devices.You need to add a repository online, so make sure that you are using internet 
[email protected]:~$ sudo add-apt-repository ppa:nilarimogard/webupd8 Update the whole list of repositories 
[email protected]:~$sudo apt-get update                                        Adding the repository  adds ap-hotspot to the list, Now install ap-hotspot
[email protected]:~$sudo apt-get install ap-hotspot                         ap-hotspot is now installed. Better open,configure  and start the hotspot service
[email protected]:~$sudo ap-hotspot
[email protected]:~$sudo ap-hotspot configure
[email protected]:~$ sudo ap-hotspot start

After HOTSPOT is created

In case you want to see the devices that are connected to your hotspot use this command
[email protected]:~$ arp -a
I tried it in 14.04, give it a try in other distributions, hope it works. Enjoy the Linux Tips.Keep sharing with us , at the end idea of Linux is all about sharing and learning.