Skip to content

Instantly share code, notes, and snippets.

@tdcosta100
tdcosta100 / WSL2GUIWSLg-pt_br.md
Created July 3, 2024 03:50
Utilizando o desktop shell completo no WSL2

Shell desktop completo no WSL2 utilizando o WSLg

Warning

Esse tutorial está em desenvolvimento, portanto as alterações propostas nele podem interferir nas funcionalidades existentes. Proceda com cautela!

Nesse tutorial, vamos instalar e utilizar o ambiente desktop do GNOME no WSL2, sem nenhuma utilização de software externo. A única exigência é o WSLg instalado e funcionando. Atualmente, as instruções são somente para as distribuições do Ubuntu (20.04, 22.04 e 24.04) e GNOME, mas você pode solicitar que eu teste outras distribuições e ambientes desktop.

Ubuntu

GNOME

@tdcosta100
tdcosta100 / WSL2GUIWSLg-en.md
Created July 3, 2024 03:48
Using full desktop shell in WSL2

Full desktop shell in WSL2 using WSLg

Warning

This is a work in progress tutorial. Things done here may break existing functionality, so be careful!

In this tutorial, we will install and use a full GNOME Desktop environment in WSL2, without any external software. The only requirement is a working WSLg installation. At the moment, the instructions are only for Ubuntu (20.04, 22.04 and 24.04) distros and GNOME, but you can request me to test other distros and desktop environments.

Ubuntu

GNOME

@tdcosta100
tdcosta100 / QEMU-Ubuntu-22.04-WHPX.bat
Last active February 2, 2024 03:20
QEMU 7.0.0 configuration for Ubuntu 22.04 (LTS) with WHPX acceleration
:: In order to make Ubuntu 22.04 to work with WHPX acceleration without crashes, you have to activate the following CPU features:
:: -aes
:: -avx
:: -sse4.1
:: -sse4.2
:: -ssse3
:: -x2apic
:: -xsave
::
:: You can change every other option, only CPU and WHPX options are mandatory.
@tdcosta100
tdcosta100 / WSL2GUIXvnc-pt_br.md
Last active July 3, 2024 03:58
Tutorial para utilizar interface gráfica no WSL2, substituindo XServer pelo Xvnc, permitindo ao WSL trabalhar como se fosse Linux nativo, incluindo tela de login

WSL2 com interface gráfica utilizando Xvnc

Note

Caso você queira utilizar o WSLg puro, você pode tentar o novo tutorial com o WSLg.

Nesse tutorial, iremos configurar a interface gráfica no WSL2, e acessá-la utilizando o VNC. Nenhum software adicional fora do WSL é necessário (como o VcXsrv), exceto, claro um VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, todos devem funcionar perfeitamente).

Os componentes-chave que precisamos instalar são o metapackage do desktop que você desejar (GNOME, KDE, Xfce, Budgie, etc) e o tigervnc-standalone-server.

Para essa configuração irei utilizar Ubuntu (20.04, 22.04 e 24.04 funcionam), e irei instalar o GNOME Desktop. Uma vez que os componentes-chave não são diretamente relacionados ou dependentes do Ubuntu ou do GNOME,

@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active July 3, 2024 03:55
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 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 screenshots section for examples.

@tdcosta100
tdcosta100 / NeedlemanWunsch.cs
Last active August 21, 2019 15:21
Needleman-Wunsch algorithm
using System;
using System.Collections.Generic;
using System.Linq;
namespace Algorithms
{
public class NeedlemanWunsch
{
private enum CorrespondenceType
{