Weekly Shaarli
Week 50 (December 7, 2020)
Install VMWare Fusion
Download official VMWare Fusion 12 and use one of these keys to activate:
ZF3R0-FHED2-M80TY-8QYGC-NPKYF
YF390-0HF8P-M81RQ-2DXQE-M2UT6
ZF71R-DMX85-08DQY-8YMNC-PPHV8
Create virtual machine
- Download ICPC World Finals Contest Image
- Create a virtual machine in VMWare with that image
Fix DHCP
Open /etc/network/interfaces.d/ens33
:
sudo nano /etc/network/interfaces.d/ens33
Change content to:
auto ens33
iface ens33 inet dhcp
Then run:
sudo dhclient ens33
Install open-vm-tools-desktop and codeblocks-contrib
Run in Terminal:
sudo apt-get update
sudo apt-get -y install open-vm-tools-desktop codeblocks-contrib
Share files with virtual machine
- Click
Virtual Machine
>Sharing
>Sharing Settings...
- Check
Enable Shared Folders
- Add folders to be shared
Fix VMWare Fusion Shared folders not showing up
Mount /mnt/hgfs
using vmhgfs-fuse:
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
To make mounting globally persistent, add the following line to /etc/fstab
:
.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0
Create shortcuts for common applications/folders
Go to Other Locations
> /usr/share/applications
and drag the shortcuts to Desktop.
To create shortcuts for folders, run in Terminal:
gnome-desktop-item-edit --create-new ~/Desktop
Replace CodeBlocks's default C++ template
sudo gvim /usr/share/codeblocks/templates/wizard/console/cpp/main.cpp
Make CodeBlocks use gnome-terminal
Open CodeBlocks, go to Settings
> Environment...
> Terminal to launch console programs:
> gnome-terminal...
Reinstall bzip2:
brew uninstall bzip2
brew install bzip2
Add this to ~/.zshrc
:
# Workaround for pyenv to build
export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib"
export CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include"