Author Topic: Journey to the Pi  (Read 4777 times)

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Journey to the Pi
« on: November 15, 2020, 08:04:53 PM »
Journey to the Pi

Since the regular Raspian included more stuff than  what I need, I decided to use thebarebone  Raspian Lite Image.
After download, use WinFlashTool  [or SDFormatter/Win32DiskImager] to write image to SD card. Winflash allow resize partition.
Eject the SD card  and put it in the Pi . Connect keyboard, mouse, Ethernet and power.
Turn on and login with default username/password: pi/raspberry  [passwd to change pw]

first, config your raspian system
Code: [Select]
sudo raspi-config    expand file system  . Finish. Reboot. [not needed if used WinFlashTool in previous step]
   Localized Options, change locale to en_US.UTF8, uncheck en_GB.UTF8 ( use spacebar)
   set timezone, adjust keyboard layout, wifi country
   Interface options:  enable SSH, VNC.
   Advance option:  update tool . Finish.
Code: [Select]
ifconfig // to check ip address [192.168.x.x]
Code: [Select]
sudo reboot  –h now____________________________________________________________________________________
To access remotely  from your laptop : Use BitviseSshClient (much better than putty)  to open a new terminal window  and login to pi.
Code: [Select]
sudo apt-get update // copy & simply right mouse-click to paste into terminal window
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get clean
sudo reboot –h now // close disconnected window   
BitVise client will autologin after rebooting. Open a new terminal console window when its ready.
Code: [Select]
sudo apt-get install xrdp -y // install remote desktop
[ sudo apt-get install tightvncserver –y  ]  // Full Raspbian only, otherwise not needed.
Next are the steps for installing GUI to run .NET windows apps:
Code: [Select]
sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install --no-install-recommends xinit
sudo apt-get install raspberrypi-ui-mods    //install PIXEL UI
sudo apt-get install lightdm // (not needed) install lightDM login manager
sudo reboot –h now // close disconnected window
On the PC window, use command MSTSC to run remote desktop connection to the Pi:, you should now see a graphical desktop pi.
Now back to BitVise client and open a new terminal window to install mono the right way:
Code: [Select]
sudo apt install apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian vs-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list
sudo apt update
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install mono-complete -y                   // coffee break
sudo apt-get install mono-vbnc -y
sudo apt-get clean
sudo reboot –h now // close disconnected window

Note: You can change password with “passwd” command. Dont forget to save a new profile in BitVise client

Use Bitvise SFTP to drag and drop .NET Debug folder to the pi, also some icon files ,ie. AHMI00.ico
To create an application shortcut on the desktop
Code: [Select]
sudo nano /home/pi/Desktop/hpe  // filename=hpe
[Desktop Entry]
Type=Application
Comment=AdvancedHMI Tool
Name=HPE EXE
StartupNotify=true
Exec=mono /home/pi/AHMI/Debug/AdvancedHMI.exe
Icon=/home/pi/AHMI/Debug/AHMI00.ico
Terminal=false
Categories=Utility
StartupNotify=true
Save.Exit.  then change excution mode :  sudo chmod +x hpe
To create an app. shortcut on launch bar:
Code: [Select]
sudo nano /usr/share/applications/hpe.desktop.   add same [Desktop Entry] entries as above
also place a copy in:
Code: [Select]
sudo cp /usr/share/applications/hpe.desktop /usr/share/raspi-ui-overrides/applications/You may need to reboot , then right click File Manager to bring up Application Launch Bar: under Installed application – Accessories, you will see your app shortcut. Double click to add to launch bar

Code: [Select]
sudo cat /sys/firmware/devicetree/base/model;echo // to show pi version
sudo nano  /etc/xdg/lxsession/LXDE-pi/autostart

______________________________________________________________________________________________
With the recent .NET 5 release, it maybe now possible to run some .NET directly
Install .NET 5 6

Code: [Select]
wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz
sudo mkdir -p /usr/share/dotnet
sudo tar -zxf dotnet-sdk-latest-linux-arm.tar.gz -C /usr/share/dotnet
sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet




 


« Last Edit: October 12, 2023, 04:32:24 PM by bachphi »
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================