Tricks
Last updated
Last updated
.pcd
filesWith this setup, you can open/view any .pcd
point cloud file by just double clicking the mouse.
Prepare a script that takes filename as the first argument.
for example, running command pcd_viewer.py example.pcd
can open the pcd file.
remember to add executable permission sudo chmod +x pcd_viewer.py
.
Create a for .pcd
files.
open the file /etc/mime.types
and add a line application/x-pcd pcd
,
such that files with extension .pcd
can be recognized as the MIME type application/x-pcd
.
Create a pcd-viewer.desktop
file to link/associate the program to the designated MIME type.
set the execution path to the prepared python script, and add %u
to help pass the argument
add a line MimeType=application/x-pcd
to declare that this app can handle this MIME type
place this file in /usr/share/applications
if you plan to make it work for all users
place this file in ~/.local/share/applications
for only the current user
with this file set properly, you can see it in the "Open with" menu after right click (please verify this before moving forward; it would not show up if %u
is not added or the path is not valid)
Set this application as the default program for .pcd
files.
option one: right click an.pcd
file and select PCD Viewer; it will remember the last program as the default one to open it in the future.
option two: open the file /usr/share/applications/defaults.list
and add a line application/x-pcd=pcd-viewer.desktop
; this will force it to use PCD Viewer at all time.
note: creating a defaults.list
at ~/.local/share/applications
would not work.
To make it work immediately you can run sudo update-desktop-database
after the changes.
The same approach can be applied to applications installed from Snap Store.
Run snap list
to see all applications installed from Snap Store.
Run echo $XDG_DATA_DIRS
to check the env path for all installed applications.
Their .desktop
files are placed at /var/lib/snapd/desktop/applications/
.
Just two steps needed:
Register .pcd as the MIME type if not done yet. (Similar to the Step 2 to set up a python script as the default program.)
Place the following .desktop file under ~/.local/share/applications
.
If sudo
privilege is required, we will need three files; otherwise two files. The usage is the following.
Prepare the script you plan to run as the system starts, named launch.sh
for example.
If root privilege is needed, prepare a file named root.sh
to run the launch.sh
file.
Prepare a launch.desktop
file to run launch.sh
or root.sh
script. Place this file in ~/.config/autostart/
folder.
Reboot the computer and you will see the program running automatically as the system starts.
When working on GUI desktop (with monitor, mouse and keyboard), if you plug in a USB flash drive or SD card, it will get mounted automatically and file manager will prompt out. The mounting point is at /media/<username>/<usb-drive-id>
.
This software installer requires network connection to install. (~100MB)
"Secure Erase is different from Sanitize because it only deletes the mapping table but will not erase all blocks that have been written to. Sanitize will delete the mapping table and will erase all blocks that have been written to. Therefore, Secure Erase is faster to complete than Sanitize."
There may not be a secure erase option available for some models of SSD. (e.g., not available for my Extreme PRO 4TB)
Secure Erase under Windows
For HDD
DBAN: Short for Darik’s Boot and Nuke, DBAN has been around for years and is a well-known and trusted drive wipe utility for HDDs. It does multiple pass rewrites (binary ones and zeros) on the disk. You’ll need to download it to a USB drive and run it from there.
Disk Wipe: Disk Wipe is another free utility that does multiple rewrites of binary data. You can choose from a number of different methods for overwriting your disk. Disk Wipe is also portable, so you don’t need to install it to use it.
Eraser: Eraser is also free to use. It gives you the most control over how you erase your disk. Like Disk Wipe, you can choose from different methods that include varying numbers of rewrites, or you can define your own.
For SSD
Parted Magic: Parted Magic is the most regularly recommended third-party erase tool for SSDs, but it does cost $13. It’s a bootable tool like some of the HDD erase tools—you have to download it to a USB drive and run it from there. (Note: there might be some executable available for download at 3rd party websites.)
ATA Secure Erase: ATA Secure Erase is a command that basically shocks your SSD. It uses a voltage spike to flush stored electrons. While this sounds damaging (and it does cause some wear), it’s perfectly safe. It doesn’t overwrite the data like other secure erase tools, so there’s actually less damage done to the SSD.
Secure Erase under Linux
Option One: Using Parted Magic
Download a ISO image from some 3rd party software website for free.
Create a new VM in VMware using this image.
Forward SSD to this Parted Magic VM and perform secure erase.
Option Two: Command-line Simple Secure Erase
sudo hdparm -I /dev/sdX
Displays all information about a drive.
sudo hdparm ––security-erase PASS /dev/sdX
Simple command to secure erase a drive with no hassle.
sudo hdparm ––user-master u ––security-set-pass PASS /dev/sdX
Sets a password.
sudo hdparm ––user-master u ––security-erase PASS /dev/sdX
Securely erases the SSD.
Normally, it is safe to increase your swap size to match the RAM size. For example, if you RAM size is 16GB, you can increase the swap size to be 16GB as well.
Reference:
Reference:
Reference:
In remote login sessions (where you only have ssh terminals), if you plug in a USB flash drive, nothing happens. You have to mount it manually by the command with sudo
.
The drawback of this operation is that, you have to use sudo
for all write operations in this directory later on, because the owner is root rather than the current user. The solution is to mount it by command instead. (Actually in GUI desktop, nautilus file manager does this for you.)
Reference:
For SanDisk SSD, there is an official software:
More information for Option Two: check .
References: ; ; ;
References: ;