Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL setup for dbwebb gui #96

Open
NiklasAurora opened this issue Jan 28, 2021 · 0 comments
Open

WSL setup for dbwebb gui #96

NiklasAurora opened this issue Jan 28, 2021 · 0 comments

Comments

@NiklasAurora
Copy link

NiklasAurora commented Jan 28, 2021

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.

  1. Install WSL2, follow Microsofts own guide on how to here: https://docs.microsoft.com/en-us/windows/wsl/install-win10
  2. 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 ([email protected])"
# 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant