Wednesday, February 21, 2024

Fix: VMWare workstation 17 shared folder between host windows and Linux VM

vmware-hgfs client shows up shared folder but nothing shown under /mnt/hgfs

run the following to fix this issue.
 

 sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

Wednesday, August 16, 2023

Fixed: failed to execute script pyinstaller-entry-point (ADE start)

Docker may not be installed on the machine,this can be an issue as ade is just a wrapper on the docker. you can use the following page https://docs.docker.com/engine/install/ubuntu/ for installation of docker or short instructions are as below.


Thursday, May 18, 2023

Replay udp data using tcpreply

tcpreplay is primarily designed for replaying packets at the network level and may not be suitable for replaying UDP packets. Thus bit of work is needed to replay this data. update the input.pcap to us your desired MAC id's

tcprewrite --enet-dmac=destinationMAC --enet-smac=sourceMAC -i input.pcap -o output.pcap
Replace destinationMAC with the MAC address of the destination machine or network interface you wish to send the UDP packets to. Replace sourceMAC with the MAC address of the network interface you plan to send the packets from. Now you would be able to replay this packets

sudo tcpreplay -i input.pcap -o output.pcap
test script to read this packets ( Python3 script is provided to read data on port 9999 )

import socket

UDP_IP = "0.0.0.0"
UDP_PORT = 9999

sock = socket.socket(socket.AF_INET, # Internet
                     socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
    data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
    print("received message: %s" % data)

Friday, May 20, 2022

Fix for HDMI to an external monitor:

Run the commands below with the HDMI connected to my monitor:

  • xrandr --listproviders (to make sure you have NVIDIA-G0 as a provider)
  • xrandr --setprovideroutputsource NVIDIA-G0 modesetting 
  • xrandr --auto


Ref: Found the info in the last post in this thread: https://www.linuxquestions.org/questions/debian-26/debian-11-bullseye-on-optimus-laptop-not-detecting-external-screen-4175690446/

Solution : how to check if the drive is ssd or hdd ?

Command :  lsblk -o NAME,ROTA

Result: 

NAME   ROTA
sda       0
└─sda1    0
sdb       1
├─sdb1    1
├─sdb2    1
├─sdb3    1
├─sdb4    1
nvmep1    1


 1 for hard drive and 0 for ssd.

Wednesday, January 5, 2022

Add the pem certificate to linux

Add the ca-certificate to access the site.

1# Extract pem files 2unzip cert-cas.zip 3cd cert-cas 4 5# convert all pem files to crt 6for f in *; do mv -- "$f" "${f%.pem}.crt"; done 7 8sudo mkdir /usr/local/share/ca-certificates/extra 9sudo cp *.crt /usr/local/share/ca-certificates/extra/root.cert.crt 10sudo update-ca-certificates

certificates will be available ( below shows confirmation )

1test@testM1:/usr/local/share/ca-certificates/extra$ sudo update-ca-certificates 2Updating certificates in /etc/ssl/certs... 3rehash: warning: skipping duplicate certificate in cert-cas.pem 43 added, 0 removed; done. 5Running hooks in /etc/ca-certificates/update.d... 6 7Adding debian:test.com-cachain.pem 8Adding debian:test.com-rootca.pem 9Adding debian:test.com-subca.pem 10done. 11done. 12

Find files in dir not contain a string



 find . -iname "*.md" -exec grep -Li "All rights reserved" {} \+

Thursday, November 11, 2021

Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException Unrecognized named-value: 'secrets'

 ErrorGitHub.DistributedTask.ObjectTemplating.TemplateValidationExceptionThe template is not valid. /home/runner/work/test/test/./.github/actions/test/action.yml (Line22, Col14)Unrecognized named-value'secrets'. Located at position 1 within expressionsecrets.PASS


Fix: actions does not have access to secrets, only the workflow is allowed to access secrets.


workflow to pass the secret as:

with:
  secret_input: ${{ secrets.SUPER_SECRET }}

And then, in action.yml,

inputs:
  secret_input: 
     description: "..."
     required: true
...

runs:
.....
  - name: .....
    env:
      MY_SECRET: ${{ inputs.secret_input }}