Tuesday, December 5, 2023

MyPyTalks : A Generative AI Powered, Shell Copilot

Perform your tasks under Linux | Unix boxes with Natural Language Prompts.

The tool will generate Shell Scripts based on the user prompts with the insights on the execution impact, with the help of Generative AI. The script could be further customized by the user prior to the execution for an added flexibility.

Find more in GitHub

MyPyTalks_en

 

 

Friday, February 17, 2023

RaspberryPi4: Enabling Audio Devices During Remote Desktop Sessions

During RDP Sessions, ensure
  • User has been in Right Groups.
  • Display Manager has been unlinked from Pulse Sink During RDP Sessions

Reference

Alternate Method:

With XRDP, use x11vnc protocol to Login into Local Desktop Session, than to a new session with RDP Protocol. This will enable the user with all the required privileges in an RDP Session, as that of a locally logged in session.

For implementation instructions follow this GitHub Link.


Tuesday, December 13, 2022

Migrating an Existing ENCRYPTED Hard Drive to a NEW “NVMe PCIe M.2 SSD”

An upgrade to a “NVMe PCIe M.2 SSD” drive, helps your system perform 6X faster.

The context has been detailed in the trail.

This blog primarily talks about, Migrating the current Hard Drive (Which is ENCRYPTED) to the new “NVME Drive”. Our current environment has the existing Hard Drive fully  encrypted using Microsoft BitLocker Or McAfee Encryption. We would like to have the migration as seamless as possible, without redoing all the OS/Software Setup.

Many of the Disk Cloning Tools may fail, while cloning an encrypted Disk.

Hence for this purpose we’ve used “CloneZilla” with “Sector To Sector Copy” option. This option will use “dd” linux command to clone a drive.

It will use a bit by bit copy, so you will get an exact replica of the original Hard Drive. You could now directly plug and play the new “NVMe PCIe Drive”, replacing the original Hard Drive.

image

 

Advantages Of ““NVMe PCIe M.2 SSD” (Context):

Getting Desktop Virtualization To Next Level with a “NVMe PCIe M.2 SSD” (~6X performance gain)

Recently we’ve upgraded our Personal Desktop HDD/SSD to the new “NVMe PCIe M.2 SSD” (~3Gbps transfer speed). The performance gain has been astonishing, including overall desktop and virtualization performance.

Earlier we’ve been keeping multiple HDDs, to have a hassle free Virtualization experience. Since HDDs are of mechanical and to transfer data, their HEADs has to be moved over the platter (SEEK), which is time consuming.

If multiple applications are competing for data, say your Primary Desktop and multiple Virtual Machines running on top of your primary system, Your Hard Drive will choke, as it has to SEEK its heads over multiple locations and the heads can only move back and forth (not in random fashion). In worst case, it can freeze the entire system.

However if you keep multiple HDDs, say one specific for Virtualization purposes, this issue wont happen, as your virtualized application data SEEK operations will done independently, compared to your Primary Desktop Data SEEK operations, as both are done in separate HDDs.

Still data transfer speed will be a primary bottleneck on your virtualization performance, as HDDs max data transfer speed only comes around 150-200MBps.

Changing to SATA SSD’s can improve the performance to a greater extent, as it can provide a data transfer speed up to 550MBps. A 2.5x performance gain.

However with a new “NVMe PCIe M.2 SSD” drive, which is almost similar to a RAM design and support random read/write, can deliver around 3000MBps (3GBps). Approx 6X performance gain. Since it support random access, a single drive can cater to multiple applications competing for DATA. i.e A single “NVME SSD” can support your primary desktop and virtualized application at once with high data transfer rate.

In a nutshell now we enjoy the below benefits with a “NVMe PCIe M.2 SSD” upgrade;

  1. High boot speed. Both for desktop (boot in 7 seconds) and virtual machines.
  2. Overall 6X performance gain
  3. A single, compact device, instead of multiple big hard drives
  4. Longevity, as NVMe is similar to RAM and having no moving parts
  5. Low Power Consumption
  6. Less Heat
  7. Silent Operation
  8. Better Battery Backup for Laptops/NoteBooks
  9. Better performance and turn arounds for data intensive applications like AI/Machine Learning


Friday, November 5, 2021

PyCompilePackage, A Lightweight Python Pre Compiler and Packager

A Lightweight Python Pre Compiler and Packager (As a single Package). with Added Support for Dependencies having C/C++ extensions. e.g. Numpy

Try PyCompilePackager here.

Are You Tired of, with the below aspects of your Python Deployments?

* Concerned about sharing the Original Python Source code files for Deployment? (The source may highly prone towards tampering)

* Slow startup time of your Python App, due to the initial compilations

* Your deployment contains the whole hierarchy of Python Source, folders and associated files (which are Difficult to manage and update)


PyCompilePackge, Helps to make your Python Build/Deployments clean and compact by;

1. Pre-Compile all your python sources to Byte Codes

2. Package those Compiled Files in a Single PYZ Container file, with any associated resources

3. Deployment is as simple as, Copy this single PYZ file to Target Machines and run


This has the below advantages over the traditional python deployments;

* Original Python Source code is not shared, hence less chance for tampering

* Enjoy performance boosts, due to pre compiled source and faster startup time

* Easy and fast (re)deployments, as you don't have to deal with lot of files/folder hierarchies

* Chances for Individual file corruption post deployment is less, Since all files have packaged as a single PYZ file

Friday, September 24, 2021

Reconnect to a Local Desktop Session from RDP : Linux

Connecting to the same Locally Logged In Desktop Session, from an RDP Client is an obvious challenge in any Linux Environment. But this should be the way, how RDP Protocol should behave as we find with Windows Machines.

Linux RDP Implementations like XRDP, will create separate Session with Remote Connections, rather than connecting to a locally available Desktop Session.

However you could use a combination of both XRDP and X11VNC utilities, to achieve the desired behavior.

A sample implementation with Debian10 LXQt Desktop (using LightDM as the display-manager) is given here;

fig. A Debian 10 Virtual Machine, being accessed simultaneously from an RDP Client (Remmina) and a native viewer (Virt-Viewer), using the same Session.

RDPShareLocalSession

Monday, March 29, 2021

Cross Compile Modern C++, 2X Faster and Cleaner with Docker

Setting up Cross Compilation Tool Chain on your Development Box for Modern C++, is not easy and could easily pollute or break the system.

However, Docker and Qemu User space Emulation will make these tasks a lot more simpler and faster.

Refer a sample implementation in this GitHub Page.

image

 

image

image

Tuesday, March 16, 2021

Run Your Pi (RaspberryPi) with 16GB Of RAM !

Enable your Pi to boot from a good quality SSD (Solid State Drive).
Enable Swap file, and configure it to grow between 8-16 GB.

Your Pi is now ready to take, much demanding use cases !

image

  

Components Used:

PowerBank-1 (Two 2.4A Out), powering
   Raspberry Pi2
   120GB SSD (Enables Virtual Memory of 16GB for Pi)

PowerBank-2 (Two 2.4A Out), powering
    Router (Used as Wifi Extender – Optional*)
    USB FAN (To maintain the Pi’s temp between 40-42C)