#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

#RaspberryPi – Visual Studio Code blank screen is fixed on version 1.42. Thanks @headmelted! @code

Buy Me A Coffee

Hi!

When I wrote about how to install Visual Studio Code on a Raspberry Pi, there was an error on the app running on the device: the tool opened and display a black window.

We needed to manually go back to version 1.29 to avoid this problem. And we also forgot to apply any updates, each new version still have the black window error.

I was following the issue on GitHub, and I was happy when a few days ago, it was solved by headmelted (link https://github.com/headmelted/codebuilds/issues/67#issuecomment-563335451).

I’ve updated the app to the latest version (1.42.0), and it was working fine.

raspberry pi 4 visual studio code version 1.42 running fine

If we check the apt list, we can find a specific detail of the running version with the command

sudo apt list --installed | grep -i code-oss
raspberry pi 4 apt list for code -oss return 1.42

So, please go and thank headmelted by the amazing work he is doing!

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

#RaspberryPi – Ice Tower: The best cooler for your device! From 70C to <40C in a 60 minutes process running at 100% in all 4 cores

Buy Me A Coffee

Hi!

The Raspberry Pi 4 is an amazing device, and if you have been tracking the different usage scenarios for the device, you probably noticed that heat is an issue. I’ve using some Aluminum Heatsink, however still in some heavy scenarios the device temperature can be up to 70C or more.

I found out that when the device get’s to certain temperature (>80C), the device lowers its operational speed to prevent damage.

Officially, the Raspberry Pi Foundation recommends that the temperature of your Raspberry Pi device should be below 85 degrees Celsius for it to work properly. That’s the maximum limit. But it would start throttling at 82 degrees Celsius.

Raspberry Pi Temperature Monitor

While I was digging on this topic, the SeeedStudio team approached me to suggest me to test one of the best fans for Raspberri Pi 4: Blink Blink ICE Tower CPU Cooling Fan for Raspberry Pi (Support Pi 4).

This fan is massive and amazing. Look at these photos, to have a sense of the size of the fan.

raspberry pi 4 massive fan 1
raspberry pi 4 massive fan side by side with a raspberry pi

And, because I’m a programmer, I decided to test the device temperature with a long heavy process, to see how this affect the temperature.

Build OpenCV

Initially I was planning to share a machine learning training model process, but then I realized that there is something else that we can do which is very resource consuming: Compile OpenCV.

And, I know, you can install OpenCV with a simple pip install command, but let’s built it. Is much more fun. As usual, I’ll rely on one of the amazing Adrian Rosebrock Tutorials: Install OpenCV 4 on Raspberry Pi 4 and Raspbian Buster (see references)

Build OpenCV using 4 cores with a bare naked Raspberry Pi: >75C

In this 1st scenario, I built OpenCV using the 4 cores with a bare-naked Raspberry Pi. This process took almost an hour, and as you can see in the following animation:

  • The 4 cores where working at 100%
  • The temperature was around 75 degrees all the time
  • And, of course, this animation is at 300X speed.
build opencv on raspberry pi 4 no fan 300x

Build OpenCV using 4 cores with ICE Tower Cooler fan in a Raspberry Pi: <40C

In the 2nd scenario, I built OpenCV using 4 cores with the ICE Tower Cooler fan in the Raspberry Pi. As the previous one, this process also took almost an hour, and as you can see in the following animation:

  • The 4 cores where also working at 100%
  • The temperature was less than 40C degrees all the time
  • Again, this animation is at 300X speed.
build opencv on raspberry pi 4 with Ice tower fan

Differences running an App: Face Recognition

My next question was how about a normal process, like some face recognition demos. I used and changed some of Adrian Rosebrock’s face recognition demos, and here are the results.

Face Recognition app in a Raspberry Pi bare-naked, runs at 67C degrees
Face Recognition app in a Raspberry Pi with ICE Tower Cooler fan, runs at 38C degrees

Conclusion

If you are concerned about the temperature of your device, this is my top 1 option. And, if you are wondering if the fan is noisy? not at all! I have it right next to me, and I don’t even notice the fan.

About Seeed Studio

Seeed is the IoT hardware enabler providing services over 10 years that empower makers to realize their projects and products. Seeed offers a wide array of hardware platforms and sensor modules ready to be integrated with existing IoT platforms and one-stop PCB fabrication and PCB assembly service. Seeed Studio provides a wide selection of electronic parts including Arduino  Raspberry Pi and many different development board platforms  Especially the Grove Sytsem help engineers and makers to avoid jumper wires problems. Seeed Studio has developed more than 280 Grove modules covering a wide range of applications that can fulfill a variety of needs. 

Bonus: this video also analyzes the cooler in other scenarios.

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

#RaspberryPi – How to solve #dotnet core not recognized after reboot

Buy Me A Coffee

Hi!

So, after writing my posts on how to install dotnet core 3.1 on a Raspberry Pi 4, I found that after I reboot my device, the dotnet command stop working. When I run dotnet from bash I get the following message

~bash: dotnet: command not found

dotnet command not found

The problem, is that the export steps of the installation process were lost after the reboot. And, as reminder of what is the export command.

Linux export command is use to set export attribute for shell variables on Linux system. The Linux export command is one of bash shell built in command.

In order to fix this, we can add the commands into our [~/.bashrc] file. First we need to edit our file with the command

sudo nano ~/.bashrc

And add the lines

export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
export PATH="$PATH:/home/pi/.dotnet/tools"
raspberry pi 4 edit bashrc to add dotnet core wrapper

Now we need to reload the [~/.bashrc] file with the command

source ~/.bashrc
dotnet command working after reload bash file

And that’s it ! if the command is not recognized, just reload the bashrc file.

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

#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

#RaspberryPi – Microsoft Teams in RPi 4? Mmm, not yet, but it’s an interesting learning journey to start the New Year 2020

Buy Me A Coffee

Hi!

A couple of weeks ago, Microsoft released a preview version of Microsoft Teams for Linux (see references). Since that day, I was hoping to have a chance to play around with this version, mostly in a Raspberry Pi.

Those days I also had this conversation with my best half (who is a very smart person):

  • Why do you need to do this? You already have a very powerful MacBook, an amazing Dell laptop and a gaming PC. So, why do you need to install Microsoft Teams in a not so powerful device at home?
  • Because …

There is no logic answer for this, however I learned a lot in the process. Let me share, because it all start with the official download page for Microsoft Teams.

Microsoft Teams Versions

raspberry pi 4 download microsoft teams

Besides the official download page for Microsoft Teams, there is an interesting page which describes all the possible client scenarios for Desktop, Web, and Mobile. And for Desktop it includes, Windows, Linux and Mac: Get clients for Microsoft Teams (see references).

In the Linux section, we have the option to review the packages DEB and RPM repositories

This is also interesting, because browsing the repositories, you may find the Release and the Insiders versions.

Microsoft package repository with release and insider version of MS Teams

Raspberry Pi 4 64-bits kernel

The Raspberry Pi 4 has a 64 bits kernel, however the current Raspbian distro are not using the 64-bit kernel capabilities of the device. There is an entry on the RaspberryPi forums which explains how to enable the 64-bit kernel: Pi4 64-bit Raspbian kernel for testing – Focus on Pi4 (see references)

Add to config.txt

arm_64bit=1

and Run

sudo rpi-update

And done, in a NON OFFICIAL or NON SUPPORTED way, my device is running on X64.

This process took some time, at least 10 minutes.

Note: I’m 99% sure that this is not supported. So, all of this is mostly a testing and learning experience.

Add AMD64 architecture to Raspberry Pi.

Back to Microsoft Teams. After checking the available versions, I realized that AMD64 is the only supported architecture in Linux. The Raspberry Pi uses an ARM CPU, which uses the ARM instruction set. That is a different instruction set than that used by i386 and x86-64/amd64. So, there is no way to install an AMD64 package on a Raspberry Pi 4

However, I found an interesting command: dpkg –add-architecture

And I started to read about the command (some links in references).

dpkg –add-architecture is meant for CPUs that support multiple instruction sets. I think it was mainly introduced for x86-64 (i.e. 64bit) CPUs, which also support i386 (i.e. 32bit) instructions. This allows you to install packages compiled for i386 on a system that otherwise uses x86-64 packages.

So, even if it won’t work, I tried to add AMD64 in my RPi 4 with the following command:

#sudo dpkg --add-architecture {architecture name} && sudo apt-get update
sudo dpkg --add-architecture amd64 && sudo apt-get update
raspberry pi 4 lscpu

So, after this, I have the AMD64 architecture instructions installed. They are not going to work, but I can install an AMD64 package now.

Installing Teams

If you are running your Raspberry Pi with a desktop interface, just double clicking on the file: teams_1.2.00.32451_amd64.deb. This will start the installation. And, of course, it will fail!

raspberry pi 4 install microsoft teams.png

So, it was time to read and learn, and I found an alternative and amazing tool to install DEB files: GDebi (see references)

Gdebi is a tiny little app that helps you install deb files more effectively by handling dependencies. Learn how to use Gdebi and make it the default application for installing deb packages.

It’s very easy to install, just 2 commands

sudo apt-get install gdebi-core
sudo apt-get install gdebi

Note: It should work with the 2nd command, however, I needed to add the core option 1st.

raspberry pi 4 open gdebi.png

Now I got GDebi, and I can open the package with the tool, and I got a dependency problem with the libasound2 library.

raspberry pi 4 gdebi error on dependencies libasound2

Even so, I can start the installation with the command

sudo gdebi teams_1.2.00.32451_amd64.deb

and, the app won’t work, but I’ll see the shortcut access in the [Sound & Video] folder

Again, the app won’t launch, but in the personal side, I spend some good time here learning a lot about Linux, processor architectures and more. So, I’m 100% cool now!

Happy coding and Happy New Year!

Greetings @ Burlington

El Bruno

References

My Posts

My posts on Raspberry Pi

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

#RaspberryPi – Double Commander on #RaspberryPi4, because files are important!

Buy Me A Coffee

Hi !

As a Windows User, I was never happy with the out-of-the-box File Explorer, that’s why I’m a big fan of Total Commander. The 2 panels mode to move or copy files between the panels, or the quick access keys, ftp connections and more, makes Total Commander a #MustHave tool in my Windows 10 Station.

I started to look for something similar for Raspberry Pi, and after a couple of tests my choose is: Double Commander (see references).

It’s easy to install, just this command

sudo apt-get install doublecmd-qt

And it will appear on the Accessories menu.

So far, Double Commander, is part of my setup list of tools to be installed on Raspbian for my Raspberry Pi 4 developer station!

Happy Coding!

Greetings @ Burlington

El Bruno

References

My posts on El Bruno

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

Buy Me A Coffee

Hi!

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

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!

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 VSCode, 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 – 6 commands to install #OpenCV for #Python in #RaspberryPi4

Hi !

Quick post to remind me the 6 commands to install OpenCV in my Raspberry Pi

sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-100
sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo pip3 install opencv-contrib-python 

There is an optional command to update pip, which is always nice.

Happy Coding!

Greetings @ Burlington

El Bruno

References

My posts on El Bruno

#RaspberryPi – MultiMonitor support in #RaspberryPi4 rocks!

Buy Me A Coffee

Hi !

Another post in my path to use a Raspberry Pi 4 as a fully development device. And today, no code at all, just a showcase of the amazing new hardware: 2 video output. So let’s start with a working mode:

raspberry pi 4 multi monitor support with htop

In the previous image, in Screen 1 I’m using an instance of Visual Studio Code to do some Machine Learning with Python, and in Screen 2, I’m also browsing the history of one repo (I broke something …. as usual!).

In Screen 1, I also have Htop running, and it shows that I’m only using +780MBs of ram, that’s mean I still got 3GBs to use!

As a Windows user, I really appreciate that we had an visual interface to configure screen settings.

Raspberry Start > Preferences > Screen Configuration
raspberry pi 4 screen configuration

The [Screen Layout Editor] allows us to configure the following settings for HDMI 1 and HDMI 2 screens:

  • Resolution
  • Frequency
  • Orientation

As you can see in the following image, I got connected a HD monitor in HDMI 1 so my maximum available resolution is 1920×1080.

raspberry pi 4 screen configuration screens resolution

I haven’t connected a 4K monitor to the device, but I’ll get there 😀

Finally, you can also manage some additional screen configuration from the [Desktop Preferences] settings. I this section you can configure individual wall papers, icons to be displayed and more.

And this is also the section where you can DUPLICATE THE MONITORS ! [Show identical desktop on second monitor].

And, of course, I my demo device is ready for Caribbean Developer Conference 2019!

raspberry pi 4 multi monitor ready for Caribbean Developers Conference

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