Sharing folders in VMWare

Refer: https://kb.vmware.com/s/article/74650

Create the file /etc/systemd/system/mnt-hgfs.mount with this content:

sudo touch /etc/systemd/system/mnt-hgfs.mount
sudo gedit /etc/systemd/system/mnt-hgfs.mount
[Unit]
Description=VMware mount for hgfs
DefaultDependencies=no
Before=umount.target
ConditionVirtualization=vmware
After=sys-fs-fuse-connections.mount

[Mount]
What=vmhgfs-fuse
Where=/mnt/hgfs
Type=fuse
Options=default_permissions,allow_other

[Install]
WantedBy=multi-user.target

Create the file /etc/modules-load.d/open-vm-tools.conf with this content:

sudo touch /etc/modules-load.d/open-vm-tools.conf
sudo gedit /etc/modules-load.d/open-vm-tools.conf

If the file already exists, add that line to the file.

fuse

Enable the system service with the command:

sudo systemctl enable mnt-hgfs.mount

This will make sure the hgfs fdirectory will be mounted after a reboot.

Make sure the 'fuse' module is loaded:

sudo modprobe -v fuse

In Workstation or Fusion, enable "Shared Folders" in "Virtual Machine Settings" > "Options", and set the folders to be shared.
The shared folders should appear in the directory /mnt/hgfs. If that is not the case, start the service with:

sudo systemctl start mnt-hgfs.mount

or

reboot

OS Version for Linux

Use the following command

cat /etc/*-release

WD My Cloud Needs This

cat /proc/version

Results as of 2021-10-03

Linux version 3.10.39 (kman@kmachine) (gcc version 4.6.4 (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) ) #1 SMP Thu Aug 29 19:32:48 PDT 2019 2014T20p4 Build-gita3b74c9

How to Share a Folder via SMB/CIFS in Ubuntu 20.04

Refer: https://ubuntuhandbook.org/index.php/2020/07/share-folder-smb-ubuntu-20-04/

Install Samba

sudo apt install samba

Right click the file via our folder browser and choose share options

If you want a remote PC to have access with a uersname and password, run the following command,

Note: The USERNAME must be an existing user on your Linux machine.

sudo smbpasswd -a USERNAME

Before getting access from the remote PC, you may need the IP address of hostname

ip -4 address
hostname

Access the share folder from remote computer

smb://ip-address/
\\ip-address\ or \\hostname\

Shortcut to Delete Apple Messages

Apple did away with the shortcut to delete messages. You can create a custom shortcut for messages. You still will need to confirm each delete.

System Preferences
Keyboard
App Shortcuts
Plus Icon
Choose Messages
Menu Option - "Delete Conversation..." assigned to Command+D

Using Remote Docker Containers in Visual Studio Code

Using Remote Docker Containers in Visual Studio Code

You need ssh access on remote server via authorized_keys

Setup SSH Access if Required

Get your public key

cat ~/.ssh/id_rsa.pub

Logon to your target server and install your public key

cat >> ~/.ssh/authorized_keys

Make sure authorized_keys has proper permission; otherwise it won't work

chmod 600 ~/.ssh/authorized_keys

Visual Studio Code Setup

Prerequisites

  • Docker machine installed on remote server
  • Visual Studio Code installed on local machine
  • Docker plug-in installed on Visual Studio Code
  • Remote - Containers plug-in installed on Visual Studio Code

You will need to create a Docker Context

Refer: https://stackoverflow.com/questions/60425053/vs-code-connect-a-docker-container-in-a-remote-server

Here's an example of one

docker context create macbook-parallels --docker "host=ssh://mruckman@192.168.86.34"

Now you need to use this context, any Docker command you run, will be against that remote server, once context is used

docker context use macbook-parallels

Now launch Visual Studio Code, you will see your remote container and images now. Launch your desired remote container, and you can now attach to it.

If you want to revert back to your local Docker context

docker context use default

Other helpful context commands

List all of your contexts

docker ls

Remove a context

docker rm context-to-remove