Ubuntu 17.10 as VirtualBox guest : missing vboxsf module

Running Ubuntu 17.10 as a VirtualBox guest works fine except for accessing files located on the host.
Only vboxguest and vboxvideo modules are available and loaded.
vboxsf module is missing.
Load the Guest Additions ISO image and let run the installer.

On a fresh new install, you may have this error :

Make sure to install the build-essential package :

apt install build-essential

One completed, reboot your system to make sure the right modules are loaded : vboxguest, vboxvideo, vboxsf

Once logged in, access to a directory located on your host may be denied.
Be sure that your user account is part of the vboxsf local group.
Add yourself :

usermod -aG vboxsf your_login

Log out and log in again. This should be good now

Advertisements

Changing the PATH variable in PowerShell 5.1

This $ENV:PATH holds the value of your current PATH settings. This variable can be updated in your current PowerShell terminal :

$ENV:PATH="$ENV:PATH;C:\Program Files (x86)\Notepad++"

You can also retrieve the current value with the following cmdlet Get-ItemProperty :

Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PATH

To make this change permanently, open up a new PowerShell terminal as Administrator (using runas) :


$oldpath = (Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PATH).Path

$newpath = "$oldpath;C:\Program Files (x86)\Notepad++"

Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PATH -Value $newpath

Now, just log out of your current Windows session to take this change into account

NB : Tested successfully on Windows 10

Windows PowerShell Syntax Plugin set up in gVim

Windows PowerShell Syntax Plugin provides Syntax coloring, indenting and filetype detection for Windows PowerShell.

It is available at :

http://www.vim.org/scripts/script.php?script_id=1327

http://github.com/PProvost/vim-ps1

If you use Pathogen, just extract into your bundle folder.

If not, just set up Pathogen as follows below :

https://github.com/tpope/vim-pathogen

Additional actions to make it work on Windows 7 :

cd C:\Program Files (x86)\Vim\vimfiles
mkdir autoload
mkdir bundle

Install pathogen.vim in C:\Program Files (x86)\Vim\vimfiles\autoload

To enable Pathogen, add this to your gvimrc :

execute pathogen#infect()
syntax on
filetype plugin indent on

On Windows 7/10, the gvimrc file must be named as _gvimrc and located in one of the folders :

$HOME/_gvimrc
$HOME/vimfiles/gvimrc
$VIM/_gvimrc

$HOME points to your home directory in Windows 7 and $VIM points to your directory where Vim/gVim have been installed.

The personal initialization files are searched in the order specified above
and only the first one that is found is read.

http://vimhelp.appspot.com/gui.txt.html#gvimrc

This plugin is now enabled. Enjoy !

Data::Printer Perl module on Debian Buster

To see what’s inside a variable or a Perl object, Data::Dumper is often used.
For inspecting objects, its features are limited.
Data::Printer helps you dump your Perl data structures in a complete, colored and human-friendly way.
This module is not part of the Perl core modules.
To install it on Debian Buster :

apt install libdata-printer-perl

Start using it. Its syntax is simple and pretty straightforward.
For objects, it provides public/private methods details that Data::Dumper does not.

More details on Metacpan for Data::Printer