Failed to acquire the VirtualBox COM object.

It appears that the issue could be a corrupt VirtualBox.xml file. The one I had did not have anything in it. Removing or moving the file let it create a new one and let VirtualBox actually start.

mv ~/.config/VirtualBox/VirtualBox.xml{,old}

Only problem is that none of the VM’s showed up. Was able to go to the ~/VirtualBox folder in a file browser and launch the vbox file to start the VM

Where is the Trash in KDE?

Where are the trash files stored?

The file location for the trash is in the following directory

~/.local/share/Trash/

Inside there are two folders. info and files.
info – Keeps track of what was deleted and where it was
files – Contains the actual files

Delete the files in the Trash

  • First delete the file in the “info” directory
  • Then go delete the files in the “files” directory

To delete the files, select the files then press “Shift + Del”
or right click, hold Shift down and select Delete.

Linux night light script

The following script let you turn your screen brightness up/down, but also adjust the color for night time.

Copy and paste code below in a nightlight.sh file

chmod +x nightlight.sh

and run

./nightlight.sh on .5

Code:

#!/bin/sh
export DISPLAY=$(w $(id -un) | awk 'NF > 7 && $2 ~ /tty[0-9]+/ {print $3; exit}')
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

display=`xrandr | grep "\ connected" | cut -d" " -f1`
brightness="$2"
# Check if brightness was specified.  If not, set screen to 50% brightness
if (echo $2 | grep [0-9]);then
         brightness="$2"
elif (echo $1 | grep -q help);then
         echo "############"
else
         brightness=".5"
         echo "Brightness variable not set, setting to fallback of 50%"
fi
night_mode() {
   for disp in ${display}; do
     xrandr --output $disp --gamma $1 --brightness ${brightness}
  done }
# auto is for future development
# auto() {
# The idea behind auto is to setup something that can pull the actual sunrise/sunset times then automatically adjust the display.
# Ideally there would be an algorithm so it does it slowly over a period of time, say slightly change the color over 30 minutes.
# until the desired color limit is reached
#
# curl sunrise-sunset.com/timezone/time
# if (time > sunset && colorTemp != colorTempMin); then
# set color to current temp-1
# elif (time > sunrise && colorTemp != colorTempMax); then);
# set to full brightness and temp
# else
# unable to parse, skipping.
# fi
#}
 
help() {
echo " Help for nightmode script.  
How to run script
./nightmode.sh on/off brightness
Examples: 
Turn nightmode on and set screen brightness to 75%
./nightmode.sh on .75
Turn night mode off and set screen brightness to 100%
./nightmode.sh off 1
"
}
case $1 in
  off) night_mode 1:1:1 1.0 ;;
  help) help ;;
  auto) auto ;;
  *) night_mode 1:1:0.5 ;;
esac

Setup in crontab to automatically trigger when it gets night or morning

* 21 * * * ~/nightlight.sh on .5  # Turn on at night
* 7 * * * ~/nightlight.sh off 1  # Turn off in the morning

wget multiple links with random access times

Create a file “list.txt” that contains all the URLs you want to download and launch the following command

for i in cat list.txt ; do wget ${i} && sleep $(( ( RANDOM % 120 ) +1 )) ; done

It’ll now run and after each link will wait a random amount of time up to 120 seconds before downloading the next link. Change the number as needed.