For the wireless projection You will need miraclecast to cast your screen over using the wireless display technology. To install miracle cast in Ubuntu via PPA:
sudo add-apt-repository ppa:thopiekar/miraclecast
sudo apt update
sudo apt install miraclecast ubuntu-restricted-extras check
If the apt update
fails, it might be because currently, this ppa has no Releases file. With current versions of apt, this blocks the apt update
because the ppa is not secure enough. To sidestep this, we can disable this check for this repo. This is an insecure thing to do. Bad actors with access to the PPA could publish malicious code there without having access to the release file signing key. Try at your own risk:
sudo vim /etc/apt/sources.list.d/thopiekar-ubuntu-miraclecast-disco.list
To the first line of this file, add the [allow-insecure=yes]
part:
deb [allow-insecure=yes] http://ppa.launchpad.net/thopiekar/miraclecast/ubuntu disco main
Save the file, try the steps above again, from 'sudo apt update'.
To start casting
Shutdown wpa_supplicant
and NetworkManager:
sudo killall wpa_supplicant && sudo service network-manager stop
Launch wifi daemon:
sudo miracle-wifid &
Now run miraclecast as a peer (peer is your device that is casting its screen to the TV):
Launch wifi control:
sudo miracle-wifictl
this should give you the miraclecast CLI and a link number. select the link with select link
Enable wifi-direct visibility on the other device (if possible)
From the CLI locate the TV using:
p2p-scan
you get something like
12:34:ab:cd:45:43.
ie the mac address
Then from the CLI initiate connection:
connect <mac addr> [pin]
the pin could be the pin of the tv
Also look at the answers to How can i connect ubuntu 17.10 to my LG Smart TV
The miraclecast project page is also here on GitHub.