Kali Linux – Fix E: Unable to locate package Error and install XRDP

So, having installed a new instance of Kali Linux I decided that i wanted to setup XRDP, TightVNC was not functioning how I wanted so it seemed to be a logical option
When attempting to install XRDP i received the following error
E: Unable to locate Package
This error is because the entries in the source.list are either not present or they are not present. In order to put this right we need to open the source.list file with the following command
$ sudo nano sources.list
We then need to paste the following sources into the file
so it should look something like this
1 2 3 4 5 6 7 8 9 10 11 |
deb http://http.kali.org/kali kali-rolling main contrib non-free # For source package access, uncomment the following line # deb-src http://http.kali.org/kali kali-rolling main contrib non-free deb http://http.kali.org/kali sana main non-free contrib deb http://security.kali.org/kali-security sana/updates main contrib non-free # For source package access, uncomment the following line # deb-src http://http.kali.org/kali sana main non-free contrib # deb-src http://security.kali.org/kali-security sana/updates main contrib non-free deb http://old.kali.org/kali moto main non-free contrib # For source package access, uncomment the following line # deb-src http://old.kali.org/kali moto main non-free contrib |

Now run
$ sudo apt-get update

now we can run the command to install XRDP
$ apt-get install xrdp

Use the command
$ service xrdp start
If you want this service to start aftera reboot then make sure the following command is issued
$ update-rc.d xrdp enable