Skip to content

Instantly share code, notes, and snippets.

@soupslurpr
Last active March 17, 2025 08:32
Show Gist options
  • Select an option

  • Save soupslurpr/a65478c1c52712eb822a0c6aa5cd7637 to your computer and use it in GitHub Desktop.

Select an option

Save soupslurpr/a65478c1c52712eb822a0c6aa5cd7637 to your computer and use it in GitHub Desktop.
GrapheneOS Terminal app setup for Minecraft

In the profile you're running Terminal in, create a directory named linux in your profile's home directory (to clarify, this means from the Files app not the Linux VM). In that directory create a file named virglrenderer to enable VirGL. Content of the file doesn't matter just make sure it's named exactly virglrenderer.

Now open the Terminal and edit these files appropriately. You can use sudo nano FILE_PATH.

Comment out the two last env variables.
/usr/local/bin/enable_display

#!/bin/bash
sudo systemd-run --collect -E XDG_SESSION_TYPE=wayland --uid=1000 -p PAMName=login -p TTYPath=/dev/tty7 sleep 1d
systemctl --user start weston
export DISPLAY=:0
#export MESA_LOADER_DRIVER_OVERRIDE=zink
#export LIBGL_ALWAYS_SOFTWARE=1

/etc/xdg/systemd/user/weston.service
replace kiosk with desktop.

~/.config/weston.ini

[core]

[shell]
panel-position=bottom
animation=zoom
# see weston-bindings(7) for list of shortcuts
binding-modifier=ctrl

# set your keyboard layout and map here
[keyboard]
keymap_layout=us
keymap_variant=

[launcher]
icon=/usr/share/weston/terminal.png
displayname=Terminal
path=/usr/bin/weston-terminal

[launcher]
icon=/usr/share/icons/hicolor/32x32/apps/chromium.png
displayname=Chromium
path=/usr/bin/chromium --ozone-platform=wayland

enable display by running the following
source enable_display
and then tap on the display icon in the top right of the Terminal app and come back to the Terminal app after it loads.

Follow https://prismlauncher.org/download/?from=button#cli to install Prism Launcher.

run Prism Launcher
QT_QPA_PLATFORM=wayland flatpak run --socket=wayland org.prismlauncher.PrismLauncher
or
QT_QPA_PLATFORM=wayland-egl flatpak run --socket=wayland org.prismlauncher.PrismLauncher

I don't know which one is best.

The game doesn't work at the time of writing (March 14, 2025) possibly because of the driver only supporting an old version of OpenGL. We may need to wait for full GPU virtualization for Minecraft to work. This is a rumored capability of the Pixel 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment