#Windows10 – How to Install Connect app (yes, somehow is not part of my Windows 10 installation)

Buy Me A Coffee

Hi!

I’ve been using the Connect App for several years. It’s super useful when you need to share your Android screen to your Windows device, or any other device sharing screen scenario.

However, today I realized that I don’t have my Connect app installed in my Windows 10

no connect app

I don’t know why, maybe one of the Insider Builds remove the App, or any other crazy ideas. Moving on, I put my focus to figure out how to install this app. I really need it!

There is not much information about how to install this, but I found that I had the [Projecting to this PC] feature in Windows 10. Which was disabled for me.

windows 10 settings projecting to this pc

Now it’s time to add this, in the Optional Features section in Settings.

Browsing the optional features, I found [Wireless Display]. That should be the one:

windows 10 add wireless display feature to w10

Warning, after the install time, is also REBOOT time! Windows being Windows.

windows 10 installing wireless display

And, now I had the connect App up and running to rock some Hololens demos

windows 10 connect app as new app

Happy coding!

Greetings @ Toronto

El Bruno

References

#Teams – How to add your custom background (not official and at your own risk!)

Buy Me A Coffee

Hi !

If you are a Microsoft Teams user, you are probably happy. We are getting the amazing feature which allows us to change our background. The feature uses AI to detect our body and head, and change everything else by a custom background. So cool !

However, in the current release of the feature, you can only choose between a set of +15 backgrounds. I mean, some of them are very cool, but I want my own. I want to have something like this.

this is fine teams background

Again, this is not official, but still is fun to try. Let’s go with the steps.

  • 1st open a explorer and access to the path
 %AppData%\Microsoft\Teams\Backgrounds\Uploads folder

In my Windows 10 computer this is

C:\Users\bruno\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads
  • In that location, paste your desired custom background. I haven’t tested formats and images, but a small (less than 1MB) JPG image seems to work fine.
  • Now it’s time to work in Microsoft Teams
  • Once you are in a meeting, access to the options, and then select [Show background effects]
teams meetings options
  • At this time, you will see your custom image / background and you can start to use it!

So, I’m guessing that the [upload your custom background] will be available soon. In the meantime, you got the hack!

Happy coding!

Greetings

El Bruno

#RaspberryPi – How to solve the SSH warning: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Buy Me A Coffee

Hi !

When you test and play around with your Raspberry Pi, you may need to format again your Raspbian SD Card, and then start everything from scratch. This is a trivial process, and is usual to setup the device to connect automatically to a Wifi network and also enable SSH (I wrote about this, see references).

And then, when you try to connect via SSH you may get this warning

 C:\Users\bruno> ssh pi@192.168.1.247
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256: Not here ! 
Please contact your system administrator.
Add correct host key in C:\\Users\\bruno/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\bruno/.ssh/known_hosts:10
ECDSA host key for 192.168.1.247 has changed and you have requested strict checking.
Host key verification failed.

This is a very common scenario, and because I forgot how to fix it, I’ll write the simple command remove all keys belonging to the IP / hostname from the known_hosts file.

# ssh-keygen -R <host>
ssh-keygen -R 192.168.1.247

And that’s it, keys removed and now I can connect via SSH

Happy coding!

Greetings

El Bruno

References

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – Where is my Add/Remove programs? let’s use Synaptic

Buy Me A Coffee

Hi!

When I wrote about the latest version of Visual Studio Code working on the Raspberry Pi, I realize that I used a couple of commands to find an installed application.

The following command will list all the installed apps

sudo apt list --installed

Which is great, but hard to read in bash mode. So that’s why I use grep to filter for the app I want.

sudo apt list --installed | grep -i code-oss

So far, so good. The command did the trick, and I got my result: app name, version and details. However, as a long time Windows user, I was wondering if Linux users have a visual interface for this. And then I found: Synaptic.

The command to install Synaptic is maybe the last command we will use to install or uninstall an app

sudo apt install synaptic -y

And then we can launch the app using this command, and it’s need to be with sudo permissions (learned in the hard way)

sudo synaptic

At this moment, I can browse in the all list of apps. And I can quickly perform a search for my installed Visual Studio Code.

I get the result, with details, version and more.

And if you are wondering what’s the main difference with the bash command? So, I didn’t need to search and learn a command, the universal visual clue of the magnifier, or the search button were good enough for me.

Playing around with the app, I found I can display much more information for each installed app. Which is great, because I start to understand the idea and concepts of dependencies, where Linux install software, etc.

Happy coding!

Greetings

El Bruno

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#HowTo – Grant permissions to a folder after #Git clone, to perform #dotnet restore on a #RaspberryPi #dotnetcore

Buy Me A Coffee

Hi !

Quick post today, to leave this as a public note. And, disclaimer, I’m not a Linux expert, just a normal user; I’m sure there are plenty of better ways to do this. Any advice will be appreciated.

Context: I’m working with Git and .Net Core 3.1. Just cloned a repository and ready to run my 2 favourite commands

dotnet restore
dotnet run

However, I found this error

