Search This Blog

Thursday, October 24, 2024

Hide XFCE Panel with command line

 # Hide the XFCE panel:

xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior --type int --set 2
xfce4-panel -r

# Show the XFCE panel:

xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior --type int --set 0
xfce4-panel -r

0 = never

1 = Intelligently

2 = Always


Tuesday, October 8, 2024

VMware Workstation Pro Free for Personal Use Now


















VMware Workstation Pro: Now Available Free for Personal Use: Details

Direct Download link: ( Require create a broadcom Account ) 

Allocate 100% memory in VMware workstation prevent huge VMEM file

VMware Workstation creates VMEM files size eque to the memory settings of the VM.

To prevent create the VMEME file I set memory allocate to 100%.

First power off the VM.

Then open the [VM_NAME.vmx] file under the VM folder.

Add or update these parameters:
 
MemTrimRate = "0"
prefvmx.minVmMemPct = "100"
mainMem.useNamedFile = "FALSE"
sched.mem.pshare.enable = "FALSE"
prefvmx.useRecommendedLockedMemSize = "TRUE"

Fix keyboard lag/input delay on Ubuntu, Debian and Redhat in VMware workstation 17

I experiencing this problem with Ubuntu, Debian, Redhat in VMware workstation version 17.

I tried all these, none works:
  • Enhanced keyboard on and off
  • Turned 3D Acceleration on and off
  • Install VMware Tools Desktop
  • Set memory allocated to 100%

Finally, turn on the "Virtualize IOMMU (IO memory management unit) under [Virtualization engin] under "Processors" like this fixed the issue.

Tuesday, July 23, 2024

Bash scrip check if another instance of my shell script is running

#!/bin/bash

# Check if another instance of my shell script is running
if [[ `pgrep -f $0` != "$$" ]]; then
	echo "Another instance of shell already exist! Exiting"
	echo "[$(date)] : $0 : Process is already running with PID $pid"
	exit 1
fi

# Rest of the script goes here
echo "[$(date)] : $0 : is now running..."
Explanation: 
  1. $0 gives filename of your running script.
  2. $$ gives PID of your running script.
  3. pgrep searches for process by name and returns PID.
  4. pgrep -f $0 searches by filename, $0 being the current bash script filename and returns its PID.