Monday, March 27, 2017

VirtualBox: resize disk in linux

Resize to 350GB using VirtualBox 5.18: VBoxManage modifyhd "/home/myhome/VirtualBox VMs/arc/arc.vdi" --resize 350000 Full path to virtual disk (e.g., arc.vdi) is important. Without the full path, the following error occurs: VBoxManage: error: Cannot register the hard disk '/home/myhome/VirtualBox VMs/arc/./arc.vdi' {54199b9e-0a91-4d84-a7d0-fe2b47ed8f47} because a hard disk '/home/myhome/VirtualBox VMs/arc/arc.vdi' with UUID {54199b9e-0a91-4d84-a7d0-fe2b47ed8f47} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file

Thursday, March 23, 2017

Linux: mkdir and cd in one command

mkcd () {
case "$1" in */..|*/../) cd -- "$1";; # that doesn't make any sense unless the directory already exists
/*/../*) (cd "${1%/../*}/.." && mkdir -p "./${1##*/../}") && cd -- "$1";;
/*) mkdir -p "$1" && cd "$1";;
*/../*) (cd "./${1%/../*}/.." && mkdir -p "./${1##*/../}") && cd "./$1";;
../*) (cd .. && mkdir -p "${1#.}") && cd "$1";;
*) mkdir -p "./$1" && cd "./$1";;


Monday, March 20, 2017

Windows 8.1: start chrome in new session and monitor

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:/monitor1

Monday, March 13, 2017

Linux SPSS 24: R 3.2 was not found in this location.

When installing R essentials for linux it is unclear how to specify R path. Without this, the following error occures:

 R 3.2 was not found in this location. Please click Previous to select a different location, or install R 3.2 on this computer and run this installation again.
For me the answer was to proved a path where `lib64` of the R package is located, not where the R binary is as show on this screenshot

In the screenshot /opt/r32 is my installation folder (I compiled version 3.2.2 it myself from source). The binary R is in /opt/r32/bin. This will not work. The path must be to R folder inside lib64 folder.

Tuesday, March 07, 2017

Chrome through ssh tunel

ssh -ND 1080 user@remote_server_ip -p 2222 google-chrome-stable --proxy-server="socks5://localhost:1080" --proxy-bypass-list="localhost;"

Saturday, March 04, 2017

Arch Linux: missing

Install openmotif package: sudo pacman -S openmotif This is needed to run Ansys, for example.