Skip to content

Instantly share code, notes, and snippets.

View edermanoel94's full-sized avatar

Eder Costa edermanoel94

  • Rio de Janeiro
View GitHub Profile
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active April 5, 2025 17:59
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

Note

If you want to use pure WSLg, you can try the new WSLg (XWayland) tutorial or the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.

For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample

@ammario
ammario / goth
Created September 2, 2016 16:27
golang test coverage html
#!/bin/bash
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
@awidegreen
awidegreen / vim_cheatsheet.md
Last active March 19, 2025 10:59
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@tiagodavi
tiagodavi / Strategy.php
Created March 12, 2012 00:56
Design Pattern Strategy PHP
#Armamentos/Armamento.php
<?php
//Qualquer tipo de arma deve implementar armamento
interface Armamento{
//Deve obrigatoriamente poder ser utilizada
public function usar();
}