Shahzeb Ihsan

"The reasonable man adapts himself to the world; the unreasonable man persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw


Blog | Archive | About Me | Projects

Some Arch Linux VM Issues & Their Solutions

11 Aug 2015 | virtualbox, virtualmachine, archlinux, linux, development, bash, script

Some recurring issues I’ve had with VirtualBox and Arch Linux and their solutions. This bash script implements all these solutions.

VM’s Date/Time Out of Sync

Quite often when the Arch Linux VM is started from a previously saved machine state or the VM resumes after the Windows host machine wakes-up from sleep, the VM’s time doesn’t synchronize with the current host time. I tried setting the timesync threshold as follows but that didn’t help.

VBoxManage  guestproperty  set  {VM name}  /VirtualBox/GuestAdd/VBoxService/timesync-set-threshold  {threshold}

I didn’t invest too much time into investigating the root cause of this problem and the easiest solution I found was to use ntpd (Network Time Protocol daemon).

Network Issues After Switching to a Different Wi-Fi Connection

Sometimes, when you change your Wi-Fi connection (e.g. work Wi-Fi to home Wi-Fi), the network/internet doesn’t work.

The following seems to fix this:

$ sudo  systemctl  restart  systemd-networkd    # Restart the network daemon
$ sudo  resolvconf  -u                          # Regenerate DNS configuration & inform all subscribers

LXQT Desktop Doesn’t Resize if the VM’s Window Size Changes

The Window Manager (OpenBox in my case) resizes and the panel moves to the bottom of the screen but it looks like the wallpaper doesn’t resize, where infact, it is the LXQT desktop module that hasn’t resized. This failure happens in spite of the following:

Restarting the LXQT desktop module fixes this. You can do this from the ‘LXQT settings -> Session Settings’ window but I prefer the command line version:

$ sudo  pcmanfm-qt  --desktop-off  --profile  lxqt      # Turn off the desktop manager
$ sudo  pcmanfm-qt  --desktop  --profile  lxqt      # Turn off the desktop manager
comments powered by Disqus

Older · View Archive (8)

A Stepwise Tutorial for Building a Chrome App

A great tutorial for building a packaged Chrome app is available in this Google Code Lab and I used it as a starting point when I was working on my very first Chrome app, Simple TCP Client – BUT…..

Newer

Setting Linux Environment Variables, Bash Init Scripts and Loading/Execution Order

This post serves as a reference for various Linux startup, login and init scripts, environment variables and the order in which they are loaded or executed.

I use Arch Linux with Bash, but the general concepts should be applicable to any distro or shell. I also use Bash as my default login shell. You can confirm which login shell you’re running (sh or bash) by using echo $SHELL. The default user shell can be changed using the chsh command.