-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The submodule dbwebb gui is compatible with WSL2 by using the following instructions:
First, check your version of Windows. This was tested on the following one:
And in Settings->System->About I have the following versions:
Version: 20H2
OS build: 19042.746
Then, go on to install WSL2 and Docker if you have an up-to-date version of Windows.
- Install WSL2, follow Microsofts own guide on how to here: https://docs.microsoft.com/en-us/windows/wsl/install-win10
- Install Docker and enable WSL support, se more here: https://docs.docker.com/docker-for-windows/wsl/#install
Here, I have the following output in Powershell:
PS C:\Users\aurora> wsl -l -v
NAME STATE VERSION
* Debian Running 2
docker-desktop Stopped 2
docker-desktop-data Stopped 2
Install dbwebb gui by running dbwebb gui install in your WSL2 distro (Debian for me).
NOTE: You have to clone your course repository in the WSL part of the file system or your my.cnf will get the wrong permissions
You will get the following error message when running the correct script:
Warning: World-writable config file '/home/dbwebb/.my.cnf' is ignored
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)You can now use dbwebb gui and it can hopefully connect to Docker. To get the full experience however, you need to install a support package called wslu which adds support to various things, read more here. The important part is that it gives us wslview which opens links with our default Windows browser, from WSL.
Follow the instructions on wslutilities on how to install it on your distro (Debian is quite easy and Ubuntu has it preinstalled).
Once this is done, you need to generate your ~/.dbwebb/gui_config.bash which tells dbwebb gui which software to utilize. Clone any of the dbwebb repos (for me dbwebb clone databas) and run dbwebb gui. Press enter to get to the main menu and pick a: Admin menu followed by Create a default configuration file.
Edit the configuration file with your favorite editor and change the following two lines:
# Use your own signature
export DBWEBB_TEACHER_SIGNATURE="// Niklas (nik@bth.se)"
# wsl browser
export DBWEBB_BROWSER="wslview"
# wsl clipboard
export DBWEBB_TO_CLIPBOARD="clip.exe"You should now have a working WSL2 setup on Windows 10 for dbwebb gui, good job!