How to open Alacritty in xwayland instead of Wayland ?
Closed this issue · 5 comments
OS: Fedora Workstation 38
I want to launch Alacritt with specific options. To be exact, I want the extension to execute the env -u WAYLAND_DISPLAY alacritty
cmd instead of executing alacritty
command.
How can I setup it in this extension?
so you want to execute nautilus with wayland but alacritty with xwayland?
My setup is that as you said. I run Nautilus as its default(wayand) and alacrity in xwayland. But launching alacrity from nautilus using this extension opens it in wayland.
Simply to say, I want to launch Alacritty from Nautilus in a xwayland session using this(nautilus-open-any-terminal) extension.
I can't find any option to do it.
Currently there is no option for this.
How are you launching alacritty?
And I am interested in why?
From my point of view you always want to start things in wayland.
I am using alacritty on Gnome Wayland and I don't face this issue. Reason being I wrote a wrapper for alacritty which is basically a little shell script that checks if alacritty is running on Gnome and then forces it into XWayland by setting the WAYLAND_DISPLAY
env variable to empty.
if pgrep ".gnome-shell" > /dev/null; then env WAYLAND_DISPLAY= ${PATHTOBINARY}/bin/alacritty; else ${PATHTOBINARY}/bin/alacritty; fi
When you launch alacritty through this wrapper shell script just replace the ${PATHTOBINARY} with your path to the alacritty binary. That should fix the issue.
Background of this: alacritty has no dependency on GTK and Gnome Wayland has no support for server-side window decorations. Hence alacritty will have no GTK window decorations in Gnome Wayland.
thank you @icodeforyou-dot-net for sharing your solution.
I do not plan to implement this natively (because it is highly opinionated), therefore I am closing this.