Disable VirtualBox clock synchronization

For whatever reason you may want to disable the time/date synchronization between the VirtualBox guest system and the host OS.

See the example below to do that for an example virtual machine “myName”:

  • vmname=”myName”; printf “Disabling clock sync for vm: \”$vmname\”\n”; VBoxManage setextradata $vmname “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” 1; VBoxManage setextradata $vmname “VBoxInternal/TM/TSCTiedToExecution” 1;

Unfortunately this is ignored when the virtual machine is shut down and then started again. The clock of the virtual machine will be forcefully synchronized to the host system clock. If you know a workaround, please post it in comments.

Advertisements

Missing php-mbstring

After (re-)installing PHP and attempting to run a script, you may see an error message saying “PHP Fatal error: Uncaught Error: Call to undefined function mb_strtoupper()”.

Well, you may be missing the php-mbstring extension to PHP. Simply install it by:

  • sudo apt-get install php-mbstring

Symbolic links in Nautilus/Caja

It is very irritating that there seems not to be an option for creating links to files in Gnome file manager Nautilus and its derivatives, like Caja. After all, this is such a useful feature, giving the user so much more convenience when working in Linux as compared to Windows.

It turns out, that the feature is actually there, but for some weird reason it is not available from the GUI.

Just press Ctrl+Shift and drag and drop your file between file manager’s windows, and a symbolic link will be created instead of copying the file.

As an alternative, you can do the dragging with the middle mouse button. Then on drop you will be shown a context menu with “Link Here” as an option.
 


Is my system 32 or 64 bit?

On Linux, to find out if you have 32 or 64 bit CPU just type:

  • arch

Display processor information

Wondering what CPU you have got? Just type:

  •  lscpu

Or simply output the contents of this virtual file:

  • cat /proc/cpuinfo

Find paragraph breaks in LibreOffice

To find paragraph breaks (i.e. the ASCII line feed character 0A hex)  in LibreOffice, use the currency symbol “$” as the search string.

Make sure to look into “Other options” and check “Regular expressions” in the “Find & Replace” dialog.

P.S.

By the way, searching for “\n” and replacing it with “\n” can be done only once, as on the repeated action there will be no matches found anymore and searching for “$” must be done instead. Read some more about this bug/feature/inconsistency here.

 


List fonts used in PDF document

If you want to see what fonts have been used in creation of a PDF document, you can use pdffonts utility of poppler-utils package for this. Just type:

  • pdffonts yourfile.pdf