raspberry pi dotnet restore access denied error
/home/pi/dotnet/sdk/3.1.100/NuGet.targets(123,5): error : Access to the path '/<path>.csproj.nuget.dgspec.json' is denied. [/<path>..csproj] 
/home/pi/dotnet/sdk/3.1.100/NuGet.targets(123,5): error :   Permission denied

I’m running dotnet under the user pi, and I haven’t found a way to automatically grant permissions to new folders for this user. So everytime I clone a repo I need to grant permissions with the command.

# sudo chmod -R 757 '<path>'
sudo chmod -R 757 '/home/pi/srcebgit/testsGit/20191227MLNet/myMLApp/consumeModelApp'

And now, it’s working

raspberry pi dotnet restore working after grant user permissions

Of course, I still need to deal with other permissions issues because this project has some copy files actions on the build. Now I know the way!

raspberry pi dotnet restore working error on run

Happy coding!

Greetings @ Burlington

El Bruno

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#Windows10 – How to Install Connect app (yes, somehow is not part of my Windows 10 installation)

Buy Me A Coffee

Hi!

I’ve been using the Connect App for several years. It’s super useful when you need to share your Android screen to your Windows device, or any other device sharing screen scenario.

However, today I realized that I don’t have my Connect app installed in my Windows 10

no connect app

I don’t know why, maybe one of the Insider Builds remove the App, or any other crazy ideas. Moving on, I put my focus to figure out how to install this app. I really need it!

There is not much information about how to install this, but I found that I had the [Projecting to this PC] feature in Windows 10. Which was disabled for me.

windows 10 settings projecting to this pc

So, browsing the additional features, I found [Wireless Display]. That should be the one:

windows 10 add wireless display feature to w10

Warning, after the install time, is also REBOOT time! Windows being Windows.

windows 10 installing wireless display

And, now I had the connect App up and running to rock some Hololens demos

windows 10 connect app as new app

Happy coding!

Greetings @ Toronto

El Bruno

References

#VS2019 – How to fix the [obj\project.assets.json’ not found] when building a #NetCore project

Buy Me A Coffee

Hi!

Quick post today. This one is to save me 30 minutes of internet search next time I face this error.

Context:

New .Net Core Console App.

When I build the console app for the 1st time I got this error.

  • Error: NETSDK1004
  • Assets file ‘<Path> \EventConsoleApp01\obj\project.assets.json’ not found.
  • Run a NuGet package restore to generate this file.
  • C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets
visual studio 2019 new dotnet core console error on 1st build, cant find assets json.jpg

It’s a very silly error. However, if you are old school, the standard methods to fix this won’t work.

So the right way to fix this is to open the NuGet Package Manager Console [Tools // Nuget Package Manager / Package Manager Console] and type the command

dotnet restore
visual studio 2019 dotnet restore on nuget package manager console.jpg

Then rebuild the project, and that’s it! The new build will restore all the package, and also install everything necessary for a console app to run

visual studio 2019 project after dotnet restore.jpg

Happy coding!

Greetings @ Toronto

El Bruno

#Windows10 – Fixing Mouse Without Border DPI screen settings (very easy!)

Buy Me A Coffee

Hi!

A while ago, I wrote about the awesome [Mouse without Borders] application. This app is extremely useful, and it’s becoming very handy in scenarios like the Avanade Toronto Innovation Center.

In our Innovation Center, we have plenty of different machines, and it wasn’t a good moment when I realize that this is how the App Settings looks in a Windows 10 machine with some DPI customization.

mouse without borders crappy UI experience

I don’t have a lot of Windows Presentation Experience, however I know that we can solve this via some configuration / manifest changes for the App. I look up for the application folder [C:\Program Files (x86)\Microsoft Garage\Mouse without Borders], and I opened the [MouseWithoutBorders.exe.manifest] file with Visual Studio Code.

mouse without borders change app manifest to enable DPI experience.jpg

Lucky for me, the section that I needed to add it was already there. It was commented, so I un-commented this, save the file and restart the application. Of course, you need elevated privileges to do this.

5 seconds later my Settings windows was finally amazing again!

mouse without borders improved UI experience

Happy coding!   

Greetings @ Burlington

El Bruno

References

Mouse without Borders, https://www.microsoft.com/en-us/garage/profiles/mouse-without-borders/

Download Mouse without Borders, https://www.microsoft.com/en-us/download/details.aspx?id=35460

El Bruno, Mouse without borders, a Must Have App if you work with 2 or more computers https://elbruno.com/2019/10/30/windows10-mouse-without-borders-a-musthave-if-you-work-with-2-or-more-computers/

#VSCode – Installing Visual Studio Code @code in a #RaspberryPi, run as root, fix black screen (Updated)

Buy Me A Coffee

Hi!

TL;DR: These 2 commands are the only ones you need to install

wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add –
curl -L https://code.headmelted.com/installers/apt.sh | sudo bash

At the bottom of the post you will also find the command to run Visual Studio Code as Root in RPI

Some history on installing VSCode in a Raspberry Pi

Now that I have my amazing Raspberry Pi 4 with 4GB RAM, it’s time to see how serious the device is. So, I decided to install and use some developers’ tools in the RPi. My dev list will be something like this

  • Python
  • Some ML and AI Python packages
  • GIT
  • Arduino
  • Visual Studio Code

It’s been a while since I installed VSCode in the device. The last time I did this, I needed to download the code from GitHub and compile the tool in the Raspberry Pi. As far as I remember this was a +25 min process.

Lucky for us the process can now be much simpler, thanks to Headmelted (see references). Now, we only need a single command to install VSCode:

. <( wget -O - https://code.headmelted.com/installers/apt.sh )

Install process started! Or Maybe not because I found this amazing GPG error

python error installing visual studio code in raspberry pi
pi@rpidev3:~ $ curl -L https://code.headmelted.com/installers/apt.sh | sudo bash
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100  2349    0  2349    0     0  19739      0 --:--:-- --:--:-- --:--:-- 19906
 Detecting architecture…
 Ensuring curl is installed
 Reading package lists… Done
 Building dependency tree       
 Reading state information… Done
 curl is already the newest version (7.64.0-4).
 The following packages were automatically installed and are no longer required:
   python3-pyperclip python3-thonny rpi.gpio-common
 Use 'apt autoremove' to remove them.
 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 Architecture detected as armv7l…
 Retrieving GPG key headmelted…
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 gpg: no valid OpenPGP data found.
 Removing any previous entry to headmelted repository
 Installing [headmelted] repository…
 Updating APT cache…
 Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
 Hit:2 http://archive.raspberrypi.org/debian buster InRelease
 Get:3 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease [23.4 kB]
 Err:3 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease
   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3FD642696BFC8
 Reading package lists…
 W: GPG error: https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3FD642696BFC8
 E: The repository 'https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease' is not signed.
 Done!
 Repository install complete.
 Installing Visual Studio Code from [stretch]…
 Reading package lists… Done
 E: The value 'stretch' is invalid for APT::Default-Release as such a release is not available in the sources
 Visual Studio Code install failed.

There a public GPG key used to verify the package and the SH script somehow does not download it (I think the ARM RPI version is still not defined). So, before the previous command, I need to run this command

wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add –

Then run this command

curl -L https://code.headmelted.com/installers/apt.sh | sudo bash

Now we have Visual Studio Code installed!

raspberry pi visual studio code installed

Old Issue, not needed since 2020 January

But, yes another but, you may note that the tool open and display a black window. Again, I need to go deeper on the details, but the latest version does not work well. There is some context information on GitHub (see references), and the proposed solution is to rollback to a previous version

sudo apt-get install code-oss=1.29.0-1539702286

And we also need to disable the automatic updates on this tool

sudo apt-mark hold code-oss

The following command will remove the hold for Visual Studio Code

sudo apt-mark unhold code-oss

And now, yes, we got a fully functional Visual Studio Code in our Raspberry Pi!

How to run VSCode as root

Another update, is a command to run VSCode as root

# open VSCode in default source code folder with root
sudo code-oss --user-data-dir=/home/pi/src/vsCodeUsrData

Of course this is not the best way to use Visual Studio Code, however something it helps 😀

Note: Due some Deep Neural Network and docker process, my device is starting to heat a lot, so I’ll try a next generation cooler like this one: Blink Blink ICE Tower CPU Cooling Fan for Raspberry Pi (Support Pi 4)

Happy Coding!

Greetings @ Toronto

El Bruno

References

My posts on El Bruno

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – Where is my Task Manager? let’s try #htop

Hi !

As a Windows user, I use task manager a lot. You know that moment when

  1. Your PC start to work very slow
  2. You press CTRL+SHIFT+ESC to open Task Manager
  3. Select the not amicable process
  4. And Kill it !

Bonus: another group of people uses a more classic way

  1. Press CTRL+ALT+DEL
  2. Select Task Manager

These days where I’m doing part of my developer work in a Raspberry Pi 4 (see references), I was also in the need for a “Task Manager”. So a quick Bing/Google search pointed a couple of products, and htop seems to be a very popular one. And I also like the official product description

This is htop, an interactive process viewer for Unix systems. It is a text-mode application (for console or X terminals) and requires ncurses.

Official htop page (see references)

It seems that initially the product was created for Unix, and now supports FreeBSD, OpenBSD, macOS, and more. And, of course, it runs on Raspbian.

Question: Should I write a post on how to install Raspbian for Raspberry Pi? My guess is no, there are so many of this already out, but ... if get bored.

Before I move on, let’s take a look at htop running in my device, while I’m building a docker image using some amazing TensorFlow image analysis models.

The way to install htop is very straightforward.

sudo apt-get install htop

Then you can launch the app with

htop

Super Easy ! And again, the UI gives you a lot of very useful information, and because Linux users are heavy on commands and not mouse, 99% of the actions to control the app are using these commands

  • F1 – Help (explains everything, always nice)
  • F6 – SortBy (You can sort the list processes with this option. Sorting by user, CPU usage and memory usage can be useful.)
  • F9 – Kill (You can select a process and send a kill signal)
  • F10 – Quit (sometimes you gotta leave htop)
Note: Get the commands and learn from David Walz post (see references)

Happy Coding!

Greetings @ Burlington

El Bruno

References

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware