Wayland
While trying out Ubuntu 23.04 via Ubuntu Sway Remix 23.04, I've noticed a lot of issues with blurry programs. After doing some research, I've found that this is due to applications using the X11 protocols to access the display via Xwayland instead of using the native Wayland protocols. I didn't have this issue running Ubuntu Sway Remix 22.04, so I'm very curious what has changed.
I'm starting to document what I'm learning hear and adding links.
Resources
- Running programs natively under Wayland - from the swaywm project
- Environment variables for Wayland hackers - Canonical forum post
Individual applications
atlauncher on Arch / Garuda Linux
In order for atlauncher to run properly in Sway or SwayFX on Wayland, you need to tweak the Exec line by adding env _JAVA_AWT_WM_NONREPARENTING=1
as shown below. This is the launcher file located at /usr/share/applications/atlauncher.desktop
Install atlauncher, java jre21, and Visual Studio Code (editor)
pacman -S atlauncher jre21-openjdk visual-studio-code-bin
From a console, use VSCode to edit the atlauncher.desktop file to match the contents shown below.
# use Visual Studio Code to edit the atlauncher.desktop file
EDITOR="code -w" sudoedit /usr/share/applications/atlauncher.desktop
Reference content of the atlauncher.desktop
file:
[Desktop Entry]
Name=ATLauncher
GenericName=ATLauncher
Comment=A launcher for Minecraft which integrates multiple different modpacks to allow you to down
load and install modpacks easily and quickly.
Exec=env _JAVA_AWT_WM_NONREPARENTING=1 atlauncher
Icon=atlauncher
Terminal=false
Type=Application
Categories=Game;
Keywords=game;Minecraft;
Flatpak
VS Code
Adding "--enable-features=UseOzonePlatform --ozone-platform=wayland" to the code launcher fixes the issue. I updated all of the /usr/share/applications/code*.desktop files appropriately.
Wayvnc
Make sure you change the username and password in the configuration file you create.
RSA-AES encryption configuration
mkdir ~/.config/wayvnc
ssh-keygen -m pem -f ~/.config/wayvnc/rsa_key.pem -t rsa -N ""
cat <<EOF > ~/.config/wayvnc/config
use_relative_paths=true
address=0.0.0.0
enable_auth=true
username=luser
password=p455w0rd
rsa_private_key_file=rsa_key.pem
TLS encryption configuration
# creating a self-signed key pair
mkdir ~/.config/wayvnc
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -sha384 \
-days 3650 -nodes \
-keyout ~/.config/wayvnc/tls_key.pem \
-out ~/.config/wayvnc/tls_cert.pem \
-subj /CN=`hostname` \
-addext subjectAltName=DNS:localhost,DNS:localhost,IP:127.0.0.1
use_relative_paths=true
address=0.0.0.0
enable_auth=true
username=luser
password=p455w0rd
private_key_file=tls_key.pem
certificate_file=tls_cert.pem
-end