Share HDD drive on OSMC or Raspberry pi

While there are many methods for file sharing, the easiest path is using the Samba file sharing service. It’s easy to configure and use on both Windows and Mac platforms.

# Login to your osmc via SSH using a terminal 
ssh -i osmc:[email protected]_host_ip

# Instal samba sever and vim 
sudo apt-get install smb-app-osmc vim

# Make a copy of samba configuration
sudo cp /etc/samba/smb.conf /etc/samba/smb-local.conf

# List all your external hard drive connected to the Raspberry Pi
ls /media
# Assume `/media/WesternHDD` is the path to your external hard drive

# Make change to the `smb-local.conf` file
sudo vim /etc/samba/smb-local.conf

Your smb-local.conf file should look like this

[osmc]
    browsable = yes
    read only = no
    valid users = osmc
    path = /media/WesternHDD
    comment = OSMC Home Directory

Add to my src(0)

No account yet? Register

Spread the love

vscode 1.60 terminal git bash windows

On Windows there has been a problem with Git Bash not recognizing since version 1.60 in Vscode, the following settings.json part is needed to bring it back (need the whole part, not just for git bash)

{
      "terminal.integrated.profiles.windows": {
        "PowerShell": {
          "source": "PowerShell",
          "icon": "terminal-powershell"
        },
        "Command Prompt": {
          "path": [
            "${env:windir}\\Sysnative\\cmd.exe",
            "${env:windir}\\System32\\cmd.exe"
          ],
          "args": [],
          "icon": "terminal-cmd"
        },
        "GitBash": {      
          "path": "C:\\Dev\\Git\\bin\\bash.exe",
          "icon": "terminal-bash"
        }
      },
      "terminal.integrated.defaultProfile.windows": "GitBash",      
      "terminal.integrated.automationShell.windows": "C:\\Dev\\Git\\bin\\bash.exe"
}
Add to my src(0)

No account yet? Register

Spread the love

Enable nested VT-x/AMD-V on Virtualbox

If you have VT-x enabled on your BIOS, but this option is grayed out on Virtualbox interface, you can do the following to fix:

You may need to locate to the bin folder of virtualbox, if you’re on Windows, the following command should work.

VBoxManage modifyvm vm-name --nested-hw-virt on

# On windows
VBoxManage.exe modifyvm vm-name --nested-hw-virt on

Please change vm-name to your VirtualBox machine name

Add to my src(0)

No account yet? Register

Spread the love

Try ‘apt –fix-broken install’ with no packages

This is an annoyed issue, but after several tries, here is my approach for the fix:

sudo dpkg --configure --force-overwrite -a
# or
sudo apt -o Dpkg::Options::="--force-overwrite" --fix-broken install
Add to my src(0)

No account yet? Register

Spread the love

Fix gitbash ssh vim edit backspace changed into question mark

It’s a very annoying issue with gitbash connecting to Centos via SSH and when trying to edit text with vim or vi, backspace key just changed into question mark.

I found the following fix may be applied to Gitbash or Putty as following:

`Putty`: Putty Configuration > Terminal > Keyboard: Select `Control-H` for the backspace key
`Gitbash`: Gitbash Options > Keys: select `Backarrow sends ^H`
Add to my src(0)

No account yet? Register

Spread the love

How to completely remove Ubuntu from Windows dual boot without USB

All of these steps can be done from Windows, you can do the following to completely remove Ubuntu from Windows dual-boot

First, let’s use Windows partition manager and remove the Linux partition, you can extend it to the main partition again if you want.

Then, open the Windows Prompt and enter the following:

# Open command prompt with administrator permission
bootsect /nt60 c: /mbr

# Remove the ubuntu partition
mountvol S: /S
S:
cd .\EFI\
dir
rd /S Ubuntu
Add to my src(0)

No account yet? Register

Spread the love

Install Mongodb on Ubuntu

Command line to install mongoDB on Ubuntu

sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl start mongod
sudo systemctl enable mongod
Add to my src(0)

No account yet? Register

Spread the love