June 21, 2017

Mount virtualbox shared folder at startup

Reference: How to mount a VirtualBox shared folder at startup?

  • Add shared folder in virtualbox, do not select Auto-mount
  • Force the vboxsf module to be loaded before fstab
    • add vboxsf in /etc/modules
  • Add the following line in /etc/fstab (change the uid, gid as needed)
shared_folder   /path/to/mountpoint   vboxsf   auto,rw,uid=0,gid=0  0   0

May 23, 2017

docker 指令備忘

參考 Running GUI apps with Docker

/usr/bin/docker run -it --rm --name NAME --net host \
    -e DISPLAY \
    -e HOME \
    -v /etc/passwd:/etc/passwd:ro \
    -v /etc/group:/etc/group:ro \
    -v $HOME/.Xauthority:$HOME/.Xauthority:ro \
    -v $HOME/DIR:/DIR \
    -w /DIR \
情境是在 host 放 source code,docker 裡面有 library 跟 tool,在 docker 裡面 compile code 跟使用 GUI tool