Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Last active October 10, 2023 14:26
Show Gist options
  • Save pojntfx/f9ef697bfa95de4a844989f2f467513e to your computer and use it in GitHub Desktop.
Save pojntfx/f9ef697bfa95de4a844989f2f467513e to your computer and use it in GitHub Desktop.
Enable Wayland for VSCode/VSCodium on Linux
#!/bin/bash
# VSCodium:
sudo mv /usr/bin/codium /usr/bin/codium.original
echo '/usr/bin/codium.original --enable-features=UseOzonePlatform --ozone-platform=wayland "$1"' | sudo tee /usr/bin/codium
sudo chmod +x /usr/bin/codium
# VSCode:
sudo mv /usr/bin/code /usr/bin/code.original
echo '/usr/bin/code.original --enable-features=UseOzonePlatform --ozone-platform=wayland "$1"' | sudo tee /usr/bin/code
sudo chmod +x /usr/bin/code
@rxmmah
Copy link

rxmmah commented Sep 20, 2023

when i open vscodium, or teh wayland version. it opens for a second then quite.
why?

@pojntfx
Copy link
Author

pojntfx commented Sep 21, 2023

You're probably running into this bug: VSCodium/vscodium#1650

@rxmmah
Copy link

rxmmah commented Sep 21, 2023

danke sehr. :)

@GrabbenD
Copy link

Is this expected?

Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.

@pojntfx
Copy link
Author

pojntfx commented Oct 10, 2023

Yeah! The options are passed along to Electron, which then handles them for you.

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