Download - pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

Transcript
Page 1: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

ConfigurerouterTheRaspberryPi3(RPi)shouldbeassignedafixedIPaddressintherouter.Afterinstallingosmcforthefirsttime,youshouldconfiguretherouter.26. StartAirPortUtility(locatedintheUtilitiesfolder).TheAirPortUtilitywindowshowacomponent

diagram:

Page 2: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

27. ClickontheAirPortbasestationicontodisplaythepasswordwindow:

28. ClickonEnterPassword,entertheAirPortbasestationpasswordandclickOK:

Page 3: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

29. ClickontheAirPortbasestationicontoseealistofwirelessclients:

30. ClickontheosmcwirelessclienttoseeinformationabouttheRaspberryPi3:

Page 4: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

31. Writedownthehardwareaddress(i.e.MACaddress).ForthisRaspberryPi3,thehardwareaddressisB8:27:EB:1C:77:FA.ThenclickonEdittoviewtheBaseStation:

32. ClickonNetworktoviewtheNetworkpane:

Page 5: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

33. Clickonthe‘+’signintheDHCPReservationssectiontoaddareservationfortheRaspberryPi3:

34. SelectMacAddressforReserveAddressBy.TypeRaspberryPi3intheDescriptionfield.Enterthe

MACaddressyounoted,andassignanIPaddress.(Iused10.0.1.15becauseitwasthenextavailableIPaddressaftertheonesIhadalreadyassignedforotherdevices.)

Page 6: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

35. InpreparationforenablingVPN(VirtualPrivateNetwork)andtoavoidhavingtorunAirPortUtility

again,setupOpenVPNportforwarding,whichusesPort1194.Clickonthe‘+’signinthePortSettingssectionandenterVPNRPifortheDescription,1194inthePublicTCPPortsandPrivateTCPPortsfields,and10.0.1.15inthePrivateIPAddressfields:

Page 7: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

36. ClickSaveandthenUpdate.TherouterwillrestartwiththeRaspberryPi3IPaddressfixed.Quit

AirPortUtility.37. InTerminal,do:

rm ~/.ssh/known_hosts ssh [email protected] Respondyesattheprompttocreateanupdatedknown_hostsfile.Atthepasswordprompttypeosmc.osmcperformsacoupleinitializationstepsbeforedisplayingthecommandlineprompt.TypeexittoleavethesecureshellandreturntotheMac.(Youwillsee“Connectionto10.0.1.15closed”.)

Page 8: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

InstallVNCServer

TheVNCServerallowsyoutoviewandcontroltheosmcGUIfromyourMac.TheVNCServerinstallationdescribedhereisadaptedfromthetutorialathttps://discourse.osmc.tv/t/howto-install-a-vnc-server-on-the-raspberry-pi/1517.(Seealsohttps://github.com/patrikolausson/dispmanx_vnc.)

38. InTerminal,copytheVNCinstallationscript(vncstall.sh,AppendixA)totheRPi:

cd "$HOME/Documents/Raspberry Pi/VNC Server" scp vncinstall.sh [email protected]:~ [Enter password osmc at prompt]

39. LogintotheRPiandinstalltheVNCServer:ssh [email protected] [Enter password osmc at prompt] sudo ./vncinstall.sh [Type Y at any 'Do you want to continue' prompts.] [If password is requested, enter osmc.] CompleteInitialInstallationSteps

40. MakesurethattheRPiisnotconnectedtoaTVviaaHDMIcable.(WhenaccessingtheRPifrom

theMac,thewindowthatisopenedontheMacisapparentlydeterminedbyinformationobtainedovertheHDMIconnectiontotheTVandsoitislargeandtherefreshperformanceispoor.)

41. IntheMacmenubar,selectGo>ConnecttoServer…andintheServerAddressboxenter:vnc://10.0.1.15.Clickonthe'+'tosaveitintheFavoriteServerslist.

Page 9: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

42. ClickConnecttostartVNCanddisplaytheOSMCStartupScreen.(Youmayneedtoenterthepasswordosmc.)

43. UsethekeyboardupanddownarrowkeystoselectEnglish(US).TypeReturnandtheclickYestoconfirmthelanguageselection.

44. NowsetuptheTimezone.SelectAmericaandthenscityinthesametimezoneastheRPi. 45. NowyoucansettheHostname.Justleaveitunchanged.ClickAccept. 46. Nowyoucanenable/disablessh(SecureShell).Itisenabledbydefault.Leaveitunchanged.Click

Accept. 47. NowviewtheSoftwareAgreementandclickContinue. 48. SelectLook + Feel andthenselectClassic.ThiswillchangethescreenstotheConfluencescreen

layoutwhichisthedefaultforKodiandconformstomuchdocumentationobtainableontheinternet.

Page 10: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

Appendix A – VNC Server Installation Script vncinstall.sh #!/bin/bash -v # # For git project, see https://github.com/patrikolausson/dispmanx_vnc # For tutorial, see https://discourse.osmc.tv/t/howto-install-a-vnc-server-on-the-raspberry-pi/1517 # DIR=~osmc cd $DIR # Update system sudo apt-get update sudo apt-get dist-upgrade # Create VNC Server sudo apt-get install build-essential rbp-userland-dev-osmc libvncserver-dev libconfig++-dev unzip sudo wget https://github.com/patrikolausson/dispmanx_vnc/archive/master.zip unzip -o master.zip -d $DIR rm -f master.zip cd dispmanx_vnc-master make chmod +x dispmanx_vncserver sudo mv -f dispmanx_vncserver /usr/bin/ # Create configuration file FILE=/etc/dispmanx_vncserver.conf sudo cat <<-EOF >$FILE relative = false; port = 0; screen = 0; unsafe = false; fullscreen = false; multi-threaded = false; password = "osmc"; frame-rate = 25; downscale = false; EOF # Create VNC service FILE=/etc/systemd/system/dispmanx_vncserver.service sudo cat <<-EOF >$FILE [Unit] Description=VNC Server

Page 11: pmj 12/18/16 12:13 PM Draft - OSMC Forums...pmj 12/18/16 12:13 PM Draft 35. In preparation for enabling VPN (Virtual Private Network) and to avoid having to run AirPort Utility again,

pmj12/18/1612:13PM Draft

After=network-online.target mediacenter.service Requires=mediacenter.service [Service] Restart=on-failure RestartSec=30 Nice=15 User=root Group=root Type=simple ExecStartPre=/sbin/modprobe evdev ExecStart=/usr/bin/dispmanx_vncserver KillMode=process [Install] WantedBy=multi-user.target EOF # Start VNC Server sudo systemctl daemon-reload sudo systemctl start dispmanx_vncserver.service sudo systemctl enable dispmanx_vncserver.service # Clean up cd $DIR rm -Rf dispmanx_vnc-master rm -f vncinstall.sh