Skip to content

Instantly share code, notes, and snippets.

@shinji257
shinji257 / WSL2GUIWSLg-XWayland-en.md
Created February 7, 2025 04:45 — forked from tdcosta100/WSL2GUIWSLg-XWayland-en.md
A tutorial to use GUI in WSL2/WSLg replacing original Xorg by Xwayland, allowing WSL to work like native Linux, including login screen

Full desktop shell in WSL2 using WSLg (XWayland)

Note

If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.

For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot

@shinji257
shinji257 / gist:d6d5af640f42a77ce8e02209ef621a8e
Created February 23, 2024 23:26
AMD GPU Crash - Frigate
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: [mmhub] page fault (src_id:0 ring:24 vmid:5 pasid:32773, for process ffmpeg pid 27260 thread ffmpeg:cs0 pid 28003)
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: in page starting at address 0x00008001072fb000 from client 0x12 (VMC)
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: MMVM_L2_PROTECTION_FAULT_STATUS:0x00503830
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: Faulty UTCL2 client ID: VCN (0x1c)
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: MORE_FAULTS: 0x0
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: WALKER_ERROR: 0x0
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: PERMISSION_FAULTS: 0x3
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: MAPPING_ERROR: 0x0
Feb 23 18:24:08 Apollo kernel: amdgpu 0000:10:00.0: amdgpu: RW: 0x0
Feb 23 18:24:18 Apollo kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_dec_0 timeout, signal
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 9/4/23, 11:34 PM
Description: Ticking block entity
java.lang.NoClassDefFoundError: org/apache/commons/compress/utils/Lists
at ironfurnaces.blocks.furnaces.BlockIronFurnaceBase.getComparatorInputOverride(BlockIronFurnaceBase.java:296) ~[ironfurnaces-1.18.2-3.3.3.jar%23165!/:3.3.3] {re:classloading,pl:runtimedistcleaner:A}
at ironfurnaces.blocks.furnaces.BlockIronFurnaceBase.calculateOutput(BlockIronFurnaceBase.java:370) ~[ironfurnaces-1.18.2-3.3.3.jar%23165!/:3.3.3] {re:classloading,pl:runtimedistcleaner:A}
at ironfurnaces.blocks.furnaces.BlockIronFurnaceBase.m_6376_(BlockIronFurnaceBase.java:410) ~[ironfurnaces-1.18.2-3.3.3.jar%23165!/:3.3.3] {re:classloading,pl:runtimedistcleaner:A}
@shinji257
shinji257 / gpg-agent-relay.sh
Created August 18, 2023 19:36 — forked from Speedy37/gpg-agent-relay.sh
WSL2 gpg agent relay (Yubikey)
#!/bin/bash
# Launches socat+npiperelay to relay the gpg-agent socket file for use in WSL
# See https://justyn.io/blog/using-a-yubikey-for-gpg-in-windows-10-wsl-windows-subsystem-for-linux/ for details
GPGDIR="${HOME}/.gnupg"
USERNAME=Vincent
# I use the same username for wsl and windows, but feel free to modify the paths below if that isn't the case
WIN_GPGDIR="C:/Users/${USERNAME}/AppData/Roaming/gnupg"
NPIPERELAY="${HOME}/npiperelay.exe"
@shinji257
shinji257 / VMware_Keys.md
Created November 19, 2022 01:04 — forked from Vichingo455/VMware_Keys.md
VMware Workstation Pro Serial Keys

VMware Workstation Pro Serial Keys

Updated: 2022-11-18

NOTE: I DON'T GUARANTEE THE KEYS WORK, DON'T CONTACT ME IF ONE IS NOT WORKING, JUST TRY ANOTHER ONE OR QUIT THE PAGE

VMware Workstation 4.x.x

ZHDH1-UR90N-W844G-4PTN6

G1NP0-T88AL-M016F-4P8N2

ZC14J-4U16A-0A04G-4MEZP

# The following is adapted from https://github.com/reswitched/loaders/blob/master/nxo64.py
#
# ===========================================================================================
#
# Copyright 2017 Reswitched Team
#
# Permission to use, copy, modify, and/or distribute this software for any purpose with or
# without fee is hereby granted, provided that the above copyright notice and this permission
# notice appear in all copies.
#
###############################################
# TX SX OS unpacker - by hexkyz and naehrwert #
###############################################
from Crypto.Cipher import AES
from Crypto.Util import Counter
import os
import struct
"""
---- Minecraft Crash Report ----
WARNING: coremods are present:
RandomPatches (randompatches-1.12.2-1.18.1.1.jar)
SplashAnimationCoremod (SplashAnimation-0.2.1.jar)
BedPatch (bedpatch-2.2-1.12.2.jar)
Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.5-1.12.2.jar)
Quark Plugin (Quark-r1.6-177.jar)
OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)
AstralCore (astralsorcery-1.12.2-1.10.20.jar)
2019-12-26T19:52:11 default - Debug: Runing QUsb2Snes version "0.7.13"
2019-12-26T19:52:11 WSServer - Debug: Adding Device Factory "SD2Snes"
2019-12-26T19:52:11 WSServer - Debug: Adding Device Factory "RetroArch"
2019-12-26T19:52:11 APPUI - Debug: Scanning "H:/QUsb2Snes/apps/QFile2Snes"
2019-12-26T19:52:11 APPUI - Debug: Searching for "H:/QUsb2Snes/apps/QFile2Snes/qusb2snesapp.json"
2019-12-26T19:52:11 default - Debug: "Found a json description file qusb2snesapp.json"
2019-12-26T19:52:11 APPUI - Debug: Found an application Name : "QFile2Snes" Description : "A basic file explorer for the usb2snes firmware" Folder : "H:/QUsb2Snes/apps/QFile2Snes" Icon : "icone.png" Exe : "QFile2Snes" QtApp : true
2019-12-26T19:52:11 APPUI - Debug: Adding "H:/QUsb2Snes/apps/QFile2Snes" - "QFile2Snes"
2019-12-26T19:52:11 APPUI - Debug: Name : "QFile2Snes" Description : "A basic file explorer
cartridge region=NTSC
board type=1A3B revision=11,12,13
rom name=program.rom size=0x200000
ram name=save.ram size=0x2000
map id=rom address=00-6f,80-ff:8000-ffff mask=0x8000
map id=ram address=70-7d,f0-ff:0000-ffff
msu1
rom name=alttp_msu.msu size=0x0000